Class: Doccy::Templates
- Inherits:
-
Object
- Object
- Doccy::Templates
- Defined in:
- lib/doccy/templates.rb
Class Method Summary collapse
- .all(auth_token) ⇒ Object
- .get(auth_token, template_id) ⇒ Object
- .upload(auth_token, template_params) ⇒ Object
Class Method Details
.all(auth_token) ⇒ Object
4 5 6 7 8 |
# File 'lib/doccy/templates.rb', line 4 def self.all(auth_token) = { query: { auth_token: auth_token } } response = HTTParty.get("#{Doccy::Config.url}/templates.json", ) end |
.get(auth_token, template_id) ⇒ Object
11 12 13 14 15 |
# File 'lib/doccy/templates.rb', line 11 def self.get(auth_token, template_id) = { query: { auth_token: auth_token } } response = HTTParty.get("#{Doccy::Config.url}/templates/#{template_id}.json", ) end |
.upload(auth_token, template_params) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/doccy/templates.rb', line 17 def self.upload(auth_token, template_params) = { query: { auth_token: auth_token , template: template_params} } response = HTTParty.post("#{Doccy::Config.url}/templates.json", ) # puts response.body end |