Module: Credly
- Defined in:
- lib/credly.rb,
lib/credly/client.rb,
lib/credly/version.rb,
lib/credly/api/base.rb,
lib/credly/api/badges.rb,
lib/credly/connection.rb,
lib/credly/api/members.rb,
lib/credly/requierable.rb,
lib/credly/api/evidence.rb,
lib/credly/api/categories.rb,
lib/credly/api/member_badges.rb,
lib/credly/response/parse_json.rb,
lib/credly/response/follow_redirects.rb
Defined Under Namespace
Modules: Connection, Requierable, Response
Classes: Api, Client
Constant Summary
collapse
- VERSION =
'0.0.2'
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
2
3
4
|
# File 'lib/credly.rb', line 2
def options
@options
end
|
Class Method Details
.access_token ⇒ Object
36
37
38
|
# File 'lib/credly.rb', line 36
def self.access_token
options[:access_token]
end
|
.access_token=(access_token) ⇒ Object
32
33
34
|
# File 'lib/credly.rb', line 32
def self.access_token=(access_token)
options[:access_token] = access_token
end
|
.base_endpoint ⇒ Object
8
9
10
|
# File 'lib/credly.rb', line 8
def self.base_endpoint
options[:base_endpoint]
end
|
.base_endpoint=(endpoint) ⇒ Object
4
5
6
|
# File 'lib/credly.rb', line 4
def self.base_endpoint=(endpoint)
options[:base_endpoint] = endpoint
end
|
.configuration ⇒ Object
60
61
62
63
64
65
66
|
# File 'lib/credly.rb', line 60
def self.configuration
if block_given?
yield(self)
else
options
end
end
|
.debugging ⇒ Object
16
17
18
|
# File 'lib/credly.rb', line 16
def self.debugging
options[:debugging]
end
|
.debugging=(debugging) ⇒ Object
12
13
14
|
# File 'lib/credly.rb', line 12
def self.debugging=(debugging)
options[:debugging] = debugging
end
|
.debugging? ⇒ Boolean
20
21
22
|
# File 'lib/credly.rb', line 20
def self.debugging?
!!options[:debugging]
end
|
.options ⇒ Object
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/credly.rb', line 48
def self.options
if defined? @@options
@@options
else
@@options = { :base_endpoint => 'https://apistaging2.credly.com',
:access_token => nil,
:version => 'v0.2',
:debugging => false,
:user_agent => 'credly_ruby_client' }
end
end
|
.user_agent ⇒ Object
28
29
30
|
# File 'lib/credly.rb', line 28
def self.user_agent
options[:user_agent]
end
|
.user_agent=(user_agent) ⇒ Object
24
25
26
|
# File 'lib/credly.rb', line 24
def self.user_agent=(user_agent)
options[:user_agent] = user_agent
end
|
.version ⇒ Object
44
45
46
|
# File 'lib/credly.rb', line 44
def self.version
options[:version]
end
|
.version=(version) ⇒ Object
40
41
42
|
# File 'lib/credly.rb', line 40
def self.version=(version)
options[:version] = version
end
|