Class: SignRequestClient::DocumentsSearchApi
- Inherits:
-
Object
- Object
- SignRequestClient::DocumentsSearchApi
- Defined in:
- lib/signrequest_client/api/documents_search_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#documents_search_list(opts = {}) ⇒ InlineResponse2002
Search documents Search interface for fast (autocomplete) searching of documents.
-
#documents_search_list_with_http_info(opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
Search documents Search interface for fast (autocomplete) searching of documents.
-
#initialize(api_client = ApiClient.default) ⇒ DocumentsSearchApi
constructor
A new instance of DocumentsSearchApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ DocumentsSearchApi
Returns a new instance of DocumentsSearchApi.
19 20 21 |
# File 'lib/signrequest_client/api/documents_search_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/signrequest_client/api/documents_search_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#documents_search_list(opts = {}) ⇒ InlineResponse2002
Search documents Search interface for fast (autocomplete) searching of documents. This can be useful to have your users search for a document in your interface. Document names are tokenized on whitespace, hyphens and underscores to also match partial document names. *Normal search:* - ?q={query} *Autocomplete search:* - ?autocomplete=query} *Search in document name:* - ?name={query} *Available (extra) filters:* - ?subdomain=team_subdomain } or use this endpoint with team_subdomain.signrequest.com (when not provided only personal documents are shown) - ?signer_emails[email protected] } (will filter documents that an email needed to sign/approve) - ?status=si } - ?who=mo } To include multiple values for a filter field separate the values with a pipe (|). For example to only search for completed documents use **status=se|vi** (sent and viewed). Pagination: - ?page=page_number: default 1 } - ?limit=limit results: default 10, max 100 } Format: By default json is returned, to export data as csv or xls use the format parameter. - ?format=csv - ?format=xls For csv and xls the data can also be exported with each signer on a separate row. In this mode also the signer inputs that have an external_id specified on a tag will be exported. All external_id’s found will be exported as columns. To use this mode add the signer_data parameter. - ?format=csv&signer_data=1 - ?format=xls&signer_data=1 Note that all documents are only ordered by created (newest first) when q, autocomplete or name are not used, else they are ordered by the strenght of the match.
37 38 39 40 |
# File 'lib/signrequest_client/api/documents_search_api.rb', line 37 def documents_search_list(opts = {}) data, _status_code, _headers = documents_search_list_with_http_info(opts) data end |
#documents_search_list_with_http_info(opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
Search documents Search interface for fast (autocomplete) searching of documents. This can be useful to have your users search for a document in your interface. Document names are tokenized on whitespace, hyphens and underscores to also match partial document names. *Normal search:* - ?q={query} *Autocomplete search:* - ?autocomplete=query} *Search in document name:* - ?name={query} *Available (extra) filters:* - ?subdomain=team_subdomain } or use this endpoint with team_subdomain.signrequest.com (when not provided only personal documents are shown) - ?signer_emails=[email protected] } (will filter documents that an email needed to sign/approve) - ?status=si } - ?who=mo } To include multiple values for a filter field separate the values with a pipe (|). For example to only search for completed documents use **status=se|vi** (sent and viewed). Pagination: - ?page=page_number: default 1 } - ?limit=limit results: default 10, max 100 } Format: By default json is returned, to export data as csv or xls use the format parameter. - ?format=csv - ?format=xls For csv and xls the data can also be exported with each signer on a separate row. In this mode also the signer inputs that have an external_id specified on a tag will be exported. All external_id's found will be exported as columns. To use this mode add the signer_data parameter. - ?format=csv&signer_data=1 - ?format=xls&signer_data=1 Note that all documents are only ordered by created (newest first) when q, autocomplete or name are not used, else they are ordered by the strenght of the match.
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 |
# File 'lib/signrequest_client/api/documents_search_api.rb', line 57 def documents_search_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentsSearchApi.documents_search_list ...' end # resource path local_var_path = '/documents-search/' # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'autocomplete'] = opts[:'autocomplete'] if !opts[:'autocomplete'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'subdomain'] = opts[:'subdomain'] if !opts[:'subdomain'].nil? query_params[:'signer_emails'] = opts[:'signer_emails'] if !opts[:'signer_emails'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'who'] = opts[:'who'] if !opts[:'who'].nil? query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil? query_params[:'signer_data'] = opts[:'signer_data'] if !opts[:'signer_data'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.ms-excel']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Token'] 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 => 'InlineResponse2002') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentsSearchApi#documents_search_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |