miniflux-cr

docs

miniflux-cr

An adapter for Miniflux's JSON RPC api using Crystal.

Installation

Add this to your application's shard.yml:

dependencies:
  miniflux:
    github: azah/miniflux-cr

Usage

require "miniflux"

Create a config file:

{
  "miniflux_url": "http://<your.url.here>/jsonrpc.php",
  "miniflux_username": "<yourUsername>",
  "miniflux_token": "<yourToken>",
  "miniflux_header_string": "Miniflux Bot. Owned by <yourNameOrHandleEtc>"
}

Set up a client with it

_settings = Miniflux::Mappings::Config.from_json(File.read("spec/secrets.json"))

mini = Miniflux::Client.new(
  _settings.minifluxURL,
  _settings.minifluxUsername,
  _settings.minifluxToken,
  _settings.minifluxHeaderString,
  "2.0", # optional, JSON RPC version: default is 2.0
  1 # optional, id: default is 1
)

Commands

See the api's [documentation] for all the commands. The client's commands match but with underscores instead of periods:

app.version => mini.app_version

item.bookmark.list => mini.item_bookmark_list

Development

Read up on the api's documentation.

Contributing

  1. Fork it ( https://github.com/azah/miniflux-cr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors