class ZoomUs::Contacts

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/zoom_us/contacts.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_user_contact(contact_id, opts = {}) click to toggle source

Get User's Contact Details A user under an organization’s Zoom account has internal users listed under Company Contacts in the Zoom Client. A Zoom user can also add another Zoom user as a [contact](support.zoom.us/hc/en-us/articles/115004055706-Managing-Contacts). Call this API to get information on a specific contact of the Zoom user. <p style="background-color:#e1f5fe; color:#01579b; padding:8px"> Note: This API only supports user-managed <a href="OAuth“>marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p>
Scope: `chat_contact:read`
@param contact_id The user&#39;s contact Id or email address. The contact can be either a company contact or an external contact. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :query_presence_status The presence status of the contact. Include this query parameter with a value of &#x60;true&#x60; to get the presence status of the contact in the response. @return [InlineResponse2009]

# File lib/zoom_us/contacts.rb, line 28
def get_user_contact(contact_id, opts = {})
  data, _status_code, _headers = get_user_contact_with_http_info(contact_id, opts)
  data
end
get_user_contact_with_http_info(contact_id, opts = {}) click to toggle source

Get User&#39;s Contact Details A user under an organization’s Zoom account has internal users listed under Company Contacts in the Zoom Client. A Zoom user can also add another Zoom user as a [contact](support.zoom.us/hc/en-us/articles/115004055706-Managing-Contacts). Call this API to get information on a specific contact of the Zoom user. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt;This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scope: &#x60;chat_contact:read&#x60;&lt;br&gt; @param contact_id The user&#39;s contact Id or email address. The contact can be either a company contact or an external contact. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :query_presence_status The presence status of the contact. Include this query parameter with a value of &#x60;true&#x60; to get the presence status of the contact in the response. @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers

# File lib/zoom_us/contacts.rb, line 39
def get_user_contact_with_http_info(contact_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactsApi.get_user_contact ...'
  end
  # verify the required parameter 'contact_id' is set
  if @api_client.config.client_side_validation && contact_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.get_user_contact"
  end
  # resource path
  local_var_path = '/chat/users/me/contacts/{contactId}'.sub('{' + 'contactId' + '}', contact_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'query_presence_status'] = opts[:'query_presence_status'] if !opts[:'query_presence_status'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2009')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#get_user_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_contacts(opts = {}) click to toggle source

List User's Contacts A user under an organization’s Zoom account has internal users listed under Company Contacts in the Zoom Client. A Zoom user can also add another Zoom user as a [contact](support.zoom.us/hc/en-us/articles/115004055706-Managing-Contacts). Call this API to list all the contacts of a Zoom user. Zoom contacts are categorized into "company contacts" and "external contacts". You must specify the contact type in the `type` query parameter. If you do not specify, by default, the type will be set as company contact. <p style="background-color:#e1f5fe; color:#01579b; padding:8px"> Note: This API only supports user-managed <a href="OAuth“>marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p>
Scope: `chat_contact:read`
@param [Hash] opts the optional parameters @option opts [String] :type The type of contact. The value can be one of the following: &#x60;company&#x60;: Contacts from the user&#39;s organization. &#x60;external&#x60;: External contacts. (default to company) @option opts [Integer] :page_size The number of records returned with a single API call. (default to 10) @option opts [String] :next_page_token The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes. @return [InlineResponse2008]

# File lib/zoom_us/contacts.rb, line 86
def get_user_contacts(opts = {})
  data, _status_code, _headers = get_user_contacts_with_http_info(opts)
  data
end
get_user_contacts_with_http_info(opts = {}) click to toggle source

List User&#39;s Contacts A user under an organization’s Zoom account has internal users listed under Company Contacts in the Zoom Client. A Zoom user can also add another Zoom user as a [contact](support.zoom.us/hc/en-us/articles/115004055706-Managing-Contacts). Call this API to list all the contacts of a Zoom user. Zoom contacts are categorized into "company contacts&quot; and "external contacts&quot;. You must specify the contact type in the &#x60;type&#x60; query parameter. If you do not specify, by default, the type will be set as company contact. &lt;p style&#x3D;&quot;background-color:#e1f5fe; color:#01579b; padding:8px&quot;&gt; &lt;b&gt;Note: &lt;/b&gt; This API only supports &lt;b&gt;user-managed&lt;/b&gt; &lt;a href&#x3D;&quot;marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app&lt;/a&gt;.&lt;/p&gt;&lt;br&gt; Scope: &#x60;chat_contact:read&#x60;&lt;br&gt; @param [Hash] opts the optional parameters @option opts [String] :type The type of contact. The value can be one of the following: &#x60;company&#x60;: Contacts from the user&#39;s organization. &#x60;external&#x60;: External contacts. @option opts [Integer] :page_size The number of records returned with a single API call. @option opts [String] :next_page_token The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes. @return [Array<(InlineResponse2008, Fixnum, Hash)>] InlineResponse2008 data, response status code and response headers

# File lib/zoom_us/contacts.rb, line 98
def get_user_contacts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactsApi.get_user_contacts ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ContactsApi.get_user_contacts, must be smaller than or equal to 50.'
  end

  # resource path
  local_var_path = '/chat/users/me/contacts'

  # query parameters
  query_params = {}
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2008')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#get_user_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_company_contacts(search_key, opts = {}) click to toggle source

Search Company Contacts A user under an organization's Zoom account has internal users listed under Company Contacts in the Zoom Client. Use this API to search users that are in the company contacts of a Zoom account. Using the `search_key` query parameter, provide either first name, last name or the email address of the user that you would like to search for. Optionally, set `query_presence_status` to `true` in order to include the presence status of a contact.
Scopes: `contact:read:admin`, `contact:read`
@param search_key Provide the keyword - either first name, last name or email of the contact whom you have to search for. @param [Hash] opts the optional parameters @option opts [String] :query_presence_status Set &#x60;query_presence_status&#x60; to &#x60;true&#x60; in order to include the presence status of a contact in the response. @option opts [Integer] :page_size The number of records to be returned with a single API call. (default to 1) @option opts [String] :next_page_token The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes. @return [InlineResponse2005]

# File lib/zoom_us/contacts.rb, line 148
def search_company_contacts(search_key, opts = {})
  data, _status_code, _headers = search_company_contacts_with_http_info(search_key, opts)
  data
end
search_company_contacts_with_http_info(search_key, opts = {}) click to toggle source

Search Company Contacts A user under an organization&#39;s Zoom account has internal users listed under Company Contacts in the Zoom Client. Use this API to search users that are in the company contacts of a Zoom account. Using the &#x60;search_key&#x60; query parameter, provide either first name, last name or the email address of the user that you would like to search for. Optionally, set &#x60;query_presence_status&#x60; to &#x60;true&#x60; in order to include the presence status of a contact. &lt;br&gt;&lt;br&gt; Scopes: &#x60;contact:read:admin&#x60;, &#x60;contact:read&#x60;&lt;br&gt; @param search_key Provide the keyword - either first name, last name or email of the contact whom you have to search for. @param [Hash] opts the optional parameters @option opts [String] :query_presence_status Set &#x60;query_presence_status&#x60; to &#x60;true&#x60; in order to include the presence status of a contact in the response. @option opts [Integer] :page_size The number of records to be returned with a single API call. @option opts [String] :next_page_token The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes. @return [Array<(InlineResponse2005, Fixnum, Hash)>] InlineResponse2005 data, response status code and response headers

# File lib/zoom_us/contacts.rb, line 161
def search_company_contacts_with_http_info(search_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContactsApi.search_company_contacts ...'
  end
  # verify the required parameter 'search_key' is set
  if @api_client.config.client_side_validation && search_key.nil?
    fail ArgumentError, "Missing the required parameter 'search_key' when calling ContactsApi.search_company_contacts"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 25
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ContactsApi.search_company_contacts, must be smaller than or equal to 25.'
  end

  # resource path
  local_var_path = '/contacts'

  # query parameters
  query_params = {}
  query_params[:'search_key'] = search_key
  query_params[:'query_presence_status'] = opts[:'query_presence_status'] if !opts[:'query_presence_status'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2005')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ContactsApi#search_company_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end