class ZoomUs::Contacts
Attributes
Public Class Methods
# File lib/zoom_us/contacts.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
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'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 `true` 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'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"> <b>Note: </b>This API only supports <b>user-managed</b> <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p><br> Scope: `chat_contact:read`<br> @param contact_id The user'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 `true` 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
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: `company`: Contacts
from the user's organization. `external`: 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
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"> <b>Note: </b> This API only supports <b>user-managed</b> <a href="marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app">OAuth app</a>.</p><br> Scope: `chat_contact:read`<br> @param [Hash] opts the optional parameters @option opts [String] :type The type of contact. The value can be one of the following: `company`: Contacts
from the user's organization. `external`: 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
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 `query_presence_status` to `true` 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
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. <br><br> Scopes: `contact:read:admin`, `contact:read`<br> @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 `query_presence_status` to `true` 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