mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Add Linkding integration
This commit is contained in:
parent
780c9e3696
commit
1658db7f10
23 changed files with 198 additions and 7 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"miniflux.app/config"
|
||||
"miniflux.app/integration/espial"
|
||||
"miniflux.app/integration/instapaper"
|
||||
"miniflux.app/integration/linkding"
|
||||
"miniflux.app/integration/nunuxkeeper"
|
||||
"miniflux.app/integration/pinboard"
|
||||
"miniflux.app/integration/pocket"
|
||||
|
@ -94,6 +95,18 @@ func SendEntry(entry *model.Entry, integration *model.Integration) {
|
|||
logger.Error("[Integration] UserID #%d: %v", integration.UserID, err)
|
||||
}
|
||||
}
|
||||
|
||||
if integration.LinkdingEnabled {
|
||||
logger.Debug("[Integration] Sending Entry #%d %q for User #%d to Linkding", entry.ID, entry.URL, integration.UserID)
|
||||
|
||||
client := linkding.NewClient(
|
||||
integration.LinkdingURL,
|
||||
integration.LinkdingAPIKey,
|
||||
)
|
||||
if err := client.AddEntry(entry.Title, entry.URL); err != nil {
|
||||
logger.Error("[Integration] UserID #%d: %v", integration.UserID, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PushEntry pushes an entry to third-party providers during feed refreshes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue