class Uiza::Category

Constants

OBJECT_API_PATH

Public Class Methods

create_relation(entity_id, metadata_ids) click to toggle source
# File lib/uiza/category.rb, line 21
def create_relation entity_id, metadata_ids
  url = "https://#{Uiza.workspace_api_domain}/api/public/v3/media/entity/related/metadata"
  method = :post
  headers = {"Authorization" => Uiza.authorization}
  params = {entityId: entity_id, metadataIds: metadata_ids}
  description_link = OBJECT_API_DESCRIPTION_LINK[:create_relation]

  uiza_client = UizaClient.new url, method, headers, params, description_link
  uiza_client.execute_request
end
delete_relation(entity_id, metadata_ids) click to toggle source
# File lib/uiza/category.rb, line 32
def delete_relation entity_id, metadata_ids
  url = "https://#{Uiza.workspace_api_domain}/api/public/v3/media/entity/related/metadata"
  method = :post
  headers = {"Authorization" => Uiza.authorization}
  params = {entityId: entity_id, metadataIds: metadata_ids}
  description_link = OBJECT_API_DESCRIPTION_LINK[:delete_relation]

  uiza_client = UizaClient.new url, method, headers, params, description_link
  uiza_client.execute_request
end