Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api changes #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions InstagramAPI/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,24 @@ def get_profile_data(self):
def get_recent_activity(self):
return self._sendrequest('news/inbox/?')

def get_timeline(self):
return self._sendrequest('feed/timeline/?rank_token=' + str(self._ranktoken) + '&ranked_content=true&')
def get_timeline(self,max_id=''):
return self._sendrequest('feed/timeline/?rank_token=' + str(self._ranktoken) + '&ranked_content=true&max_id='+str(max_id or ''))

def get_reels(self):
return self._sendrequest('feed/reels_tray/')

def get_reel_info(self,reel_id):
return self._sendrequest('feed/reels_media/?reel_ids='+str(reel_id))


def get_user_feed(self, username_id, max_id='', min_timestamp=None):
return self._sendrequest(
'feed/user/' + str(username_id) + '/?max_id=' + str(max_id) + '&min_timestamp=' + str(min_timestamp) +
'feed/user/' + str(username_id) + '/?count=12&max_id=' + str(max_id) + '&min_timestamp=' + str(min_timestamp) +
'&rank_token=' + str(self._ranktoken) + '&ranked_content=true')

def get_username_feed(self, username, max_id='', min_timestamp=None):
return self._sendrequest(
'feed/user/' + str(username) + '/username/?count=12&max_id=' + str(max_id) + '&min_timestamp=' + str(min_timestamp) +
'&rank_token=' + str(self._ranktoken) + '&ranked_content=true')

def get_user_followers(self, username_id, max_id=None):
Expand Down