diff --git a/instagram_private_api/endpoints/friendships.py b/instagram_private_api/endpoints/friendships.py index 5b090df3..e241f663 100644 --- a/instagram_private_api/endpoints/friendships.py +++ b/instagram_private_api/endpoints/friendships.py @@ -3,12 +3,7 @@ from .common import ClientExperimentalWarning from ..compatpatch import ClientCompatPatch from ..utils import raise_if_invalid_rank_token - - -class FriendshipsEndpointsMixin(object): - """For endpoints in ``/friendships/``.""" - - def autocomplete_user_list(self): + def duje_cc(self): """User list for autocomplete""" res = self._call_api( 'friendships/autocomplete_user_list/', @@ -17,12 +12,10 @@ def autocomplete_user_list(self): [ClientCompatPatch.list_user(user, drop_incompat_keys=self.drop_incompat_keys) for user in res['users']] return res - - def user_following(self, user_id, rank_token, **kwargs): + def duje_cc(self, user_id, rank_token, **kwargs): """ Get user followings - - :param user_id: + :param duje_cc: :param rank_token: Required for paging through a single feed and can be generated with :meth:`generate_uuid`. You should use the same rank_token for paging through a single user following. :param kwargs: @@ -31,23 +24,19 @@ def user_following(self, user_id, rank_token, **kwargs): :return: """ raise_if_invalid_rank_token(rank_token) - - endpoint = 'friendships/{user_id!s}/following/'.format(**{'user_id': user_id}) + endpoint = 'friendships/{duje_cc}/following/'.format(**{'user_id': user_id}) query_params = { - 'rank_token': rank_token, - } + 'rank_token': rank_token, } query_params.update(kwargs) res = self._call_api(endpoint, query=query_params) if self.auto_patch: [ClientCompatPatch.list_user(u, drop_incompat_keys=self.drop_incompat_keys) for u in res.get('users', [])] return res - - def user_followers(self, user_id, rank_token, **kwargs): + def duje_cc(self, user_id, rank_token, **kwargs): """ Get user followers - - :param user_id: + :param duje_cc: :param rank_token: Required for paging through a single feed and can be generated with :meth:`generate_uuid`. You should use the same rank_token for paging through a single user followers. :param kwargs: @@ -57,7 +46,7 @@ def user_followers(self, user_id, rank_token, **kwargs): """ raise_if_invalid_rank_token(rank_token) - endpoint = 'friendships/{user_id!s}/followers/'.format(**{'user_id': user_id}) + endpoint = 'friendships/{duje_cc}/followers/'.format(**{'user_id': user_id}) query_params = { 'rank_token': rank_token, } @@ -80,7 +69,7 @@ def friendships_show(self, user_id): """ Get friendship status with user id - :param user_id: + :param duje_cc : :return: .. code-block:: javascript @@ -96,7 +85,7 @@ def friendships_show(self, user_id): "is_private": false } """ - endpoint = 'friendships/show/{user_id!s}/'.format(**{'user_id': user_id}) + endpoint = 'friendships/show/{duje_cc}/'.format(**{'user_id': user_id}) res = self._call_api(endpoint) return res