Class: Pipedrive::SearchResultsApi
- Inherits:
-
Object
- Object
- Pipedrive::SearchResultsApi
- Defined in:
- lib/pipedrive-openapi-client/api/search_results_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ SearchResultsApi
constructor
A new instance of SearchResultsApi.
-
#search_results_field_get(term, field_type, field_key, opts = {}) ⇒ nil
Perform a search using a specific field value <strong>This endpoint is deprecated.
-
#search_results_field_get_with_http_info(term, field_type, field_key, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Perform a search using a specific field value <strong>This endpoint is deprecated.
-
#search_results_get(term, opts = {}) ⇒ nil
Perform a search <strong>This endpoint is deprecated.
-
#search_results_get_with_http_info(term, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Perform a search <strong>This endpoint is deprecated.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SearchResultsApi
Returns a new instance of SearchResultsApi.
19 20 21 |
# File 'lib/pipedrive-openapi-client/api/search_results_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/pipedrive-openapi-client/api/search_results_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#search_results_field_get(term, field_type, field_key, opts = {}) ⇒ nil
Perform a search using a specific field value <strong>This endpoint is deprecated. Please use <a href="developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch_field">/v1/itemSearch/field</a> instead</strong>.
Performs a search from a specific field’s values. Results can be either the distinct values of the field (useful for searching autocomplete field values), or actual items IDs (deals, persons, organizations or products).
34 35 36 37 |
# File 'lib/pipedrive-openapi-client/api/search_results_api.rb', line 34 def search_results_field_get(term, field_type, field_key, opts = {}) search_results_field_get_with_http_info(term, field_type, field_key, opts) nil end |
#search_results_field_get_with_http_info(term, field_type, field_key, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Perform a search using a specific field value <strong>This endpoint is deprecated. Please use <a href="developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch_field">/v1/itemSearch/field</a> instead</strong>. <br> Performs a search from a specific field's values. Results can be either the distinct values of the field (useful for searching autocomplete field values), or actual items IDs (deals, persons, organizations or products).
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/pipedrive-openapi-client/api/search_results_api.rb', line 51 def search_results_field_get_with_http_info(term, field_type, field_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SearchResultsApi.search_results_field_get ...' end # verify the required parameter 'term' is set if @api_client.config.client_side_validation && term.nil? fail ArgumentError, "Missing the required parameter 'term' when calling SearchResultsApi.search_results_field_get" end # verify the required parameter 'field_type' is set if @api_client.config.client_side_validation && field_type.nil? fail ArgumentError, "Missing the required parameter 'field_type' when calling SearchResultsApi.search_results_field_get" end # verify enum value allowable_values = ["dealField", "personField", "organizationField", "productField"] if @api_client.config.client_side_validation && !allowable_values.include?(field_type) fail ArgumentError, "invalid value for \"field_type\", must be one of #{allowable_values}" end # verify the required parameter 'field_key' is set if @api_client.config.client_side_validation && field_key.nil? fail ArgumentError, "Missing the required parameter 'field_key' when calling SearchResultsApi.search_results_field_get" end # resource path local_var_path = '/searchResults/field' # query parameters query_params = opts[:query_params] || {} query_params[:'term'] = term query_params[:'field_type'] = field_type query_params[:'field_key'] = field_key query_params[:'exact_match'] = opts[:'exact_match'] if !opts[:'exact_match'].nil? query_params[:'return_field_key'] = opts[:'return_field_key'] if !opts[:'return_field_key'].nil? query_params[:'return_item_ids'] = opts[:'return_item_ids'] if !opts[:'return_item_ids'].nil? query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SearchResultsApi#search_results_field_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_results_get(term, opts = {}) ⇒ nil
Perform a search <strong>This endpoint is deprecated. Please use <a href="developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch">/v1/itemSearch</a> instead</strong>.
Performs a search across the account and returns SearchResults.
126 127 128 129 |
# File 'lib/pipedrive-openapi-client/api/search_results_api.rb', line 126 def search_results_get(term, opts = {}) search_results_get_with_http_info(term, opts) nil end |
#search_results_get_with_http_info(term, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Perform a search <strong>This endpoint is deprecated. Please use <a href="developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch">/v1/itemSearch</a> instead</strong>. <br> Performs a search across the account and returns SearchResults.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/pipedrive-openapi-client/api/search_results_api.rb', line 140 def search_results_get_with_http_info(term, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SearchResultsApi.search_results_get ...' end # verify the required parameter 'term' is set if @api_client.config.client_side_validation && term.nil? fail ArgumentError, "Missing the required parameter 'term' when calling SearchResultsApi.search_results_get" end allowable_values = ["deal", "person", "organization", "product", "file"] if @api_client.config.client_side_validation && opts[:'item_type'] && !allowable_values.include?(opts[:'item_type']) fail ArgumentError, "invalid value for \"item_type\", must be one of #{allowable_values}" end # resource path local_var_path = '/searchResults' # query parameters query_params = opts[:query_params] || {} query_params[:'term'] = term query_params[:'item_type'] = opts[:'item_type'] if !opts[:'item_type'].nil? query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'exact_match'] = opts[:'exact_match'] if !opts[:'exact_match'].nil? # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['api_key', 'oauth2'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SearchResultsApi#search_results_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |