Lennard Brinkhaus
31bd0cf639
Co-authored-by: Fenpaws <soxx@fenpa.ws> Reviewed-on: anthrove/e621-to-graph#13 Reviewed-by: SoXX <fenpaws@noreply.localhost> Co-authored-by: Lennard Brinkhaus <lennard.brinkhaus@noreply.localhost> Co-committed-by: Lennard Brinkhaus <lennard.brinkhaus@noreply.localhost>
15 lines
507 B
Go
15 lines
507 B
Go
package e621
|
|
|
|
import (
|
|
"context"
|
|
"e621_to_neo4j/e621/models"
|
|
"fmt"
|
|
)
|
|
|
|
// GetFavorites retrieves all favorites from the e621 API.
|
|
func (c *Client) GetFavorites(_ context.Context, user models.E621User, page int64) func() (models.PostResponseWrapper, error) {
|
|
URIPath := fmt.Sprintf("favorites.json?user_id=%d&limit=%d&page=%d", user.ID, 320, page)
|
|
e621Task := NewE621ApiTask[models.PostResponseWrapper](URIPath)
|
|
return Schedule[models.PostResponseWrapper](c.scheduler, e621Task, c.username, c.apiKey)
|
|
}
|