mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add Fever API
This commit is contained in:
parent
ae62e543d3
commit
bc20e0884b
24 changed files with 984 additions and 37 deletions
|
@ -4,6 +4,11 @@
|
|||
|
||||
package model
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Icon represents a website icon (favicon)
|
||||
type Icon struct {
|
||||
ID int64 `json:"id"`
|
||||
|
@ -12,6 +17,14 @@ type Icon struct {
|
|||
Content []byte `json:"content"`
|
||||
}
|
||||
|
||||
// DataURL returns the data URL of the icon.
|
||||
func (i *Icon) DataURL() string {
|
||||
return fmt.Sprintf("%s;base64,%s", i.MimeType, base64.StdEncoding.EncodeToString(i.Content))
|
||||
}
|
||||
|
||||
// Icons represents a list of icon.
|
||||
type Icons []*Icon
|
||||
|
||||
// FeedIcon is a jonction table between feeds and icons
|
||||
type FeedIcon struct {
|
||||
FeedID int64 `json:"feed_id"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue