lib/statraptor/client/projects.rb in statraptor-0.1.0 vs lib/statraptor/client/projects.rb in statraptor-0.2.0
- old
+ new
@@ -1,15 +1,13 @@
module StatRaptor
class Client
module Projects
- def create_project(params={})
- response = Typhoeus::Request.post("#{StatRaptor.endpoint}/projects", :params => {:platform_credentials => StatRaptor.platform_credentials, :user_credentials => params[:user_credentials], :project => params[:project]})
- response.body
+ def create_project(params = {})
+ post("/projects", params)
end
- def delete_project(params={})
- response = Typhoeus::Request.delete("#{StatRaptor.endpoint}/projects/#{params[:subdomain]}", :params => {:platform_credentials => StatRaptor.platform_credentials, :user_credentials => params[:user_credentials]})
- handle_response(response)
+ def delete_project(params = {})
+ delete("/projects/#{params[:subdomain]}", :user_credentials => params[:user_credentials])
end
end
end
end