diff --git a/.travis.yml b/.travis.yml index 4feba297..759cce01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,3 @@ script: - flake8 --max-line-length=120 --exclude=./setup.py,./instagram_private_api/compat.py,./instagram_web_api/compat.py,./instagram_private_api/endpoints/__init__.py - pylint -E instagram_private_api instagram_web_api -branches: - only: - - master diff --git a/instagram_private_api/endpoints/friendships.py b/instagram_private_api/endpoints/friendships.py index 5b090df3..8bfc8bbe 100644 --- a/instagram_private_api/endpoints/friendships.py +++ b/instagram_private_api/endpoints/friendships.py @@ -379,6 +379,20 @@ def ignore_user(self, user_id): params=params) return res + def approve_user(self, user_id): + """ + Approve a user's follow request. + + :param user_id: + :return: + """ + params = {'user_id': user_id, 'radio_type': self.radio_type} + params.update(self.authenticated_params) + res = self._call_api( + 'friendships/approve/{user_id!s}/'.format(**{'user_id': user_id}), + params=params) + return res + def remove_follower(self, user_id): """ Remove a follower.