GitHub PullRequestReviewCommentEvent at 2014-07-30 15:29:03
Repository: crits
Actor: mgoffin
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/crits/crits/pulls/comments/15591092","id":15591092,"diff_hunk":"@@ -0,0 +1,97 @@\n+from tastypie import authorization\n+from tastypie.authentication import MultiAuthentication\n+from tastypie.exceptions import BadRequest\n+\n+from crits.standards.handlers import import_standards_doc\n+from crits.core.api import CRITsApiKeyAuthentication, CRITsSessionAuthentication\n+from crits.core.api import CRITsSerializer, CRITsAPIResource\n+import logging\n+import pickle\n+\n+\n+\n+\n+class StandardsResource(CRITsAPIResource):\n+    \"\"\"\n+    Class to handle everything related to the Email API.\n+\n+    Currently supports GET and POST.\n+    \"\"\"\n+\n+    class Meta:\n+        #queryset = Email.objects.all()\n+        #allowed_methods = ('get', 'post')\n+        allowed_methods = ( 'post')\n+        resource_name = \"standards\"\n+        authentication = MultiAuthentication(CRITsApiKeyAuthentication(),\n+                                             CRITsSessionAuthentication())\n+        authorization = authorization.Authorization()\n+        serializer = CRITsSerializer()\n+\n+\n+   \n+\n+# SAB  No get for this rount\n+\n+    def get_object_list(self, request):\n+        \"\"\"\n+        Use the CRITsAPIResource to get our objects but provide the class to get\n+        the objects from.\n+\n+        :param request: The incoming request.\n+        :type request: :class:`django.http.HttpRequest`\n+        :returns: Resulting objects in the specified format (JSON by default).\n+        \"\"\"\n+\n+        return None\n+#        return super(StandardsResource, self).get_object_list(request, None)\n+\n+    def obj_create(self, bundle, **kwargs):\n+        \"\"\"\n+        Handles creating STIX documents through the API.\n+\n+        :param bundle: Bundle containing the information to create the Campaign.","path":"crits/standards/api.py","position":53,"original_position":53,"commit_id":"0bbe7ea7f41c974b83982df91fb41c7a9435572d","original_commit_id":"0bbe7ea7f41c974b83982df91fb41c7a9435572d","user":{"login":"mgoffin","id":260873,"avatar_url":"https://avatars.githubusercontent.com/u/260873?v=1","gravatar_id":"7a4e15ed77d253e21e1436f881ae4993","url":"https://api.github.com/users/mgoffin","html_url":"https://github.com/mgoffin","followers_url":"https://api.github.com/users/mgoffin/followers","following_url":"https://api.github.com/users/mgoffin/following{/other_user}","gists_url":"https://api.github.com/users/mgoffin/gists{/gist_id}","starred_url":"https://api.github.com/users/mgoffin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgoffin/subscriptions","organizations_url":"https://api.github.com/users/mgoffin/orgs","repos_url":"https://api.github.com/users/mgoffin/repos","events_url":"https://api.github.com/users/mgoffin/events{/privacy}","received_events_url":"https://api.github.com/users/mgoffin/received_events","type":"User","site_admin":false},"body":"\"Campaign\" should be changed to something more appropriate.","created_at":"2014-07-30T15:29:03Z","updated_at":"2014-07-30T15:29:03Z","html_url":"https://github.com/crits/crits/pull/167#discussion_r15591092","pull_request_url":"https://api.github.com/repos/crits/crits/pulls/167","_links":{"self":{"href":"https://api.github.com/repos/crits/crits/pulls/comments/15591092"},"html":{"href":"https://github.com/crits/crits/pull/167#discussion_r15591092"},"pull_request":{"href":"https://api.github.com/repos/crits/crits/pulls/167"}}},"pull_request":{"url":"https://api.github.com/repos/crits/crits/pulls/167","id":19095839,"html_url":"https://github.com/crits/crits/pull/167","diff_url":"https://github.com/crits/crits/pull/167.diff","patch_url":"https://github.com/crits/crits/pull/167.patch","issue_url":"https://api.github.com/repos/crits/crits/issues/167","number":167,"state":"open","title":"Add Standards API base function","user":{"login":"sabade","id":8311165,"avatar_url":"https://avatars.githubusercontent.com/u/8311165?v=1","gravatar_id":"6e8b578790d066e6fe33e4dcd6eb0573","url":"https://api.github.com/users/sabade","html_url":"https://github.com/sabade","followers_url":"https://api.github.com/users/sabade/followers","following_url":"https://api.github.com/users/sabade/following{/other_user}","gists_url":"https://api.github.com/users/sabade/gists{/gist_id}","starred_url":"https://api.github.com/users/sabade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabade/subscriptions","organizations_url":"https://api.github.com/users/sabade/orgs","repos_url":"https://api.github.com/users/sabade/repos","events_url":"https://api.github.com/users/sabade/events{/privacy}","received_events_url":"https://api.github.com/users/sabade/received_events","type":"User","site_admin":false},"body":"Basic API for uploading STIX documents.   API returns with an error condition, but the documents are created","created_at":"2014-07-30T15:16:38Z","updated_at":"2014-07-30T15:29:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c60ef59640ba258bad388f1b8cdc74f65dcbb0ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crits/crits/pulls/167/commits","review_comments_url":"https://api.github.com/repos/crits/crits/pulls/167/comments","review_comment_url":"https://api.github.com/repos/crits/crits/pulls/comments/{number}","comments_url":"https://api.github.com/repos/crits/crits/issues/167/comments","statuses_url":"https://api.github.com/repos/crits/crits/statuses/0bbe7ea7f41c974b83982df91fb41c7a9435572d","head":{"label":"sabade:StixApi","ref":"StixApi","sha":"0bbe7ea7f41c974b83982df91fb41c7a9435572d","user":{"login":"sabade","id":8311165,"avatar_url":"https://avatars.githubusercontent.com/u/8311165?v=1","gravatar_id":"6e8b578790d066e6fe33e4dcd6eb0573","url":"https://api.github.com/users/sabade","html_url":"https://github.com/sabade","followers_url":"https://api.github.com/users/sabade/followers","following_url":"https://api.github.com/users/sabade/following{/other_user}","gists_url":"https://api.github.com/users/sabade/gists{/gist_id}","starred_url":"https://api.github.com/users/sabade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabade/subscriptions","organizations_url":"https://api.github.com/users/sabade/orgs","repos_url":"https://api.github.com/users/sabade/repos","events_url":"https://api.github.com/users/sabade/events{/privacy}","received_events_url":"https://api.github.com/users/sabade/received_events","type":"User","site_admin":false},"repo":{"id":22432204,"name":"crits-1","full_name":"sabade/crits-1","owner":{"login":"sabade","id":8311165,"avatar_url":"https://avatars.githubusercontent.com/u/8311165?v=1","gravatar_id":"6e8b578790d066e6fe33e4dcd6eb0573","url":"https://api.github.com/users/sabade","html_url":"https://github.com/sabade","followers_url":"https://api.github.com/users/sabade/followers","following_url":"https://api.github.com/users/sabade/following{/other_user}","gists_url":"https://api.github.com/users/sabade/gists{/gist_id}","starred_url":"https://api.github.com/users/sabade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabade/subscriptions","organizations_url":"https://api.github.com/users/sabade/orgs","repos_url":"https://api.github.com/users/sabade/repos","events_url":"https://api.github.com/users/sabade/events{/privacy}","received_events_url":"https://api.github.com/users/sabade/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sabade/crits-1","description":"CRITs - Collaborative Research Into Threats","fork":true,"url":"https://api.github.com/repos/sabade/crits-1","forks_url":"https://api.github.com/repos/sabade/crits-1/forks","keys_url":"https://api.github.com/repos/sabade/crits-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sabade/crits-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sabade/crits-1/teams","hooks_url":"https://api.github.com/repos/sabade/crits-1/hooks","issue_events_url":"https://api.github.com/repos/sabade/crits-1/issues/events{/number}","events_url":"https://api.github.com/repos/sabade/crits-1/events","assignees_url":"https://api.github.com/repos/sabade/crits-1/assignees{/user}","branches_url":"https://api.github.com/repos/sabade/crits-1/branches{/branch}","tags_url":"https://api.github.com/repos/sabade/crits-1/tags","blobs_url":"https://api.github.com/repos/sabade/crits-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sabade/crits-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sabade/crits-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/sabade/crits-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sabade/crits-1/statuses/{sha}","languages_url":"https://api.github.com/repos/sabade/crits-1/languages","stargazers_url":"https://api.github.com/repos/sabade/crits-1/stargazers","contributors_url":"https://api.github.com/repos/sabade/crits-1/contributors","subscribers_url":"https://api.github.com/repos/sabade/crits-1/subscribers","subscription_url":"https://api.github.com/repos/sabade/crits-1/subscription","commits_url":"https://api.github.com/repos/sabade/crits-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/sabade/crits-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/sabade/crits-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/sabade/crits-1/issues/comments/{number}","contents_url":"https://api.github.com/repos/sabade/crits-1/contents/{+path}","compare_url":"https://api.github.com/repos/sabade/crits-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sabade/crits-1/merges","archive_url":"https://api.github.com/repos/sabade/crits-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sabade/crits-1/downloads","issues_url":"https://api.github.com/repos/sabade/crits-1/issues{/number}","pulls_url":"https://api.github.com/repos/sabade/crits-1/pulls{/number}","milestones_url":"https://api.github.com/repos/sabade/crits-1/milestones{/number}","notifications_url":"https://api.github.com/repos/sabade/crits-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sabade/crits-1/labels{/name}","releases_url":"https://api.github.com/repos/sabade/crits-1/releases{/id}","created_at":"2014-07-30T14:56:26Z","updated_at":"2014-07-29T23:13:54Z","pushed_at":"2014-07-30T15:12:50Z","git_url":"git://github.com/sabade/crits-1.git","ssh_url":"git@github.com:sabade/crits-1.git","clone_url":"https://github.com/sabade/crits-1.git","svn_url":"https://github.com/sabade/crits-1","homepage":null,"size":7000,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"crits:master","ref":"master","sha":"619a0f8e74c3d4032d397d8a3739c45dfac5606c","user":{"login":"crits","id":5392624,"avatar_url":"https://avatars.githubusercontent.com/u/5392624?v=1","gravatar_id":"31f74a3c5211c81cc84c6864ff3e9585","url":"https://api.github.com/users/crits","html_url":"https://github.com/crits","followers_url":"https://api.github.com/users/crits/followers","following_url":"https://api.github.com/users/crits/following{/other_user}","gists_url":"https://api.github.com/users/crits/gists{/gist_id}","starred_url":"https://api.github.com/users/crits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crits/subscriptions","organizations_url":"https://api.github.com/users/crits/orgs","repos_url":"https://api.github.com/users/crits/repos","events_url":"https://api.github.com/users/crits/events{/privacy}","received_events_url":"https://api.github.com/users/crits/received_events","type":"Organization","site_admin":false},"repo":{"id":18814466,"name":"crits","full_name":"crits/crits","owner":{"login":"crits","id":5392624,"avatar_url":"https://avatars.githubusercontent.com/u/5392624?v=1","gravatar_id":"31f74a3c5211c81cc84c6864ff3e9585","url":"https://api.github.com/users/crits","html_url":"https://github.com/crits","followers_url":"https://api.github.com/users/crits/followers","following_url":"https://api.github.com/users/crits/following{/other_user}","gists_url":"https://api.github.com/users/crits/gists{/gist_id}","starred_url":"https://api.github.com/users/crits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crits/subscriptions","organizations_url":"https://api.github.com/users/crits/orgs","repos_url":"https://api.github.com/users/crits/repos","events_url":"https://api.github.com/users/crits/events{/privacy}","received_events_url":"https://api.github.com/users/crits/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crits/crits","description":"CRITs - Collaborative Research Into Threats","fork":false,"url":"https://api.github.com/repos/crits/crits","forks_url":"https://api.github.com/repos/crits/crits/forks","keys_url":"https://api.github.com/repos/crits/crits/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crits/crits/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crits/crits/teams","hooks_url":"https://api.github.com/repos/crits/crits/hooks","issue_events_url":"https://api.github.com/repos/crits/crits/issues/events{/number}","events_url":"https://api.github.com/repos/crits/crits/events","assignees_url":"https://api.github.com/repos/crits/crits/assignees{/user}","branches_url":"https://api.github.com/repos/crits/crits/branches{/branch}","tags_url":"https://api.github.com/repos/crits/crits/tags","blobs_url":"https://api.github.com/repos/crits/crits/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crits/crits/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crits/crits/git/refs{/sha}","trees_url":"https://api.github.com/repos/crits/crits/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crits/crits/statuses/{sha}","languages_url":"https://api.github.com/repos/crits/crits/languages","stargazers_url":"https://api.github.com/repos/crits/crits/stargazers","contributors_url":"https://api.github.com/repos/crits/crits/contributors","subscribers_url":"https://api.github.com/repos/crits/crits/subscribers","subscription_url":"https://api.github.com/repos/crits/crits/subscription","commits_url":"https://api.github.com/repos/crits/crits/commits{/sha}","git_commits_url":"https://api.github.com/repos/crits/crits/git/commits{/sha}","comments_url":"https://api.github.com/repos/crits/crits/comments{/number}","issue_comment_url":"https://api.github.com/repos/crits/crits/issues/comments/{number}","contents_url":"https://api.github.com/repos/crits/crits/contents/{+path}","compare_url":"https://api.github.com/repos/crits/crits/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crits/crits/merges","archive_url":"https://api.github.com/repos/crits/crits/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crits/crits/downloads","issues_url":"https://api.github.com/repos/crits/crits/issues{/number}","pulls_url":"https://api.github.com/repos/crits/crits/pulls{/number}","milestones_url":"https://api.github.com/repos/crits/crits/milestones{/number}","notifications_url":"https://api.github.com/repos/crits/crits/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crits/crits/labels{/name}","releases_url":"https://api.github.com/repos/crits/crits/releases{/id}","created_at":"2014-04-15T20:19:22Z","updated_at":"2014-07-29T23:13:54Z","pushed_at":"2014-07-30T14:20:51Z","git_url":"git://github.com/crits/crits.git","ssh_url":"git@github.com:crits/crits.git","clone_url":"https://github.com/crits/crits.git","svn_url":"https://github.com/crits/crits","homepage":null,"size":7000,"stargazers_count":81,"watchers_count":81,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":23,"mirror_url":null,"open_issues_count":109,"forks":23,"open_issues":109,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crits/crits/pulls/167"},"html":{"href":"https://github.com/crits/crits/pull/167"},"issue":{"href":"https://api.github.com/repos/crits/crits/issues/167"},"comments":{"href":"https://api.github.com/repos/crits/crits/issues/167/comments"},"review_comments":{"href":"https://api.github.com/repos/crits/crits/pulls/167/comments"},"review_comment":{"href":"https://api.github.com/repos/crits/crits/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/crits/crits/pulls/167/commits"},"statuses":{"href":"https://api.github.com/repos/crits/crits/statuses/0bbe7ea7f41c974b83982df91fb41c7a9435572d"}}}}