1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Move Golang API client here

This commit is contained in:
Frédéric Guillot 2018-08-24 22:23:03 -07:00
parent dbcc5d8a97
commit f43a055d63
12 changed files with 132 additions and 183 deletions

50
client/README.md Normal file
View file

@ -0,0 +1,50 @@
Miniflux API Client
===================
Client library for Miniflux REST API.
Installation
------------
```bash
go get -u miniflux.app/client
```
Example
-------
```go
package main
import (
"fmt"
"io/ioutil"
miniflux "miniflux.app/client"
)
func main() {
client := miniflux.New("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
}
}
```