Class: HTTPHelper
- Inherits:
-
Object
- Object
- HTTPHelper
- Defined in:
- lib/committer-tools.rb
Class Attribute Summary collapse
-
.token ⇒ Object
writeonly
Sets the attribute token.
Class Method Summary collapse
Class Attribute Details
.token=(value) ⇒ Object (writeonly)
Sets the attribute token
6 7 8 |
# File 'lib/committer-tools.rb', line 6 def token=(value) @token = value end |
Class Method Details
.get(url) ⇒ Object
9 10 11 |
# File 'lib/committer-tools.rb', line 9 def self.get(url) RestClient.get(url, { params: { access_token: @token } }).body end |
.get_json(url) ⇒ Object
13 14 15 |
# File 'lib/committer-tools.rb', line 13 def self.get_json(url) JSON.parse(get(url)) end |