Closed sojojo closed 9 years ago
Calling the API via curl returns all timestamps as integers; I believe this should be the new standard across all new endpoints that are implemented:
➜ ~ curl -X GET 'https://api.datasift.com/v1.2/account/identity' -H 'Auth: USERNAME:API_KEY' | jq .
{
"count": 2,
"page": 1,
"pages": 1,
"per_page": 25,
"identities": [
{
"id": "ef554f96b...",
"label": "...",
"api_key": "1cefe96f4...",
"status": "active",
"master": true,
"created_at": 1431529262,
"updated_at": 1431535636,
"expires_at": null
},
{
"id": "a55677c3f622...",
"label": "...",
"api_key": "85fcd26e0...",
"status": "active",
"master": false,
"created_at": 1432230266,
"updated_at": 1432230266,
"expires_at": null
}
]
}
I'm not sure why created_at
would be returned as a DateTime object
The output mapper determines which fields are converted in to DateTime objects. updated_at has now been added to this file and should be available on the next release.
If you wanted all fields to return as timestamps instead of datetimes you just need to edit the output_mapper.py and rebuild.
The dictionary that we get from
client.account.identity.list()
has anupdated_at
value that is an integer, not a datetime object as would be expected.