Skip to content

Latest commit

 

History

History
85 lines (61 loc) · 2.39 KB

File metadata and controls

85 lines (61 loc) · 2.39 KB

RankVectors::AnalyticsApi

All URIs are relative to https://api.rankvectors.com

Method HTTP request Description
get_project_analytics GET /api/projects/{projectId}/analytics Get project analytics

get_project_analytics

get_project_analytics(project_id, opts)

Get project analytics

Get detailed analytics for a project

Examples

require 'time'
require 'rankvectors'
# setup authorization
RankVectors.configure do |config|
  # Configure API key authorization: ApiKeyAuth
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RankVectors::AnalyticsApi.new
project_id = 'proj-123' # String | Unique identifier for the project
opts = {
  start_date: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Start date for analytics
  end_date: Time.parse('2013-10-20T19:20:30+01:00') # Time | End date for analytics
}

begin
  # Get project analytics
  result = api_instance.get_project_analytics(project_id, opts)
  p result
rescue RankVectors::ApiError => e
  puts "Error when calling AnalyticsApi->get_project_analytics: #{e}"
end

Using the get_project_analytics_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_project_analytics_with_http_info(project_id, opts)

begin
  # Get project analytics
  data, status_code, headers = api_instance.get_project_analytics_with_http_info(project_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ProjectAnalytics>
rescue RankVectors::ApiError => e
  puts "Error when calling AnalyticsApi->get_project_analytics_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
project_id String Unique identifier for the project
start_date Time Start date for analytics [optional]
end_date Time End date for analytics [optional]

Return type

ProjectAnalytics

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json