hunter v0.4.1 Hunter.Application
Application entity
This module defines a Hunter.Application struct and the main functions
for working with Applications.
Fields
id- identifierclient_id- client idclient_secret- client secret
Summary
Functions
Register a new OAuth client app on the target instance
Load persisted application’s credentials
Types
Functions
create_app(name, redirect_uri \\ "urn:ietf:wg:oauth:2.0:oob", scopes \\ ["read"], website \\ nil, options \\ [])
Register a new OAuth client app on the target instance
Parameters
name- name of your applicationredirect_uri- where the user should be redirected after authorization, default:urn:ietf:wg:oauth:2.0:oob(no redirect)scopes- scope list, see the scope section for more details, default:readwebsite- URL to the homepage of your app, default:niloptions- option list
Scopes
read- read datawrite- post statuses and upload media for statusesfollow- follow, unfollow, block, unblock
Multiple scopes can be requested during the authorization phase with the
scope query param
Options
save?- persists your application information to a file, so, you can use them later. default:falseapi_base_url- specifies if you want to register an application on a different instance. default:https://mastodon.social