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