lib/morale/client.rb in morale-0.1.1 vs lib/morale/client.rb in morale-0.1.2
- old
+ new
@@ -55,9 +55,14 @@
raise NotFound if response.code == 404
response
end
def tickets(options={})
+ authorize
+ response = self.class.get("/projects/#{options[:project_id]}/tickets")
+ raise Unauthorized if response.code == 401
+ raise NotFound if response.code == 404
+ response
end
def ticket(project_id, command)
authorize
response = self.class.post("/projects/#{project_id}/tickets", :body => { :command => command })
\ No newline at end of file