Skip to content

A rust API client for Mastodon, a GNU-Social compatible microblogging service.

License

Notifications You must be signed in to change notification settings

saibatizoku/herder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

herder

A rust client for Mastodon, a GNU Social-compatible microblogging service.

This crate is under development, and will keep on changing often. Be warned.

As the crate is under development, the examples will be changing often.

EXAMPLES

Currently, you can checkout the examples folder for use-cases involving the code.

To run this example:

Get help with how the example works, anytime by running:

cargo run --example create-app -- -h

To register a new app, simply specify the HTTPS path to your Mastodon node.

cargo run --example create-app -- https://mastodon.example.com/ my-app.json

where my-app.json save the returned client credentials in JSON format.

or, you can read the new client configuration by running:

cargo run --example create-app -- https://mastodon.example.com/ -c myclient.json my-app.json

where myclient.json is a customized 'CreateApp' in JSON format.

The printed output instructs you on how to continue, by following a URL of the type:

https://mastodon.example.com/oauth/authorize?client_id=CLIENT_ID&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code

This will take you to a page where you may authorize the app on your Mastodon server. Once you click on 'authorize', you will be redirected to a page where you will find your authorization code. You'll use this code in the next example, in order to finish authorizing our app, and to retrieve our access token.

TODO

  • Implement Mastodon API (v1) as found at the official API Overview

    • Client

      • API Entities

        • Tests for JSON deserialization
        • JSON deserialization
      • API Methods

        • Tests all endpoints
        • Build endpoint requests
        • Parse endpoint responses
      • OAuth

        • Registering client with OAuth. See example.
        • Requesting authorization with OAuth
        • Requesting the access token
    • Mastodon

    • Herd. A collection of Mastodons

    • Herder. A manager for multiple Mastodons.

About

A rust API client for Mastodon, a GNU-Social compatible microblogging service.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages