Module: Infusionsoft::Client::Search
- Included in:
- Infusionsoft::Client
- Defined in:
- lib/infusionsoft/client/search.rb
Overview
In order to retrieve the id number for saved searches you will need to utilize
the data_query method and query the table called SavedFilter based on the user_id you are looking for the saved search Id for. Also note that UserId field on the SavedFilter table can contain multiple userId’s separated by a comma, so if you are querying for a report created by userId 6, I recommend appending the wildcard to the end of the userId. Something like $query = array( ‘UserId’ => ’6%’ );
Instance Method Summary collapse
-
#search_get_all_report_columns(saved_search_id, user_id) ⇒ Hash
Gets all possible fields/columns available for return on a saved search/report.
-
#search_get_available_quick_searches(user_id) ⇒ Array
This is used to find what possible quick searches the given user has access to.
-
#search_get_default_search_type(user_id) ⇒ String
Retrieves the quick search type that the given users has set as their default.
-
#search_get_saved_search_results(saved_search_id, user_id, page_number) ⇒ Hash
Runs a saved search/report and returns all possible fields.
-
#search_quick_search(search_type, user_id, search_data, page, limit) ⇒ Array<Hash>
This allows you to run a quick search via the API.
Instance Method Details
#search_get_all_report_columns(saved_search_id, user_id) ⇒ Hash
Gets all possible fields/columns available for return on a saved search/report.
20 21 22 |
# File 'lib/infusionsoft/client/search.rb', line 20 def search_get_all_report_columns(saved_search_id, user_id) response = xmlrpc('SearchService.getAllReportColumns', saved_search_id, user_id) end |
#search_get_available_quick_searches(user_id) ⇒ Array
This is used to find what possible quick searches the given user has access to.
39 40 41 |
# File 'lib/infusionsoft/client/search.rb', line 39 def search_get_available_quick_searches(user_id) response = xmlrpc('SearchService.getAvailableQuickSearches', user_id) end |
#search_get_default_search_type(user_id) ⇒ String
Retrieves the quick search type that the given users has set as their default.
61 62 63 |
# File 'lib/infusionsoft/client/search.rb', line 61 def search_get_default_search_type(user_id) response = xmlrpc('SearchService.getDefaultQuickSearch', user_id) end |
#search_get_saved_search_results(saved_search_id, user_id, page_number) ⇒ Hash
Runs a saved search/report and returns all possible fields.
30 31 32 33 |
# File 'lib/infusionsoft/client/search.rb', line 30 def search_get_saved_search_results(saved_search_id, user_id, page_number) response = xmlrpc('SearchService.getSavedSearchResultsAllFields', saved_search_id, user_id, page_number) end |
#search_quick_search(search_type, user_id, search_data, page, limit) ⇒ Array<Hash>
This allows you to run a quick search via the API. The quick search is the search bar in the upper right hand corner of the Infusionsoft application
53 54 55 |
# File 'lib/infusionsoft/client/search.rb', line 53 def search_quick_search(search_type, user_id, search_data, page, limit) response = xmlrpc('SearchService.quickSearch', search_type, user_id, search_data, page, limit) end |