hunter v0.3.0 Hunter.Application

Application entity

This module defines a Hunter.Application struct and the main functions for working with Applications.

Fields

  • id - identifier
  • client_id - client id
  • client_secret - client secret

Summary

Types

t()
t() :: %Hunter.Application{client_id: String.t, client_secret: String.t, id: non_neg_integer}

Functions

create_app(conn, name, redirect_uri \\ "urn:ietf:wg:oauth:2.0:oob", scopes \\ "read", website \\ nil)

Register a new OAuth client app on the target instance

Parameters

  • conn - connection credentials
  • name - name of your application
  • redirect_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: read
  • website - URL to the homepage of your app, default: nil

Scopes

  • read - read data
  • write - post statuses and upload media for statuses
  • follow - follow, unfollow, block, unblock

Multiple scopes can be requested during the authorization phase with the scope query param