{"action":"created","issue":{"url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/551","repository_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs","labels_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/551/labels{/name}","comments_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/551/comments","events_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/551/events","html_url":"https://github.com/OneDrive/onedrive-api-docs/issues/551","id":214823803,"number":551,"title":"How to get createdDateTime and lastModifiedDateTime","user":{"login":"app5000","id":25754616,"avatar_url":"https://avatars1.githubusercontent.com/u/25754616?v=3","gravatar_id":"","url":"https://api.github.com/users/app5000","html_url":"https://github.com/app5000","followers_url":"https://api.github.com/users/app5000/followers","following_url":"https://api.github.com/users/app5000/following{/other_user}","gists_url":"https://api.github.com/users/app5000/gists{/gist_id}","starred_url":"https://api.github.com/users/app5000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/app5000/subscriptions","organizations_url":"https://api.github.com/users/app5000/orgs","repos_url":"https://api.github.com/users/app5000/repos","events_url":"https://api.github.com/users/app5000/events{/privacy}","received_events_url":"https://api.github.com/users/app5000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-16T20:09:07Z","updated_at":"2017-03-16T22:52:56Z","closed_at":null,"body":"Hello,\r\n\r\nI am using the following codes to get the timestamps of a file through python sdk:\r\n            created=client.item(drive='me',id='#####').get().createdDateTime\r\n            modified=client.item(id='#######').get().lastModifiedDateTime\r\n\r\nI keep getting the following error:\r\nTypeError: 'Item' object has no attribute '__getitem__'\r\n\r\nAccording to this page, the returned json object does have the two attributes I am looking for:\r\nhttps://dev.onedrive.com/items/get.htm\r\n\r\nAm I looking at the wrong reference?  Does making a call on item return the file metadata?  I am not sure which resource contain the file timestamp metadata.\r\n\r\nThanks in advance.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/comments/287216061","html_url":"https://github.com/OneDrive/onedrive-api-docs/issues/551#issuecomment-287216061","issue_url":"https://api.github.com/repos/OneDrive/onedrive-api-docs/issues/551","id":287216061,"user":{"login":"rgregg","id":1435771,"avatar_url":"https://avatars1.githubusercontent.com/u/1435771?v=3","gravatar_id":"","url":"https://api.github.com/users/rgregg","html_url":"https://github.com/rgregg","followers_url":"https://api.github.com/users/rgregg/followers","following_url":"https://api.github.com/users/rgregg/following{/other_user}","gists_url":"https://api.github.com/users/rgregg/gists{/gist_id}","starred_url":"https://api.github.com/users/rgregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgregg/subscriptions","organizations_url":"https://api.github.com/users/rgregg/orgs","repos_url":"https://api.github.com/users/rgregg/repos","events_url":"https://api.github.com/users/rgregg/events{/privacy}","received_events_url":"https://api.github.com/users/rgregg/received_events","type":"User","site_admin":false},"created_at":"2017-03-16T22:52:56Z","updated_at":"2017-03-16T22:52:56Z","body":"The property names in the python SDK are a little different, they are mapped to standard python naming conventions. For createdDateTime, you would use `created_date_time` instead of `createdDateTime`.\r\n\r\ndrive='me' means the signed in user's drive. If you have a drive_id value from the file picker, you can use that instead. Since the file picker currently only supports opening files from the sign in user's drive, 'me' is OK to use as well.\r\n\r\n[Per the documentation](https://github.com/onedrive/onedrive-sdk-python), onedrivesdk.Item() is the class that represents an item."}}
{"actor":{"display_login":"rgregg"}}