Class: HookSniff::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/hooksniff/api/template.rb

Instance Method Summary collapse

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

#listObject



9
10
11
# File 'lib/hooksniff/api/template.rb', line 9

def list
  @client.execute_request("GET", "/v1/templates")
end