mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Added integration for Readwise Reader
This commit is contained in:
parent
3aad650622
commit
3bac768cda
26 changed files with 178 additions and 3 deletions
|
@ -13,6 +13,7 @@ import (
|
|||
"miniflux.app/integration/nunuxkeeper"
|
||||
"miniflux.app/integration/pinboard"
|
||||
"miniflux.app/integration/pocket"
|
||||
"miniflux.app/integration/readwise"
|
||||
"miniflux.app/integration/telegrambot"
|
||||
"miniflux.app/integration/wallabag"
|
||||
"miniflux.app/logger"
|
||||
|
@ -123,6 +124,18 @@ func SendEntry(entry *model.Entry, integration *model.Integration) {
|
|||
logger.Error("[Integration] UserID #%d: %v", integration.UserID, err)
|
||||
}
|
||||
}
|
||||
|
||||
if integration.ReadwiseEnabled {
|
||||
logger.Debug("[Integration] Sending Entry #%d %q for User #%d to Readwise Reader", entry.ID, entry.URL, integration.UserID)
|
||||
|
||||
client := readwise.NewClient(
|
||||
integration.ReadwiseAPIKey,
|
||||
)
|
||||
|
||||
if err := client.AddEntry(entry.URL); err != nil {
|
||||
logger.Error("[Integration] UserID #%d: %v", integration.UserID, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PushEntries pushes an entry array to third-party providers during feed refreshes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue