Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/github/NotificationSubject.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 2013 AKFish <akfish@gmail.com> # | |
6 # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # | |
7 # # | |
8 # This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ # | |
9 # # | |
10 # PyGithub is free software: you can redistribute it and/or modify it under # | |
11 # the terms of the GNU Lesser General Public License as published by the Free # | |
12 # Software Foundation, either version 3 of the License, or (at your option) # | |
13 # any later version. # | |
14 # # | |
15 # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # | |
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # | |
17 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # | |
18 # details. # | |
19 # # | |
20 # You should have received a copy of the GNU Lesser General Public License # | |
21 # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. # | |
22 # # | |
23 # ############################################################################## | |
24 | |
25 import github.GithubObject | |
26 | |
27 | |
28 class NotificationSubject(github.GithubObject.NonCompletableGithubObject): | |
29 """ | |
30 This class represents Subjects of Notifications as returned for example by http://developer.github.com/v3/activity/notifications/#list-your-notifications | |
31 """ | |
32 | |
33 @property | |
34 def title(self): | |
35 """ | |
36 :type: string | |
37 """ | |
38 return self._title.value | |
39 | |
40 @property | |
41 def url(self): | |
42 """ | |
43 :type: string | |
44 """ | |
45 return self._url.value | |
46 | |
47 @property | |
48 def latest_comment_url(self): | |
49 """ | |
50 :type: string | |
51 """ | |
52 return self._latest_comment_url.value | |
53 | |
54 @property | |
55 def type(self): | |
56 """ | |
57 :type: string | |
58 """ | |
59 return self._type.value | |
60 | |
61 def _initAttributes(self): | |
62 self._title = github.GithubObject.NotSet | |
63 self._url = github.GithubObject.NotSet | |
64 self._latest_comment_url = github.GithubObject.NotSet | |
65 self._type = github.GithubObject.NotSet | |
66 | |
67 def _useAttributes(self, attributes): | |
68 if "title" in attributes: # pragma no branch | |
69 self._title = self._makeStringAttribute(attributes["title"]) | |
70 if "url" in attributes: # pragma no branch | |
71 self._url = self._makeStringAttribute(attributes["url"]) | |
72 if "latest_comment_url" in attributes: # pragma no branch | |
73 self._latest_comment_url = self._makeStringAttribute(attributes["latest_comment_url"]) | |
74 if "type" in attributes: # pragma no branch | |
75 self._type = self._makeStringAttribute(attributes["type"]) |