class ActionNetworkRest::Taggings

Attributes

tag_id[RW]

Public Instance Methods

base_path() click to toggle source
# File lib/action_network_rest/taggings.rb, line 7
def base_path
  "tags/#{url_escape(tag_id)}/taggings/"
end
create(tagging_data, person_id:) click to toggle source
# File lib/action_network_rest/taggings.rb, line 11
def create(tagging_data, person_id:)
  post_body = tagging_data
  person_url = action_network_url("/people/#{url_escape(person_id)}")
  post_body['_links'] = { 'osdi:person' => { href: person_url } }

  response = client.post_request base_path, post_body
  object_from_response(response)
end
delete(id) click to toggle source
# File lib/action_network_rest/taggings.rb, line 20
def delete(id)
  response = client.delete_request "#{base_path}#{url_escape(id)}"
  object_from_response(response)
end

Private Instance Methods

osdi_key() click to toggle source
# File lib/action_network_rest/taggings.rb, line 27
def osdi_key
  'osdi:taggings'
end