1.2 KiB
1.2 KiB
Go Library for Miniflux
Client library for Miniflux REST API.
Requirements
- Miniflux >= 2.0.0
- Go >= 1.9
Installation
go get -u github.com/miniflux/miniflux-go
Example
package main
import (
"fmt"
"io/ioutil"
"github.com/miniflux/miniflux-go"
)
func main() {
client := miniflux.NewClient("https://api.example.org", "admin", "secret")
// Fetch all feeds.
feeds, err := client.Feeds()
if err != nil {
fmt.Println(err)
return
}
fmt.Println(feeds)
// Backup your feeds to an OPML file.
opml, err := client.Export()
if err != nil {
fmt.Println(err)
return
}
err = ioutil.WriteFile("opml.xml", opml, 0644)
if err != nil {
fmt.Println(err)
return
}
fmt.Println("backup done!")
}
Credits
- Author: Frédéric Guillot
- Distributed under MIT License