2023-06-19 23:42:47 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2018-08-25 07:23:03 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
Package client implements a client library for the Miniflux REST API.
|
|
|
|
|
2022-08-09 06:33:38 +02:00
|
|
|
# Examples
|
2018-08-25 07:23:03 +02:00
|
|
|
|
|
|
|
This code snippet fetch the list of users:
|
|
|
|
|
|
|
|
import (
|
2023-08-10 06:15:55 +02:00
|
|
|
miniflux "miniflux.app/v2/client"
|
2018-08-25 07:23:03 +02:00
|
|
|
)
|
|
|
|
|
2024-03-16 21:40:16 +01:00
|
|
|
client := miniflux.NewClient("https://api.example.org", "admin", "secret")
|
2018-08-25 07:23:03 +02:00
|
|
|
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)
|
|
|
|
*/
|
2023-08-10 06:15:55 +02:00
|
|
|
package client // import "miniflux.app/v2/client"
|