Class: Octopi::Gist
- Includes:
- HTTParty, Resource
- Defined in:
- lib/octopi/gist.rb
Overview
Gist API is… lacking at the moment. This class serves only as a reminder to implement it later
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#public ⇒ Object
Returns the value of attribute public.
-
#repo ⇒ Object
Returns the value of attribute repo.
Attributes inherited from Base
Class Method Summary collapse
Methods included from Resource
Methods inherited from Base
#error=, #initialize, #property, #save
Constructor Details
This class inherits a constructor from Octopi::Base
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/octopi/gist.rb', line 6 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/octopi/gist.rb', line 6 def description @description end |
#public ⇒ Object
Returns the value of attribute public.
6 7 8 |
# File 'lib/octopi/gist.rb', line 6 def public @public end |
#repo ⇒ Object
Returns the value of attribute repo.
6 7 8 |
# File 'lib/octopi/gist.rb', line 6 def repo @repo end |
Class Method Details
.base_uri ⇒ Object
12 13 14 |
# File 'lib/octopi/gist.rb', line 12 def self.base_uri "https://gist.github.com/api/v1/yaml" end |
.find(id) ⇒ Object
16 17 18 19 20 |
# File 'lib/octopi/gist.rb', line 16 def self.find(id) result = get("#{base_uri}/#{id}") # This returns an array of Gists, rather than a single record. new(result["gists"].first) end |