inital commit

This commit is contained in:
2026-05-26 20:21:55 +02:00
parent 965f9d6ad4
commit 0ae20aa68d
21 changed files with 651 additions and 111 deletions

View File

@@ -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