Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

BC: added pagination for location feed #269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

merzl
Copy link

@merzl merzl commented Aug 21, 2019

The purpose of this PR is to add ability to paginate over location feed, in the same was as Followers using .Next() function.
One BC: added option to select a tab for posts (recent or top).

Copy link
Owner

@ahmdrz ahmdrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. 👍

//Feeds creates a starting point for fetching location feed.
//Use .Next() for pagination.
//Tab can be "recent" or "top" according to instagram sections
func (l *LocationInstance) Feeds(locationID int64, tab string) *Section {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create two new constants for tab option? Something like TabRecent.

if section.err != nil {
return false
}

Copy link
Owner

@ahmdrz ahmdrz Aug 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can paginate only if MoreAvailable is true. So please write an if condition instead of checking errors. It's more readable for humans :D

@ahmdrz
Copy link
Owner

ahmdrz commented Aug 23, 2019

Also please make some test functions for Location if you can.

@felipeinf
Copy link
Collaborator

El propósito de este PR es agregar la capacidad de paginar sobre el feed de ubicación, al igual que los Seguidores que usan la función .Next ().
One BC: opción agregada para seleccionar una pestaña para publicaciones (recientes o principales).

Hello, how did you do with this? @merzl

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants