Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/github/IssueEvent.py @ 0:d67268158946 draft
planemo upload commit a3f181f5f126803c654b3a66dd4e83a48f7e203b
| author | bcclaywell |
|---|---|
| date | Mon, 12 Oct 2015 17:43:33 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:d67268158946 |
|---|---|
| 1 # -*- coding: utf-8 -*- | |
| 2 | |
| 3 # ########################## Copyrights and license ############################ | |
| 4 # # | |
| 5 # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # | |
| 6 # Copyright 2012 Zearin <zearin@gonk.net> # | |
| 7 # Copyright 2013 AKFish <akfish@gmail.com> # | |
| 8 # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # | |
| 9 # # | |
| 10 # This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ # | |
| 11 # # | |
| 12 # PyGithub is free software: you can redistribute it and/or modify it under # | |
| 13 # the terms of the GNU Lesser General Public License as published by the Free # | |
| 14 # Software Foundation, either version 3 of the License, or (at your option) # | |
| 15 # any later version. # | |
| 16 # # | |
| 17 # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # | |
| 18 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # | |
| 19 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # | |
| 20 # details. # | |
| 21 # # | |
| 22 # You should have received a copy of the GNU Lesser General Public License # | |
| 23 # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. # | |
| 24 # # | |
| 25 # ############################################################################## | |
| 26 | |
| 27 import github.GithubObject | |
| 28 | |
| 29 import github.Issue | |
| 30 import github.NamedUser | |
| 31 | |
| 32 | |
| 33 class IssueEvent(github.GithubObject.CompletableGithubObject): | |
| 34 """ | |
| 35 This class represents IssueEvents as returned for example by http://developer.github.com/v3/todo | |
| 36 """ | |
| 37 | |
| 38 @property | |
| 39 def actor(self): | |
| 40 """ | |
| 41 :type: :class:`github.NamedUser.NamedUser` | |
| 42 """ | |
| 43 self._completeIfNotSet(self._actor) | |
| 44 return self._actor.value | |
| 45 | |
| 46 @property | |
| 47 def commit_id(self): | |
| 48 """ | |
| 49 :type: string | |
| 50 """ | |
| 51 self._completeIfNotSet(self._commit_id) | |
| 52 return self._commit_id.value | |
| 53 | |
| 54 @property | |
| 55 def created_at(self): | |
| 56 """ | |
| 57 :type: datetime.datetime | |
| 58 """ | |
| 59 self._completeIfNotSet(self._created_at) | |
| 60 return self._created_at.value | |
| 61 | |
| 62 @property | |
| 63 def event(self): | |
| 64 """ | |
| 65 :type: string | |
| 66 """ | |
| 67 self._completeIfNotSet(self._event) | |
| 68 return self._event.value | |
| 69 | |
| 70 @property | |
| 71 def id(self): | |
| 72 """ | |
| 73 :type: integer | |
| 74 """ | |
| 75 self._completeIfNotSet(self._id) | |
| 76 return self._id.value | |
| 77 | |
| 78 @property | |
| 79 def issue(self): | |
| 80 """ | |
| 81 :type: :class:`github.Issue.Issue` | |
| 82 """ | |
| 83 self._completeIfNotSet(self._issue) | |
| 84 return self._issue.value | |
| 85 | |
| 86 @property | |
| 87 def url(self): | |
| 88 """ | |
| 89 :type: string | |
| 90 """ | |
| 91 self._completeIfNotSet(self._url) | |
| 92 return self._url.value | |
| 93 | |
| 94 def _initAttributes(self): | |
| 95 self._actor = github.GithubObject.NotSet | |
| 96 self._commit_id = github.GithubObject.NotSet | |
| 97 self._created_at = github.GithubObject.NotSet | |
| 98 self._event = github.GithubObject.NotSet | |
| 99 self._id = github.GithubObject.NotSet | |
| 100 self._issue = github.GithubObject.NotSet | |
| 101 self._url = github.GithubObject.NotSet | |
| 102 | |
| 103 def _useAttributes(self, attributes): | |
| 104 if "actor" in attributes: # pragma no branch | |
| 105 self._actor = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["actor"]) | |
| 106 if "commit_id" in attributes: # pragma no branch | |
| 107 self._commit_id = self._makeStringAttribute(attributes["commit_id"]) | |
| 108 if "created_at" in attributes: # pragma no branch | |
| 109 self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) | |
| 110 if "event" in attributes: # pragma no branch | |
| 111 self._event = self._makeStringAttribute(attributes["event"]) | |
| 112 if "id" in attributes: # pragma no branch | |
| 113 self._id = self._makeIntAttribute(attributes["id"]) | |
| 114 if "issue" in attributes: # pragma no branch | |
| 115 self._issue = self._makeClassAttribute(github.Issue.Issue, attributes["issue"]) | |
| 116 if "url" in attributes: # pragma no branch | |
| 117 self._url = self._makeStringAttribute(attributes["url"]) |
