Method: StrawberryAPI::Client::Templates#template

Defined in:
lib/strawberry_api/client/templates.rb

#template(id:) ⇒ StrawberryAPI::Template

Fetches a template

Parameters:

  • id (Integer)

    If of the template to retrieve

Returns:



22
23
24
25
# File 'lib/strawberry_api/client/templates.rb', line 22

def template(id:)
  data = get("/templates/#{id}").parse['template']
  data.nil? ? nil : Template.new(data)
end