{"action":"created","comment":{"url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/comments/48106888","id":48106888,"diff_hunk":"@@ -0,0 +1,105 @@\n+import requests\n+import json\n+import base64\n+import datetime\n+\n+from mnubo.models import AccessToken\n+\n+\n+def authenticate(func):\n+    def authenticate_and_call(*args):\n+        if not args[0].access_token.is_valid():\n+            args[0].access_token = args[0].fetch_access_token()\n+        return func(*args)\n+    return authenticate_and_call\n+\n+\n+class APIManager(object):","path":"mnubo/api_manager.py","position":17,"original_position":17,"commit_id":"ea3aa942ffac121ed114fc4e2e05ab6cd71913b2","original_commit_id":"ea3aa942ffac121ed114fc4e2e05ab6cd71913b2","user":{"login":"paquetgp","id":10522276,"avatar_url":"https://avatars.githubusercontent.com/u/10522276?v=3","gravatar_id":"","url":"https://api.github.com/users/paquetgp","html_url":"https://github.com/paquetgp","followers_url":"https://api.github.com/users/paquetgp/followers","following_url":"https://api.github.com/users/paquetgp/following{/other_user}","gists_url":"https://api.github.com/users/paquetgp/gists{/gist_id}","starred_url":"https://api.github.com/users/paquetgp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paquetgp/subscriptions","organizations_url":"https://api.github.com/users/paquetgp/orgs","repos_url":"https://api.github.com/users/paquetgp/repos","events_url":"https://api.github.com/users/paquetgp/events{/privacy}","received_events_url":"https://api.github.com/users/paquetgp/received_events","type":"User","site_admin":false},"body":"When would the GET be needed?","created_at":"2015-12-20T19:05:06Z","updated_at":"2015-12-20T19:05:06Z","html_url":"https://github.com/mnubo/mnubo-python-sdk/pull/1#discussion_r48106888","pull_request_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/comments/48106888"},"html":{"href":"https://github.com/mnubo/mnubo-python-sdk/pull/1#discussion_r48106888"},"pull_request":{"href":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/1","id":53914274,"html_url":"https://github.com/mnubo/mnubo-python-sdk/pull/1","diff_url":"https://github.com/mnubo/mnubo-python-sdk/pull/1.diff","patch_url":"https://github.com/mnubo/mnubo-python-sdk/pull/1.patch","issue_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues/1","number":1,"state":"open","locked":false,"title":"Basic sdk features by @gpaquet","user":{"login":"daddykotex","id":5230460,"avatar_url":"https://avatars.githubusercontent.com/u/5230460?v=3","gravatar_id":"","url":"https://api.github.com/users/daddykotex","html_url":"https://github.com/daddykotex","followers_url":"https://api.github.com/users/daddykotex/followers","following_url":"https://api.github.com/users/daddykotex/following{/other_user}","gists_url":"https://api.github.com/users/daddykotex/gists{/gist_id}","starred_url":"https://api.github.com/users/daddykotex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daddykotex/subscriptions","organizations_url":"https://api.github.com/users/daddykotex/orgs","repos_url":"https://api.github.com/users/daddykotex/repos","events_url":"https://api.github.com/users/daddykotex/events{/privacy}","received_events_url":"https://api.github.com/users/daddykotex/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-16T23:27:27Z","updated_at":"2015-12-20T19:05:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"daaf24078355e6251b060d2a38f699e3b727bc41","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/1/comments","review_comment_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues/1/comments","statuses_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/statuses/ea3aa942ffac121ed114fc4e2e05ab6cd71913b2","head":{"label":"mnubo:develop","ref":"develop","sha":"ea3aa942ffac121ed114fc4e2e05ab6cd71913b2","user":{"login":"mnubo","id":7773027,"avatar_url":"https://avatars.githubusercontent.com/u/7773027?v=3","gravatar_id":"","url":"https://api.github.com/users/mnubo","html_url":"https://github.com/mnubo","followers_url":"https://api.github.com/users/mnubo/followers","following_url":"https://api.github.com/users/mnubo/following{/other_user}","gists_url":"https://api.github.com/users/mnubo/gists{/gist_id}","starred_url":"https://api.github.com/users/mnubo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnubo/subscriptions","organizations_url":"https://api.github.com/users/mnubo/orgs","repos_url":"https://api.github.com/users/mnubo/repos","events_url":"https://api.github.com/users/mnubo/events{/privacy}","received_events_url":"https://api.github.com/users/mnubo/received_events","type":"Organization","site_admin":false},"repo":{"id":44984043,"name":"mnubo-python-sdk","full_name":"mnubo/mnubo-python-sdk","owner":{"login":"mnubo","id":7773027,"avatar_url":"https://avatars.githubusercontent.com/u/7773027?v=3","gravatar_id":"","url":"https://api.github.com/users/mnubo","html_url":"https://github.com/mnubo","followers_url":"https://api.github.com/users/mnubo/followers","following_url":"https://api.github.com/users/mnubo/following{/other_user}","gists_url":"https://api.github.com/users/mnubo/gists{/gist_id}","starred_url":"https://api.github.com/users/mnubo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnubo/subscriptions","organizations_url":"https://api.github.com/users/mnubo/orgs","repos_url":"https://api.github.com/users/mnubo/repos","events_url":"https://api.github.com/users/mnubo/events{/privacy}","received_events_url":"https://api.github.com/users/mnubo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mnubo/mnubo-python-sdk","description":"Python SDK to access mnubo ingestion APIs","fork":false,"url":"https://api.github.com/repos/mnubo/mnubo-python-sdk","forks_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/forks","keys_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/teams","hooks_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/hooks","issue_events_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/events","assignees_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/tags","blobs_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/languages","stargazers_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/stargazers","contributors_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/contributors","subscribers_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/subscribers","subscription_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/subscription","commits_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/merges","archive_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/downloads","issues_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/labels{/name}","releases_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/releases{/id}","created_at":"2015-10-26T17:03:22Z","updated_at":"2015-10-26T17:03:22Z","pushed_at":"2015-12-16T23:27:28Z","git_url":"git://github.com/mnubo/mnubo-python-sdk.git","ssh_url":"git@github.com:mnubo/mnubo-python-sdk.git","clone_url":"https://github.com/mnubo/mnubo-python-sdk.git","svn_url":"https://github.com/mnubo/mnubo-python-sdk","homepage":null,"size":13,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mnubo:master","ref":"master","sha":"ce2105cebf36bba181359b371a50bb9cce83df24","user":{"login":"mnubo","id":7773027,"avatar_url":"https://avatars.githubusercontent.com/u/7773027?v=3","gravatar_id":"","url":"https://api.github.com/users/mnubo","html_url":"https://github.com/mnubo","followers_url":"https://api.github.com/users/mnubo/followers","following_url":"https://api.github.com/users/mnubo/following{/other_user}","gists_url":"https://api.github.com/users/mnubo/gists{/gist_id}","starred_url":"https://api.github.com/users/mnubo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnubo/subscriptions","organizations_url":"https://api.github.com/users/mnubo/orgs","repos_url":"https://api.github.com/users/mnubo/repos","events_url":"https://api.github.com/users/mnubo/events{/privacy}","received_events_url":"https://api.github.com/users/mnubo/received_events","type":"Organization","site_admin":false},"repo":{"id":44984043,"name":"mnubo-python-sdk","full_name":"mnubo/mnubo-python-sdk","owner":{"login":"mnubo","id":7773027,"avatar_url":"https://avatars.githubusercontent.com/u/7773027?v=3","gravatar_id":"","url":"https://api.github.com/users/mnubo","html_url":"https://github.com/mnubo","followers_url":"https://api.github.com/users/mnubo/followers","following_url":"https://api.github.com/users/mnubo/following{/other_user}","gists_url":"https://api.github.com/users/mnubo/gists{/gist_id}","starred_url":"https://api.github.com/users/mnubo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnubo/subscriptions","organizations_url":"https://api.github.com/users/mnubo/orgs","repos_url":"https://api.github.com/users/mnubo/repos","events_url":"https://api.github.com/users/mnubo/events{/privacy}","received_events_url":"https://api.github.com/users/mnubo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mnubo/mnubo-python-sdk","description":"Python SDK to access mnubo ingestion APIs","fork":false,"url":"https://api.github.com/repos/mnubo/mnubo-python-sdk","forks_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/forks","keys_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/teams","hooks_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/hooks","issue_events_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/events","assignees_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/tags","blobs_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/languages","stargazers_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/stargazers","contributors_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/contributors","subscribers_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/subscribers","subscription_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/subscription","commits_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/merges","archive_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/downloads","issues_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/labels{/name}","releases_url":"https://api.github.com/repos/mnubo/mnubo-python-sdk/releases{/id}","created_at":"2015-10-26T17:03:22Z","updated_at":"2015-10-26T17:03:22Z","pushed_at":"2015-12-16T23:27:28Z","git_url":"git://github.com/mnubo/mnubo-python-sdk.git","ssh_url":"git@github.com:mnubo/mnubo-python-sdk.git","clone_url":"https://github.com/mnubo/mnubo-python-sdk.git","svn_url":"https://github.com/mnubo/mnubo-python-sdk","homepage":null,"size":13,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/1"},"html":{"href":"https://github.com/mnubo/mnubo-python-sdk/pull/1"},"issue":{"href":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues/1"},"comments":{"href":"https://api.github.com/repos/mnubo/mnubo-python-sdk/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mnubo/mnubo-python-sdk/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/mnubo/mnubo-python-sdk/statuses/ea3aa942ffac121ed114fc4e2e05ab6cd71913b2"}}}}