Muting / Hide Reblogs changes
This commit is contained in:
pare
1a6293db44
commit
da859de457
S'han modificat 2 arxius amb 20 adicions i 6 eliminacions
|
@ -338,10 +338,14 @@ Relationship dicts
|
|||
'followed_by': # Boolean denoting whether the specified user follows the logged-in user
|
||||
'blocking': # Boolean denoting whether the logged-in user has blocked the specified user
|
||||
'muting': # Boolean denoting whether the logged-in user has muted the specified user
|
||||
'muting_notifications': # Boolean denoting wheter the logged-in user has muted notifications
|
||||
# related to the specified user
|
||||
'requested': # Boolean denoting whether the logged-in user has sent the specified
|
||||
# user a follow request
|
||||
'domain_blocking': # Boolean denoting whether the logged-in user has blocked the
|
||||
# specified users domain
|
||||
'showing_reblogs': # Boolean denoting whether the specified users reblogs show up on the
|
||||
# logged-in users Timeline
|
||||
}
|
||||
|
||||
Notification dicts
|
||||
|
|
|
@ -162,7 +162,7 @@ class Mastodon:
|
|||
__DICT_VERSION_INSTANCE = bigger_version("2.3.0", __DICT_VERSION_ACCOUNT)
|
||||
__DICT_VERSION_HASHTAG = "1.0.0"
|
||||
__DICT_VERSION_EMOJI = "2.1.0"
|
||||
__DICT_VERSION_RELATIONSHIP = "1.4.0"
|
||||
__DICT_VERSION_RELATIONSHIP = "2.3.4"
|
||||
__DICT_VERSION_NOTIFICATION = bigger_version(bigger_version("1.0.0", __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS)
|
||||
__DICT_VERSION_CONTEXT = bigger_version("1.0.0", __DICT_VERSION_STATUS)
|
||||
__DICT_VERSION_LIST = "2.1.0"
|
||||
|
@ -1267,16 +1267,23 @@ class Mastodon:
|
|||
###
|
||||
# Writing data: Accounts
|
||||
###
|
||||
@api_version("1.0.0", "1.4.0", __DICT_VERSION_RELATIONSHIP)
|
||||
def account_follow(self, id):
|
||||
@api_version("1.0.0", "2.3.4", __DICT_VERSION_RELATIONSHIP)
|
||||
def account_follow(self, id, reblogs=True):
|
||||
"""
|
||||
Follow a user.
|
||||
|
||||
Set "reblogs" to False to hide boosts by the followed user.
|
||||
|
||||
Returns a `relationship dict`_ containing the updated relationship to the user.
|
||||
"""
|
||||
id = self.__unpack_id(id)
|
||||
params = self.__generate_params(locals())
|
||||
|
||||
if params["reblogs"] == None:
|
||||
del params["reblogs"]
|
||||
|
||||
url = '/api/v1/accounts/{0}/follow'.format(str(id))
|
||||
return self.__api_request('POST', url)
|
||||
return self.__api_request('POST', url, params)
|
||||
|
||||
@api_version("1.0.0", "2.1.0", __DICT_VERSION_ACCOUNT)
|
||||
def follows(self, uri):
|
||||
|
@ -1321,11 +1328,14 @@ class Mastodon:
|
|||
url = '/api/v1/accounts/{0}/unblock'.format(str(id))
|
||||
return self.__api_request('POST', url)
|
||||
|
||||
@api_version("1.1.0", "1.4.0", __DICT_VERSION_RELATIONSHIP)
|
||||
def account_mute(self, id):
|
||||
@api_version("1.1.0", "2.3.4", __DICT_VERSION_RELATIONSHIP)
|
||||
def account_mute(self, id, notifications=True):
|
||||
"""
|
||||
Mute a user.
|
||||
|
||||
Set "notifications" to False to receive notifications even though the user is
|
||||
muted from timelines.
|
||||
|
||||
Returns a `relationship dict`_ containing the updated relationship to the user.
|
||||
"""
|
||||
id = self.__unpack_id(id)
|
||||
|
|
Loading…
Referencia en una nova incidència