Method: Algolia::AnalyticsClient#get_users_count_with_http_info
- Defined in:
- lib/algolia/api/analytics_client.rb
#get_users_count_with_http_info(index, start_date = nil, end_date = nil, tags = nil, request_options = {}) ⇒ Http::Response
Retrieves the number of unique users within a time range, including a daily breakdown. Since this endpoint returns the number of unique users, the sum of the daily values might be different from the total number. By default, Algolia distinguishes search users by their IP address, unless you include a pseudonymous user identifier in your search requests with the userToken API parameter or x-algolia-usertoken request header. By default, the analyzed period includes the last eight days including the current day.
Required API Key ACLs:
- analytics
1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 |
# File 'lib/algolia/api/analytics_client.rb', line 1610 def get_users_count_with_http_info(index, start_date = nil, end_date = nil, = nil, = {}) # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? raise ArgumentError, "Parameter `index` is required when calling `get_users_count`." end path = "/2/users/count" query_params = {} query_params[:index] = index query_params[:startDate] = start_date unless start_date.nil? query_params[:endDate] = end_date unless end_date.nil? query_params[:tags] = unless .nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :"AnalyticsClient.get_users_count", :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |