Class: Gista::GistRequest
- Inherits:
-
ApiRequest
- Object
- ApiRequest
- Gista::GistRequest
- Defined in:
- lib/gista/gist_request.rb
Overview
Special Github API request to create a new gist. It requires an OAuth token for authorization, and options for what file to post.
See the API docs for what options are expected to create a new Gist.
Constant Summary
Constants inherited from ApiRequest
ApiRequest::CONTENT_TYPE, ApiRequest::OPEN_TIMEOUT, ApiRequest::PORT, ApiRequest::READ_TIMEOUT, ApiRequest::URL
Instance Attribute Summary collapse
-
#options ⇒ Hash
readonly
Options containing information about files, filenames and visibility.
-
#token ⇒ String
readonly
Authorization token to authorize with Github.
Instance Method Summary collapse
-
#initialize(token, options = {}) ⇒ GistRequest
constructor
A new instance of GistRequest.
Methods inherited from ApiRequest
Constructor Details
#initialize(token, options = {}) ⇒ GistRequest
Returns a new instance of GistRequest.
29 30 31 |
# File 'lib/gista/gist_request.rb', line 29 def initialize(token, = {}) @token, @options = token, end |
Instance Attribute Details
#options ⇒ Hash (readonly)
Options containing information about files, filenames and visibility
27 28 29 |
# File 'lib/gista/gist_request.rb', line 27 def @options end |
#token ⇒ String (readonly)
Authorization token to authorize with Github.
23 24 25 |
# File 'lib/gista/gist_request.rb', line 23 def token @token end |