Class: HookSniff::Template
- Inherits:
-
Object
- Object
- HookSniff::Template
- Defined in:
- lib/hooksniff/api/template.rb
Instance Method Summary collapse
- #apply(id, attrs) ⇒ Object
- #get(id) ⇒ Object
-
#initialize(client) ⇒ Template
constructor
A new instance of Template.
- #list ⇒ Object
Constructor Details
#initialize(client) ⇒ Template
Returns a new instance of Template.
5 6 7 |
# File 'lib/hooksniff/api/template.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#apply(id, attrs) ⇒ Object
17 18 19 |
# File 'lib/hooksniff/api/template.rb', line 17 def apply(id, attrs) @client.execute_request("POST", "/v1/templates/#{id}/apply", body: attrs) end |
#get(id) ⇒ Object
13 14 15 |
# File 'lib/hooksniff/api/template.rb', line 13 def get(id) @client.execute_request("GET", "/v1/templates/#{id}") end |
#list ⇒ Object
9 10 11 |
# File 'lib/hooksniff/api/template.rb', line 9 def list @client.execute_request("GET", "/v1/templates") end |