{"action":"created","comment":{"url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/comments/311183448","pull_request_review_id":271499039,"id":311183448,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxMTE4MzQ0OA==","diff_hunk":"@@ -0,0 +1,65 @@\n+# -*- coding: utf-8 -*-\n+\n+# This code is part of Qiskit.\n+#\n+# (C) Copyright IBM 2017, 2018.\n+#\n+# This code is licensed under the Apache License, Version 2.0. You may\n+# obtain a copy of this license in the LICENSE.txt file in the root directory\n+# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n+#\n+# Any modifications or derivative works of this code must retain this\n+# copyright notice, and modified files need to carry a notice indicating\n+# that they have been altered from the originals.\n+\n+\"\"\"Model and schema for authentication.\"\"\"\n+from marshmallow.fields import String, Url, Dict\n+from qiskit.validation import BaseSchema, bind_schema, BaseModel\n+\n+\n+class TokenSchema(BaseSchema):\n+    \"\"\"Schema for Token.\"\"\"\n+\n+    # Required properties.\n+    token_id = String('id', required=True)\n+\n+\n+@bind_schema(TokenSchema)\n+class Token(BaseModel):\n+    \"\"\"Model for Token.\n+\n+    Please note that this class only describes the required fields. For the\n+    full description of the model, please check ``TokenSchema``.\n+\n+    Attributes:\n+        token_id (str): long term access token.\n+    \"\"\"\n+\n+    def __init__(self, token_id, **kwargs):\n+        self.token_id = token_id\n+\n+        super().__init__(**kwargs)\n+\n+\n+class UserSchema(BaseSchema):\n+    \"\"\"Schema for User.\"\"\"\n+\n+    # Required properties.\n+    urls = Dict(Url(), required=True)","path":"qiskit/providers/ibmq/api_v2/rest/schemas/auth.py","position":48,"original_position":48,"commit_id":"ea3b77bdd2be4003ed1c5762dbf25960772677af","original_commit_id":"ea3b77bdd2be4003ed1c5762dbf25960772677af","user":{"login":"yeralin","id":8620461,"node_id":"MDQ6VXNlcjg2MjA0NjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8620461?v=4","gravatar_id":"","url":"https://api.github.com/users/yeralin","html_url":"https://github.com/yeralin","followers_url":"https://api.github.com/users/yeralin/followers","following_url":"https://api.github.com/users/yeralin/following{/other_user}","gists_url":"https://api.github.com/users/yeralin/gists{/gist_id}","starred_url":"https://api.github.com/users/yeralin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeralin/subscriptions","organizations_url":"https://api.github.com/users/yeralin/orgs","repos_url":"https://api.github.com/users/yeralin/repos","events_url":"https://api.github.com/users/yeralin/events{/privacy}","received_events_url":"https://api.github.com/users/yeralin/received_events","type":"User","site_admin":false},"body":"Ok, I think I found a right combination:\r\n```\r\nclass UserApiUrlResponseSchema(BaseSchema):\r\n    \"\"\"Nested schema for UserInfoResponse\"\"\"\r\n\r\n    # Required properties.\r\n    protocol = fields.String(required=True, metadata='api protocol')\r\n    url = fields.Url(required=True, metadata='URL address to the api')\r\n\r\n\r\nclass UserInfoResponseSchema(BaseSchema):\r\n    \"\"\"Schema for UserInfoResponse.\"\"\"\r\n\r\n    # Required properties.\r\n    urls = fields.Dict(fields.Nested(UserApiUrlResponseSchema), many=True, required=True,\r\n                       metadata='urls and corresponding protocols associated with APIs')\r\n```","created_at":"2019-08-06T17:27:36Z","updated_at":"2019-08-06T17:27:36Z","html_url":"https://github.com/Qiskit/qiskit-ibmq-provider/pull/295#discussion_r311183448","pull_request_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/295","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/comments/311183448"},"html":{"href":"https://github.com/Qiskit/qiskit-ibmq-provider/pull/295#discussion_r311183448"},"pull_request":{"href":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/295"}},"in_reply_to_id":311006163},"pull_request":{"url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/295","id":303933112,"node_id":"MDExOlB1bGxSZXF1ZXN0MzAzOTMzMTEy","html_url":"https://github.com/Qiskit/qiskit-ibmq-provider/pull/295","diff_url":"https://github.com/Qiskit/qiskit-ibmq-provider/pull/295.diff","patch_url":"https://github.com/Qiskit/qiskit-ibmq-provider/pull/295.patch","issue_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/issues/295","number":295,"state":"open","locked":false,"title":"Introduce initial schemas in IBMQ Provider component","user":{"login":"yeralin","id":8620461,"node_id":"MDQ6VXNlcjg2MjA0NjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8620461?v=4","gravatar_id":"","url":"https://api.github.com/users/yeralin","html_url":"https://github.com/yeralin","followers_url":"https://api.github.com/users/yeralin/followers","following_url":"https://api.github.com/users/yeralin/following{/other_user}","gists_url":"https://api.github.com/users/yeralin/gists{/gist_id}","starred_url":"https://api.github.com/users/yeralin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeralin/subscriptions","organizations_url":"https://api.github.com/users/yeralin/orgs","repos_url":"https://api.github.com/users/yeralin/repos","events_url":"https://api.github.com/users/yeralin/events{/privacy}","received_events_url":"https://api.github.com/users/yeralin/received_events","type":"User","site_admin":false},"body":"# Summary\r\nImplements #289\r\nInitial work to introduce schemas in IBMQ Provider component.\r\n\r\n### Details and comments\r\nThis PR includes first two basic schemas `User` and `Token` that is used in `qiskit.provider.ibmq.api_v2.rest.auth` package.\r\n\r\n\r\n","created_at":"2019-08-02T21:18:01Z","updated_at":"2019-08-06T17:27:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82710d37f3c48bd08f96f2fae2fa15f4a19025de","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/295/commits","review_comments_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/295/comments","review_comment_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/issues/295/comments","statuses_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/statuses/ea3b77bdd2be4003ed1c5762dbf25960772677af","head":{"label":"yeralin:introduce-schema","ref":"introduce-schema","sha":"ea3b77bdd2be4003ed1c5762dbf25960772677af","user":{"login":"yeralin","id":8620461,"node_id":"MDQ6VXNlcjg2MjA0NjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8620461?v=4","gravatar_id":"","url":"https://api.github.com/users/yeralin","html_url":"https://github.com/yeralin","followers_url":"https://api.github.com/users/yeralin/followers","following_url":"https://api.github.com/users/yeralin/following{/other_user}","gists_url":"https://api.github.com/users/yeralin/gists{/gist_id}","starred_url":"https://api.github.com/users/yeralin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeralin/subscriptions","organizations_url":"https://api.github.com/users/yeralin/orgs","repos_url":"https://api.github.com/users/yeralin/repos","events_url":"https://api.github.com/users/yeralin/events{/privacy}","received_events_url":"https://api.github.com/users/yeralin/received_events","type":"User","site_admin":false},"repo":{"id":199462127,"node_id":"MDEwOlJlcG9zaXRvcnkxOTk0NjIxMjc=","name":"qiskit-ibmq-provider","full_name":"yeralin/qiskit-ibmq-provider","private":false,"owner":{"login":"yeralin","id":8620461,"node_id":"MDQ6VXNlcjg2MjA0NjE=","avatar_url":"https://avatars1.githubusercontent.com/u/8620461?v=4","gravatar_id":"","url":"https://api.github.com/users/yeralin","html_url":"https://github.com/yeralin","followers_url":"https://api.github.com/users/yeralin/followers","following_url":"https://api.github.com/users/yeralin/following{/other_user}","gists_url":"https://api.github.com/users/yeralin/gists{/gist_id}","starred_url":"https://api.github.com/users/yeralin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeralin/subscriptions","organizations_url":"https://api.github.com/users/yeralin/orgs","repos_url":"https://api.github.com/users/yeralin/repos","events_url":"https://api.github.com/users/yeralin/events{/privacy}","received_events_url":"https://api.github.com/users/yeralin/received_events","type":"User","site_admin":false},"html_url":"https://github.com/yeralin/qiskit-ibmq-provider","description":"Qiskit Provider for accessing the quantum devices and simulators at IBMQ","fork":true,"url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider","forks_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/forks","keys_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/teams","hooks_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/hooks","issue_events_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/issues/events{/number}","events_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/events","assignees_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/assignees{/user}","branches_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/branches{/branch}","tags_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/tags","blobs_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/languages","stargazers_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/stargazers","contributors_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/contributors","subscribers_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/subscribers","subscription_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/subscription","commits_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/contents/{+path}","compare_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/merges","archive_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/downloads","issues_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/issues{/number}","pulls_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/labels{/name}","releases_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/releases{/id}","deployments_url":"https://api.github.com/repos/yeralin/qiskit-ibmq-provider/deployments","created_at":"2019-07-29T13:50:28Z","updated_at":"2019-08-02T21:31:27Z","pushed_at":"2019-08-05T17:35:10Z","git_url":"git://github.com/yeralin/qiskit-ibmq-provider.git","ssh_url":"git@github.com:yeralin/qiskit-ibmq-provider.git","clone_url":"https://github.com/yeralin/qiskit-ibmq-provider.git","svn_url":"https://github.com/yeralin/qiskit-ibmq-provider","homepage":"","size":546,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Qiskit:master","ref":"master","sha":"fc72f4536dde218a018d19aa84f89a60ca948d1d","user":{"login":"Qiskit","id":30696987,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjk2OTg3","avatar_url":"https://avatars1.githubusercontent.com/u/30696987?v=4","gravatar_id":"","url":"https://api.github.com/users/Qiskit","html_url":"https://github.com/Qiskit","followers_url":"https://api.github.com/users/Qiskit/followers","following_url":"https://api.github.com/users/Qiskit/following{/other_user}","gists_url":"https://api.github.com/users/Qiskit/gists{/gist_id}","starred_url":"https://api.github.com/users/Qiskit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qiskit/subscriptions","organizations_url":"https://api.github.com/users/Qiskit/orgs","repos_url":"https://api.github.com/users/Qiskit/repos","events_url":"https://api.github.com/users/Qiskit/events{/privacy}","received_events_url":"https://api.github.com/users/Qiskit/received_events","type":"Organization","site_admin":false},"repo":{"id":163192893,"node_id":"MDEwOlJlcG9zaXRvcnkxNjMxOTI4OTM=","name":"qiskit-ibmq-provider","full_name":"Qiskit/qiskit-ibmq-provider","private":false,"owner":{"login":"Qiskit","id":30696987,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjk2OTg3","avatar_url":"https://avatars1.githubusercontent.com/u/30696987?v=4","gravatar_id":"","url":"https://api.github.com/users/Qiskit","html_url":"https://github.com/Qiskit","followers_url":"https://api.github.com/users/Qiskit/followers","following_url":"https://api.github.com/users/Qiskit/following{/other_user}","gists_url":"https://api.github.com/users/Qiskit/gists{/gist_id}","starred_url":"https://api.github.com/users/Qiskit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qiskit/subscriptions","organizations_url":"https://api.github.com/users/Qiskit/orgs","repos_url":"https://api.github.com/users/Qiskit/repos","events_url":"https://api.github.com/users/Qiskit/events{/privacy}","received_events_url":"https://api.github.com/users/Qiskit/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Qiskit/qiskit-ibmq-provider","description":"Qiskit Provider for accessing the quantum devices and simulators at IBMQ","fork":false,"url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider","forks_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/forks","keys_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/teams","hooks_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/hooks","issue_events_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/issues/events{/number}","events_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/events","assignees_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/assignees{/user}","branches_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/branches{/branch}","tags_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/tags","blobs_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/languages","stargazers_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/stargazers","contributors_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/contributors","subscribers_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/subscribers","subscription_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/subscription","commits_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/contents/{+path}","compare_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/merges","archive_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/downloads","issues_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/issues{/number}","pulls_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/labels{/name}","releases_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/releases{/id}","deployments_url":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/deployments","created_at":"2018-12-26T15:22:11Z","updated_at":"2019-08-06T07:23:12Z","pushed_at":"2019-08-06T14:05:38Z","git_url":"git://github.com/Qiskit/qiskit-ibmq-provider.git","ssh_url":"git@github.com:Qiskit/qiskit-ibmq-provider.git","clone_url":"https://github.com/Qiskit/qiskit-ibmq-provider.git","svn_url":"https://github.com/Qiskit/qiskit-ibmq-provider","homepage":"","size":512,"stargazers_count":28,"watchers_count":28,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":36,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":31,"open_issues":36,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/295"},"html":{"href":"https://github.com/Qiskit/qiskit-ibmq-provider/pull/295"},"issue":{"href":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/issues/295"},"comments":{"href":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/issues/295/comments"},"review_comments":{"href":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/295/comments"},"review_comment":{"href":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/pulls/295/commits"},"statuses":{"href":"https://api.github.com/repos/Qiskit/qiskit-ibmq-provider/statuses/ea3b77bdd2be4003ed1c5762dbf25960772677af"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"yeralin"}}