miniflux_sdk
A Gleam SDK for interacting with the Miniflux RSS reader API.
As of know only a tiny subset of the API is implemented and not all fields are decoded. If you need something more just make a PR.
Installation
gleam add miniflux_sdk
Usage
import miniflux_sdk
import miniflux_sdk/get_entries
pub fn main() {
let client = miniflux_sdk.client_from_url("https://miniflux.example.com", "your-api-key")
let request = get_entries.request(client, get_entries.EntryFilter(status: [get_entries.Unread], limit: None, offset: None, starred: None, search: None, category: None))
// Send request the request with your HTTP-client of choice
let assert Ok(response) = httpc.send(request)
// Handle the response
let assert Ok(entries) = get_entries.decoder(response)
}
API
Client
client_from_url(base_url, api_key)- Create a client from a Miniflux URL and API key
Types
Client- Opaque type for making API requestsCategory- Represents a categoryFeed- Represents a feedEntry- Represents an entry/articleError- Error types (CannotParseUrl,CannotDecodeJson,InvalidScheme,Unauthorized,UnexpectedHttpStatus)
Modules
get_entries- Fetch entries with filtering optionsget_feeds- Fetch all feedsget_categories- Fetch all categoriesrefresh_feed- Refresh a single feedrefresh_all_feeds- Refresh all feeds
Development
gleam run # Run the project
gleam test # Run the tests
gleam docs # Build documentation