Frédéric Guillot f87b05c90f Update contributor link and Godoc badge for client %!s(int64=5) %!d(string=hai) anos
..
README.md f87b05c90f Update contributor link and Godoc badge for client %!s(int64=5) %!d(string=hai) anos
client.go acd318b640 Update API client to support more filters %!s(int64=5) %!d(string=hai) anos
core.go 84b83fc3c8 Add feed filters (Keeplist and Blocklist) %!s(int64=5) %!d(string=hai) anos
doc.go 11dfcdd3d6 Fix typo in license header %!s(int64=7) %!d(string=hai) anos
request.go 74c95ed34b API client: Do not return body for response with no content %!s(int64=5) %!d(string=hai) anos

README.md

Miniflux API Client

PkgGoDev

Client library for Miniflux REST API.

Installation

go get -u miniflux.app/client

Example

package main

import (
	"fmt"
    "io/ioutil"

	miniflux "miniflux.app/client"
)

func main() {
    // Authentication with username/password:
    client := miniflux.New("https://api.example.org", "admin", "secret")

    // Authentication with an API Key:
    client := miniflux.New("https://api.example.org", "my-secret-token")

    // 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
    }
}