From dd15dd08602db7b2d31791e739c8e761605e850a Mon Sep 17 00:00:00 2001 From: tonk0112 Date: Tue, 17 Sep 2024 05:17:21 +0200 Subject: [PATCH 1/4] Update friendships.py --- instagram_private_api/endpoints/friendships.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instagram_private_api/endpoints/friendships.py b/instagram_private_api/endpoints/friendships.py index 5b090df3..348c3fe5 100644 --- a/instagram_private_api/endpoints/friendships.py +++ b/instagram_private_api/endpoints/friendships.py @@ -8,7 +8,7 @@ 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/', From 2bd85dc6fc038c6c1e87a0bc1c4a1d25dd71c907 Mon Sep 17 00:00:00 2001 From: tonk0112 Date: Tue, 17 Sep 2024 05:22:59 +0200 Subject: [PATCH 2/4] Update friendships.py2 --- instagram_private_api/endpoints/friendships.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/instagram_private_api/endpoints/friendships.py b/instagram_private_api/endpoints/friendships.py index 348c3fe5..a0a985b6 100644 --- a/instagram_private_api/endpoints/friendships.py +++ b/instagram_private_api/endpoints/friendships.py @@ -18,7 +18,7 @@ def duje_cc(self): 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 @@ -43,11 +43,11 @@ def user_following(self, user_id, rank_token, **kwargs): 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 +57,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 +80,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 +96,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 From adfa74659b34a8ab38fbf2e8cbee65d0499746d5 Mon Sep 17 00:00:00 2001 From: tonk0112 Date: Tue, 17 Sep 2024 05:27:49 +0200 Subject: [PATCH 3/4] Update friendships.py3 --- .../endpoints/friendships.py | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/instagram_private_api/endpoints/friendships.py b/instagram_private_api/endpoints/friendships.py index a0a985b6..c242f93c 100644 --- a/instagram_private_api/endpoints/friendships.py +++ b/instagram_private_api/endpoints/friendships.py @@ -3,12 +3,9 @@ from .common import ClientExperimentalWarning from ..compatpatch import ClientCompatPatch from ..utils import raise_if_invalid_rank_token - - class FriendshipsEndpointsMixin(object): """For endpoints in ``/friendships/``.""" - - def duje_cc(self): + def duje_cc(self): """User list for autocomplete""" res = self._call_api( 'friendships/autocomplete_user_list/', @@ -17,12 +14,10 @@ def duje_cc(self): [ClientCompatPatch.list_user(user, drop_incompat_keys=self.drop_incompat_keys) for user in res['users']] return res - - def duje_cc(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 +26,19 @@ def duje_cc(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 duje_cc(self, user_id, rank_token, **kwargs): + def duje_cc(self, user_id, rank_token, **kwargs): """ Get user followers - - :param duje_cc: + :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: From dc1ae16a21d49f526f2ad8f3754bf483dc7ef3b0 Mon Sep 17 00:00:00 2001 From: tonk0112 Date: Tue, 17 Sep 2024 05:47:18 +0200 Subject: [PATCH 4/4] Update friendships.py5 --- instagram_private_api/endpoints/friendships.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/instagram_private_api/endpoints/friendships.py b/instagram_private_api/endpoints/friendships.py index c242f93c..e241f663 100644 --- a/instagram_private_api/endpoints/friendships.py +++ b/instagram_private_api/endpoints/friendships.py @@ -3,8 +3,6 @@ from .common import ClientExperimentalWarning from ..compatpatch import ClientCompatPatch from ..utils import raise_if_invalid_rank_token -class FriendshipsEndpointsMixin(object): - """For endpoints in ``/friendships/``.""" def duje_cc(self): """User list for autocomplete""" res = self._call_api(