generated from alecodes/base-template
feat: list entries to archive from miniflux
This commit is contained in:
parent
22b4abf73b
commit
43cd24e4d0
6 changed files with 30 additions and 14 deletions
|
|
@ -6,9 +6,10 @@ import (
|
|||
)
|
||||
|
||||
type MinifluxConfig struct {
|
||||
Host string
|
||||
User string
|
||||
Token string
|
||||
Host string
|
||||
User string
|
||||
Token string
|
||||
FeedId int64
|
||||
}
|
||||
|
||||
type Miniflux struct {
|
||||
|
|
@ -16,6 +17,14 @@ type Miniflux struct {
|
|||
client *mfApi.Client
|
||||
}
|
||||
|
||||
func (mf *Miniflux) GetEntries() (*mfApi.EntryResultSet, error) {
|
||||
filter := &mfApi.Filter{
|
||||
Statuses: []string{mfApi.EntryStatusRead, mfApi.EntryStatusRemoved},
|
||||
}
|
||||
|
||||
return mf.client.FeedEntries(mf.FeedId, filter)
|
||||
}
|
||||
|
||||
func NewMiniflux(config MinifluxConfig) (*Miniflux, error) {
|
||||
mf := &Miniflux{
|
||||
MinifluxConfig: config,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue