def template(template_name)
      self.discover!
      k = template_name.to_s
      template = @discovery['links'][k] || @discovery['links'][k+'-template'] || @discovery['links'][k+'-query']
      FamilySearch::URLTemplate.new self, template
    end
def template(template_name)
      self.discover!
      k = template_name.to_s
      template = @discovery['links'][k] || @discovery['links'][k+'-template'] || @discovery['links'][k+'-query']
      FamilySearch::URLTemplate.new self, template
    end
Used for taking advantage of URL templates provided by the {Discovery Resource}[https://familysearch.org/.well-known/app-meta.json].

 This method will automatically call the FamilySearch::Client#discover! method in order to populate the discovery resources.

 ===Usage:

   client = FamilySearch::Client.new
   res = client.template('person').get :pid => 'KWQS-BBQ'
   res.body['persons'][0]['id] # => 'KWQS-BBQ'

 Please note, only the +get+ method has been implemented on the URLTemplate object. POST, PUT, and DELETE should be pretty easy
 to add. It just hasn't been a priority yet.

 *Args*    :
 - +template_name+: The name of the template. For the "person-template", you can pass "person-template", "person", or :person
 *Returns* :
 - FamilySearch::URLTemplate object
 *Raises*  :
 - +FamilySearch::Error::URLTemplateNotFound+: if the template is not found.