Class: Pivotal::Api
Instance Attribute Summary collapse
-
#api_token ⇒ Object
Returns the value of attribute api_token.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Api
constructor
A new instance of Api.
- #resource ⇒ Object
Methods inherited from Base
name_as_xml_attribute, #parsed_resource, #update_attributes, xpath
Methods included from Attributes
Methods included from Associations
Constructor Details
#initialize(options = {}) ⇒ Api
Returns a new instance of Api.
7 8 9 10 |
# File 'lib/pivotal/api.rb', line 7 def initialize( = {}) super() @api_url = "https://www.pivotaltracker.com/services/v3" end |
Instance Attribute Details
#api_token ⇒ Object
Returns the value of attribute api_token.
4 5 6 |
# File 'lib/pivotal/api.rb', line 4 def api_token @api_token end |
Instance Method Details
#resource ⇒ Object
12 13 14 |
# File 'lib/pivotal/api.rb', line 12 def resource @resource ||= RestClient::Resource.new @api_url, :headers => { 'X-TrackerToken' => api_token, 'Content-Type' => 'application/xml' } end |