Class: Podio::OAuth
Overview
Instance Attribute Summary
#attributes
Class Method Summary
collapse
#==, #[], #[]=, #api_friendly_ref_type, #as_json, collection, delegate_to_hash, has_many, has_one, #hash, #initialize, #initialize_attributes, klass_from_string, list, member, #new_record?, output_attribute_as_json, #parent_model, #persisted?, property, #to_param
Class Method Details
.authorize(attributes) ⇒ Object
4
5
6
7
8
9
10
11
|
# File 'lib/podio/models/o_auth.rb', line 4
def authorize(attributes)
response = Podio.connection.post do |req|
req.url "/oauth/authorize"
req.body = attributes
end
response.body
end
|
.get_access_token(attributes) ⇒ Object
23
24
25
26
27
28
29
30
|
# File 'lib/podio/models/o_auth.rb', line 23
def get_access_token(attributes)
response = Podio.connection.post do |req|
req.url "/oauth/token"
req.body = attributes
end
response.body
end
|
.get_info(attributes) ⇒ Object
13
14
15
16
17
18
19
20
|
# File 'lib/podio/models/o_auth.rb', line 13
def get_info(attributes)
response = Podio.connection.post do |req|
req.url "/oauth/info"
req.body = attributes
end
response.body
end
|
.invalidate_grant ⇒ Object
33
34
35
36
37
38
39
|
# File 'lib/podio/models/o_auth.rb', line 33
def invalidate_grant
response = Podio.connection.post do |req|
req.url '/oauth/grant/invalidate'
end
response.status
end
|