Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use type information to infer object type #34

Open
mjallday opened this issue May 6, 2013 · 0 comments
Open

Use type information to infer object type #34

mjallday opened this issue May 6, 2013 · 0 comments
Labels

Comments

@mjallday
Copy link
Contributor

mjallday commented May 6, 2013

Currently the python client uses meta classes and URLs to specify the type of object.

The API now returns type information (see _type param below) on all resources when they are returned. Using this instead allows us to break away from inspecting the URL to see the type of object that something is and gives us more flexibility in naming conventions.

$ curl https://api.balancedpayments.com/v1/api_keys -X POST
{
  "_type": "api_key", 
  "created_at": "2013-05-06T21:37:38.888923Z", 
  "uri": "/v1/api_keys/AK1m8dgKozaJwrv1BaYBesYn", 
  "_uris": {}, 
  "meta": {}, 
  "id": "AK1m8dgKozaJwrv1BaYBesYn"
}
@remear remear added the 1.0 label Apr 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants