Beispiel #1
0
 def get_hooks(self):
     headers, data = self.__requester.requestAndCheck(
         "GET", "/hooks", None, None)
     return [
         HookDescription.HookDescription(self.__requester,
                                         attributes,
                                         completed=True)
         for attributes in data
     ]
Beispiel #2
0
 def get_hooks(self):
     """
     :calls: `GET /hooks <http://developer.github.com/v3/repos/hooks/>`_
     :rtype: list of :class:`github.HookDescription.HookDescription`
     """
     headers, data = self.__requester.requestJsonAndCheck(
         "GET",
         "/hooks"
     )
     return [HookDescription.HookDescription(self.__requester, headers, attributes, completed=True) for attributes in data]
Beispiel #3
0
 def get_hook(self, name):
     """
     :calls: `GET /hooks/:name <http://developer.github.com/v3/repos/hooks/>`_
     :param name: string
     :rtype: :class:`github.HookDescription.HookDescription`
     """
     assert isinstance(name, (str, unicode)), name
     headers, attributes = self.__requester.requestJsonAndCheck(
         "GET",
         "/hooks/" + name
     )
     return HookDescription.HookDescription(self.__requester, headers, attributes, completed=True)
Beispiel #4
0
 def get_hooks(self):
     """
     :calls: `GET /hooks <http://developer.github.com/v3/todo>`_
     :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.HookDescription.HookDescription`
     """
     headers, data = self.__requester.requestJsonAndCheck(
         "GET",
         "/hooks",
         None,
         None
     )
     return [HookDescription.HookDescription(self.__requester, attributes, completed=True) for attributes in data]