Integration libraries that return results instead of throwing
A low balance, a daily cap and a rate limit are normal faucet flow. Wrapping every call in try/catch to branch on them reads worse than returning a result array.
4 entries
A low balance, a daily cap and a rate limit are normal faucet flow. Wrapping every call in try/catch to branch on them reads worse than returning a result array.
Ad networks and faucet scripts validate against the common shape, which is /api?api=TOKEN&url=. A rewrite gives you that without breaking existing integrations.
Every provider shortens by API: you POST or GET their endpoint with your token and a destination, and they return JSON containing the short URL. Gluing a destination onto a base URL works with none of them.
Faucet software already knows how to talk to shortlink providers. Match the contract they expect and operators can point their existing config at you without writing anything.