Module: Mattermost::Endpoint::OAuth

Included in:
Mattermost::Endpoint
Defined in:
lib/mattermost/endpoint/oauth.rb

Instance Method Summary collapse

Instance Method Details

#delete_oauth_app(app_id) ⇒ Object



23
24
25
# File 'lib/mattermost/endpoint/oauth.rb', line 23

def delete_oauth_app(app_id)
	delete("/oauth/apps/#{app_id}")
end

#get_authorized_oauth_apps(user_id, max = 60) ⇒ Object



35
36
37
# File 'lib/mattermost/endpoint/oauth.rb', line 35

def get_authorized_oauth_apps(user_id, max = 60)
	get("/users/#{user_id}/oauth/apps/authorized?per_page=#{max}")
end

#get_oauth_app(app_id) ⇒ Object



15
16
17
# File 'lib/mattermost/endpoint/oauth.rb', line 15

def get_oauth_app(app_id)
	get("/oauth/apps/#{app_id}")
end

#get_oauth_app_info(app_id) ⇒ Object



31
32
33
# File 'lib/mattermost/endpoint/oauth.rb', line 31

def get_oauth_app_info(app_id)
	get("/oauth/apps/#{app_id}/info")
end

#get_oauth_apps(max = 60) ⇒ Object



11
12
13
# File 'lib/mattermost/endpoint/oauth.rb', line 11

def get_oauth_apps(max = 60)
	get("/oauth/apps?per_page=#{max}")
end

#regenerate_oauth_app_secret(app_id) ⇒ Object



27
28
29
# File 'lib/mattermost/endpoint/oauth.rb', line 27

def regenerate_oauth_app_secret(app_id)
	post("/oauth/apps/#{app_id}/regen_secret")
end

#register_oauth_app(app) ⇒ Object



7
8
9
# File 'lib/mattermost/endpoint/oauth.rb', line 7

def register_oauth_app(app)
	post("/oauth/apps", :body => app.to_json)
end

#update_oauth_app(app_id, app) ⇒ Object



19
20
21
# File 'lib/mattermost/endpoint/oauth.rb', line 19

def update_oauth_app(app_id, app)
	put("/oauth/apps/#{app_id}", :body => app.to_json)
end