Class: Caplinked::Client

Inherits:
Object
  • Object
show all
Includes:
REST::API, Utils
Defined in:
lib/caplinked/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from REST::Workspaces

#create_workspace, #get_workspace_info, #list_all_workspaces_for_a_team, #update_workspace_info

Methods included from REST::Watermarks

#create_watermark, #delete_watermark, #get_watermark, #update_watermark

Methods included from REST::Users

#create_user, #delete_user, #get_user_info, #update_user

Methods included from REST::Teams

#add_team_member, #create_team, #get_list_of_team_members, #get_list_of_team_watermarks, #get_list_of_teams, #get_team_info, #remove_team_member, #update_team_info

Methods included from REST::Permissions

#get_folder_permissions, #update_folder_permissions

Methods included from REST::Organizations

#add_organization_member, #get_organization_info, #remove_organization_member, #show_organization_members, #update_organization_info, #update_organization_support_info

Methods included from REST::Groups

#add_group_member, #create_group, #delete_group, #disable_access_expiration, #disable_drm_expiration, #enable_access_expiration, #get_group_info, #list_all_group_members, #list_all_groups_in_workspace, #remove_group_member, #update_group, #update_group_drm, #watermarking_for_group

Methods included from REST::Folders

#copy_folder, #create_a_new_folder, #delete_folder, #get_folder_info, #move_folder, #update_folder_info

Methods included from REST::Files

#copy_file, #delete_file, #get_file_info, #get_file_viewer, #move_file, #update_file_info, #upload_file

Methods included from REST::Downloads

#create_zip_file, #delete_download, #download_status, #get_zip, #single_file_download

Methods included from REST::Activities

#get_workspace_activities

Methods included from Utils

#perform_delete, #perform_get, #perform_post, #perform_put, #perform_put_with_binary_data

Constructor Details

#initialize(options = {}) {|_self| ... } ⇒ Client

Usage: client = Caplinked::Client.new api_key: ‘…’, api_host: ‘sandbox.caplinked.com’ client.upload_file file_name: ‘…’,

Yields:

  • (_self)

Yield Parameters:



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/caplinked/client.rb', line 17

def initialize(options = {})
  options[:api_key] ||= ''
  options[:api_secret_key] ||= ''
  options[:api_user_token] ||= ''
  options[:api_host] ||= 'sandbox.caplinked.com'
  options[:api_scheme] ||= 'https'

  options.each do |key, value|
    instance_variable_set "@#{key}", value
  end
  yield(self) if block_given?
end

Instance Attribute Details

#api_hostObject

Returns the value of attribute api_host.



12
13
14
# File 'lib/caplinked/client.rb', line 12

def api_host
  @api_host
end

#api_keyObject

Returns the value of attribute api_key.



12
13
14
# File 'lib/caplinked/client.rb', line 12

def api_key
  @api_key
end

#api_schemeObject

Returns the value of attribute api_scheme.



12
13
14
# File 'lib/caplinked/client.rb', line 12

def api_scheme
  @api_scheme
end

#api_secret_keyObject

Returns the value of attribute api_secret_key.



12
13
14
# File 'lib/caplinked/client.rb', line 12

def api_secret_key
  @api_secret_key
end

#api_user_tokenObject

Returns the value of attribute api_user_token.



12
13
14
# File 'lib/caplinked/client.rb', line 12

def api_user_token
  @api_user_token
end