As above, a sandbox mode would be nice for testing without affecting a live account.
Proposal - use a request variable named sandbox, contents being one of several things to indicate the type of response for the endpoint to provide. Data returned should be mocked data or example data so that the application can get a simulated response to work with.
Variable's settings could be like follows:
serverError - fake a server error for the endpoint (for testing how to react to API problems)
error - some sort of error with the request - for and endpoint like creating tweets, could be something akin to "X didn't validate"
unauthorized - fake an authorization error, for endpoints that require auth
rateLimited - fake being rate limited
success - provide fake data in response according to what the endpoint usually returns
Data doesn't have to be stored in the DB at all even - just has to be something live to simulate how the API works.
As above, a sandbox mode would be nice for testing without affecting a live account.
Proposal - use a request variable named
sandbox
, contents being one of several things to indicate the type of response for the endpoint to provide. Data returned should be mocked data or example data so that the application can get a simulated response to work with.Variable's settings could be like follows:
serverError
- fake a server error for the endpoint (for testing how to react to API problems)error
- some sort of error with the request - for and endpoint like creating tweets, could be something akin to "X didn't validate"unauthorized
- fake an authorization error, for endpoints that require authrateLimited
- fake being rate limitedsuccess
- provide fake data in response according to what the endpoint usually returnsData doesn't have to be stored in the DB at all even - just has to be something live to simulate how the API works.
Something to think about anyways.