Class: Pivotalprinter::Client
- Inherits:
-
Object
- Object
- Pivotalprinter::Client
- Defined in:
- lib/pivotalprinter/client.rb
Class Attribute Summary collapse
-
.project ⇒ Object
Returns the value of attribute project.
-
.token ⇒ Object
Returns the value of attribute token.
Class Method Summary collapse
Class Attribute Details
.project ⇒ Object
Returns the value of attribute project.
7 8 9 |
# File 'lib/pivotalprinter/client.rb', line 7 def project @project end |
.token ⇒ Object
Returns the value of attribute token.
7 8 9 |
# File 'lib/pivotalprinter/client.rb', line 7 def token @token end |
Class Method Details
.get(path, options = {}) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/pivotalprinter/client.rb', line 9 def get(path, ={}) raise TokenMissing if @token.nil? raise ProjectMissing if @project.nil? response = open("http://www.pivotaltracker.com/services/v3#{path}", 'X-TrackerToken' => @token, 'Content-Type' => 'application/xml').read Nokogiri::XML.parse(response) end |