MCPcopy
hub / github.com/donnemartin/gitsome / set_subscription

Method set_subscription

gitsome/lib/github3/notifications.py:81–93  ·  view source on GitHub ↗

Set the user's subscription for this thread :param bool subscribed: (required), determines if notifications should be received from this thread. :param bool ignored: (required), determines if notifications should be ignored from this thread. :returns:

(self, subscribed, ignored)

Source from the content-addressed store, hash-verified

79 return self._boolean(self._patch(self._api), 205, 404)
80
81 def set_subscription(self, subscribed, ignored):
82 """Set the user's subscription for this thread
83
84 :param bool subscribed: (required), determines if notifications should
85 be received from this thread.
86 :param bool ignored: (required), determines if notifications should be
87 ignored from this thread.
88 :returns: :class:`Subscription <Subscription>`
89 """
90 url = self._build_url('subscription', base_url=self._api)
91 sub = {'subscribed': subscribed, 'ignored': ignored}
92 json = self._json(self._put(url, data=dumps(sub)), 200)
93 return self._instance_or_null(Subscription, json)
94
95 def subscription(self):
96 """Checks the status of the user&#x27;s subscription to this thread.

Callers

nothing calls this directly

Calls 5

dumpsFunction · 0.90
_build_urlMethod · 0.80
_jsonMethod · 0.80
_putMethod · 0.80
_instance_or_nullMethod · 0.80

Tested by

no test coverage detected