{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-sdk-py/issues/33","labels_url":"https://api.github.com/repos/mapbox/mapbox-sdk-py/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-sdk-py/issues/33/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-sdk-py/issues/33/events","html_url":"https://github.com/mapbox/mapbox-sdk-py/issues/33","id":112505452,"number":33,"title":"Review github3.py","user":{"login":"sgillies","id":33697,"avatar_url":"https://avatars.githubusercontent.com/u/33697?v=3","gravatar_id":"","url":"https://api.github.com/users/sgillies","html_url":"https://github.com/sgillies","followers_url":"https://api.github.com/users/sgillies/followers","following_url":"https://api.github.com/users/sgillies/following{/other_user}","gists_url":"https://api.github.com/users/sgillies/gists{/gist_id}","starred_url":"https://api.github.com/users/sgillies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgillies/subscriptions","organizations_url":"https://api.github.com/users/sgillies/orgs","repos_url":"https://api.github.com/users/sgillies/repos","events_url":"https://api.github.com/users/sgillies/events{/privacy}","received_events_url":"https://api.github.com/users/sgillies/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-21T03:34:20Z","updated_at":"2015-10-21T14:43:24Z","closed_at":null,"body":"Ian Cordasco's https://github.com/sigmavirus24/github3.py has some cool features and the Python community likes it. We should review and consider its model.\r\n\r\nParticularly interesting is its `login` pattern\r\n\r\n```python\r\nfrom github3 import login\r\n\r\ng = login(user, password)\r\n```\r\n\r\nand the example of updating a user in two difference ways at https://github3py.readthedocs.org/en/master/examples/github.html#changing-your-user-information. One less resource-oriented:\r\n\r\n```python\r\nnew_name = 'J. Smith'\r\nblog = 'http://www.example.com/'\r\ncompany = 'Vandelay Industries'\r\nbio = \"\"\"# J. Smith\r\n\r\nA simple man working at a latex factory\r\n\"\"\"\r\n\r\nif g.update_user(new_name, blog, company, bio=bio):\r\n    print('Profile updated.')\r\n```\r\n\r\nand one more resource-oriented:\r\n\r\n```python\r\nme = g.user()\r\nif me.update(new_name, blog, company, bio=bio):\r\n    print('Profile updated.')\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-sdk-py/issues/comments/149918380","html_url":"https://github.com/mapbox/mapbox-sdk-py/issues/33#issuecomment-149918380","issue_url":"https://api.github.com/repos/mapbox/mapbox-sdk-py/issues/33","id":149918380,"user":{"login":"sgillies","id":33697,"avatar_url":"https://avatars.githubusercontent.com/u/33697?v=3","gravatar_id":"","url":"https://api.github.com/users/sgillies","html_url":"https://github.com/sgillies","followers_url":"https://api.github.com/users/sgillies/followers","following_url":"https://api.github.com/users/sgillies/following{/other_user}","gists_url":"https://api.github.com/users/sgillies/gists{/gist_id}","starred_url":"https://api.github.com/users/sgillies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgillies/subscriptions","organizations_url":"https://api.github.com/users/sgillies/orgs","repos_url":"https://api.github.com/users/sgillies/repos","events_url":"https://api.github.com/users/sgillies/events{/privacy}","received_events_url":"https://api.github.com/users/sgillies/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T14:43:24Z","updated_at":"2015-10-21T14:43:24Z","body":"The Mapbox javascript SDK is a lot more like github3py than the Python one is: a single API endpoint object with many methods spanning all the GitHub resources. And the network is hidden. After considering this last night, I'm open to making the Python SDK more like this and less of a special snowflake.\r\n\r\nOne big difference between GitHub and Mapbox is that the former's API is versioned as a single thing and the latter has multiple APIs versioned separately with varying degree of integration between them. That's what has motivated me to create different service classes (Geocoder, Datasets, etc).\r\n\r\n"}}