inital commit
This commit is contained in:
4
inbox.go
4
inbox.go
@@ -34,7 +34,7 @@ import (
|
||||
// ListOptions.StartPage is ignored the inbox is cursor-paginated by
|
||||
// FA (the "Next 72" link encodes a from-id), not page-numbered, so there
|
||||
// is nothing meaningful to start from.
|
||||
func (c *Client) SubmissionInbox(ctx context.Context, opts ListOptions) iter.Seq2[*Submission, error] {
|
||||
func (c *Client) SubmissionInbox(ctx context.Context, opts ListOptions, reqOpts ...Option) iter.Seq2[*Submission, error] {
|
||||
return func(yield func(*Submission, error) bool) {
|
||||
nextURL := urls.MsgSubmissions()
|
||||
pagesFetched := 0
|
||||
@@ -58,7 +58,7 @@ func (c *Client) SubmissionInbox(ctx context.Context, opts ListOptions) iter.Seq
|
||||
err := c.fetch(ctx, nextURL, func(doc *goquery.Document) error {
|
||||
items, next = parseSubmissionInboxPage(doc, c.cfg.jsonListings)
|
||||
return nil
|
||||
})
|
||||
}, reqOpts...)
|
||||
if err != nil {
|
||||
yield(nil, err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user