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

FeddTag: add func for fetching next feedTag page #264

Merged
merged 2 commits into from
Aug 8, 2019

Conversation

sviande
Copy link
Contributor

@sviande sviande commented Aug 6, 2019

Hi this PR : add func Next on feedTag for fetching next pages (Like Hastag.Next)

Usage:

ft, err := inst.Feed.Tags("mytag")
if err != nil {
   return err
}
dosomethingWithItems(ft)
for ft.Next() {
  dosomethingWithItems(ft)
}

return ft.Error()

newFT := FeedTag{}
err = json.Unmarshal(body, &newFT)
if err == nil {
*ft = newFT
Copy link
Owner

Choose a reason for hiding this comment

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

Are these lines the same as yours?

		newFT := &FeedTag{}
		err = json.Unmarshal(body, newFT)
		if err == nil {
			ft = newFT

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it's the same, i copy the code from hashtags.go

Copy link
Owner

Choose a reason for hiding this comment

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

Alright, Later I will change both of them.

feeds.go Outdated Show resolved Hide resolved
@ahmdrz
Copy link
Owner

ahmdrz commented Aug 8, 2019

Thank you @sviande. Can you create some test functions for feed tags? I'll merge it BTW.

@ahmdrz ahmdrz merged commit 380c942 into ahmdrz:master Aug 8, 2019
@sviande sviande deleted the feedTag_next branch August 8, 2019 16:06
@sviande
Copy link
Contributor Author

sviande commented Aug 9, 2019

Can you create some test functions for feed tags? I'll merge it BTW.

I will add some tests and create a new PR.

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.

2 participants