Module: Mastodon::REST::Apps
Instance Method Summary collapse
-
#create_app(name, redirect_uri, scopes = 'read', website = nil) ⇒ Mastodon::App
Register a new OAuth client app on the target instance.
-
#verify_app_credentials ⇒ Mastodon::Entities::App
Return currently used app and confirm that client credentials are valid.
Methods included from Utils
#array_param, #perform_request, #perform_request_with_collection, #perform_request_with_object
Instance Method Details
#create_app(name, redirect_uri, scopes = 'read', website = nil) ⇒ Mastodon::App
Register a new OAuth client app on the target instance
16 17 18 |
# File 'lib/mastodon/rest/apps.rb', line 16 def create_app(name, redirect_uri, scopes = 'read', website = nil) perform_request_with_object(:post, '/api/v1/apps', { client_name: name, redirect_uris: redirect_uri, scopes: scopes, website: website }, Mastodon::App) end |
#verify_app_credentials ⇒ Mastodon::Entities::App
Return currently used app and confirm that client credentials are valid
22 23 24 |
# File 'lib/mastodon/rest/apps.rb', line 22 def verify_app_credentials perform_request_with_object(:get, '/api/v1/apps/verify_credentials', {}, Mastodon::Entities::App) end |