8000 miniflux-v2-sqlite/client at main · ojeo/miniflux-v2-sqlite · GitHub
[go: up one dir, main page]

Skip to content
  • Latest commit

     

    History

    History
     
     

    client

    Folders and files

    NameName
    Last commit message
    Last commit date

    parent directory

    ..
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    README.md

    Miniflux API Client

    PkgGoDev

    Go client for the Miniflux REST API. It supports API tokens or basic authentication and mirrors the server endpoints closely.

    Installation

    go get -u miniflux.app/v2/client

    Example

    package main
    
    import (
    	"fmt"
    	"os"
    
    	miniflux "miniflux.app/v2/client"
    )
    
    func main() {
        // Authentication with username/password:
        client := miniflux.NewClient("https://api.example.org", "admin", "secret")
    
        // Authentication with an API Key:
        client := miniflux.NewClient("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 = os.WriteFile("opml.xml", opml, 0644)
        if err != nil {
            fmt.Println(err)
            return
        }
    }
    0