Skip to content

Use type information to infer object type #34

Open
@mjallday

Description

@mjallday

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions