2023-06-19 17:42:47 -04:00
|
|
|
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2018-08-25 01:23:03 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Package client implements a client library for the Miniflux REST API.
|
|
|
|
|
2022-08-09 00:33:38 -04:00
|
|
|
# Examples
|
2018-08-25 01:23:03 -04:00
|
|
|
|
|
|
|
This code snippet fetch the list of users:
|
|
|
|
|
|
|
|
import (
|
|
|
|
miniflux "miniflux.app/client"
|
|
|
|
)
|
|
|
|
|
|
|
|
client := miniflux.New("https://api.example.org", "admin", "secret")
|
|
|
|
users, err := client.Users()
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
fmt.Println(users, err)
|
|
|
|
|
|
|
|
This one discover subscriptions on a website:
|
|
|
|
|
|
|
|
subscriptions, err := client.Discover("https://example.org/")
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
fmt.Println(subscriptions)
|
|
|
|
*/
|
|
|
|
package client // import "miniflux.app/client"
|