all repos

smutok @ d021876

yet another tui rss reader (not abandoned, just paused development)

smutok/internal/sync/freshrss.go(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package sync

import (
	"context"

	"olexsmir.xyz/smutok/internal/provider"
	"olexsmir.xyz/smutok/internal/store"
)

type FreshRSS struct {
	store store.Store
	api   *provider.FreshRSS
}

func NewFreshRSS(store store.Store, api *provider.FreshRSS) *FreshRSS {
	return &FreshRSS{
		store: store,
		api:   api,
	}
}

func (g *FreshRSS) Sync(ctx context.Context) error {
	// tags, err := g.api.TagList(ctx)
	// subscriptions, err := g.api.SubscriptionList(ctx)
	// unreadItems, err := g.api.StreamContents(
	// 	ctx,
	// 	"user/-/state/com.google/reading-list",
	// 	"user/-/state/com.google/read",
	// 	0,
	// 	1000)
	// ids, err := g.api.GetItemsIDs(ctx,
	// 	"user/-/state/com.google/read",
	// 	"user/-/state/com.google/reading-list",
	// 	1000,
	// )

	return nil
}