From f43a055d63d33599404d2616bf54216bc74a2506 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 24 Aug 2018 22:23:03 -0700 Subject: Move Golang API client here --- client/README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 client/README.md (limited to 'client/README.md') diff --git a/client/README.md b/client/README.md new file mode 100644 index 0000000..1791d7f --- /dev/null +++ b/client/README.md @@ -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 + } +} +``` -- cgit v1.2.3