mencoro 1.0.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +41 -5
- data/docs/AccountApi.md +1 -1
- data/docs/AnalyticsApi.md +96 -86
- data/docs/AsyncJobResource.md +3 -1
- data/docs/AsyncJobResourceError.md +20 -0
- data/docs/BillingApi.md +1 -1
- data/docs/CitedSourceRow.md +32 -0
- data/docs/CitedSourcesResponse.md +20 -0
- data/docs/ClusterBreakdownRow.md +82 -0
- data/docs/ClustersApi.md +74 -0
- data/docs/CompetitorCoOccurrenceResponse.md +18 -0
- data/docs/CompetitorCoOccurrenceRow.md +36 -0
- data/docs/CompetitorShareOfVoice.md +20 -0
- data/docs/CreateInvitation201Response.md +4 -0
- data/docs/CreateInvitationRequest.md +3 -1
- data/docs/CreateInvitationRequestProjectAccess.md +20 -0
- data/docs/DiscoveryApi.md +1 -1
- data/docs/GetMeStats200ResponseProjects.md +1 -1
- data/docs/GetOrganizationOverview200ResponseAggregate.md +1 -1
- data/docs/GetOrganizationOverview200ResponseProjectsInner.md +8 -2
- data/docs/GetOrganizationStats200ResponseInvitations.md +1 -1
- data/docs/GetOrganizationStats200ResponseMembers.md +1 -1
- data/docs/GetOrganizationStats200ResponseProjects.md +1 -1
- data/docs/InvitationResource.md +5 -1
- data/docs/JobsApi.md +1 -1
- data/docs/KeywordListingResource.md +12 -10
- data/docs/KeywordListingResourceCarriedPositions.md +24 -0
- data/docs/KeywordListingResourceCarriedPositionsSerp.md +20 -0
- data/docs/ListProjects200Response.md +1 -1
- data/docs/MemberResource.md +5 -1
- data/docs/MembersApi.md +78 -0
- data/docs/MentionMatchResource.md +44 -0
- data/docs/MentionSampleResponse.md +46 -0
- data/docs/MentionTypeCounts.md +26 -0
- data/docs/OrganizationsApi.md +3 -3
- data/docs/PerCompetitorSentiment.md +30 -0
- data/docs/PerEngineSentiment.md +28 -0
- data/docs/PerEntityMetrics.md +32 -0
- data/docs/PositionDistributionBucket.md +20 -0
- data/docs/ProjectMentionMixResponse.md +22 -0
- data/docs/ProjectMentionSamplesResponse.md +20 -0
- data/docs/ProjectRankTrackingClusterBreakdown.md +20 -0
- data/docs/ProjectRankTrackingStats.md +96 -0
- data/docs/ProjectRankTrackingTimeSeries.md +20 -0
- data/docs/ProjectSentimentBreakdown.md +20 -0
- data/docs/ProjectedMonthlyChecksResource.md +2 -2
- data/docs/ProjectsApi.md +76 -2
- data/docs/SearchTrackedQueryMentionMatches200Response.md +20 -0
- data/docs/SearchTrackedQuerySerpMatches200Response.md +20 -0
- data/docs/SerpMatchResource.md +30 -0
- data/docs/SetMemberProjectAccessRequest.md +20 -0
- data/docs/SubscriptionResource.md +1 -1
- data/docs/TimeSeriesPoint.md +22 -0
- data/docs/TrackedQueriesApi.md +175 -3
- data/docs/TrackedQueryCountResource.md +1 -1
- data/docs/TrackedQueryMoverRow.md +58 -0
- data/docs/TrackedQueryMoversResponse.md +22 -0
- data/docs/TrackedQueryRankTrackingTimeSeries.md +20 -0
- data/docs/TrackedQueryUsageResource.md +1 -1
- data/lib/mencoro/api/account_api.rb +3 -3
- data/lib/mencoro/api/analytics_api.rb +103 -85
- data/lib/mencoro/api/billing_api.rb +3 -3
- data/lib/mencoro/api/captures_api.rb +2 -2
- data/lib/mencoro/api/clusters_api.rb +76 -1
- data/lib/mencoro/api/discovery_api.rb +3 -3
- data/lib/mencoro/api/invitations_api.rb +1 -1
- data/lib/mencoro/api/jobs_api.rb +3 -3
- data/lib/mencoro/api/members_api.rb +95 -1
- data/lib/mencoro/api/organization_operations_api.rb +1 -1
- data/lib/mencoro/api/organizations_api.rb +7 -7
- data/lib/mencoro/api/projects_api.rb +80 -5
- data/lib/mencoro/api/tracked_queries_api.rb +220 -8
- data/lib/mencoro/api_client.rb +2 -2
- data/lib/mencoro/api_error.rb +1 -1
- data/lib/mencoro/api_model_base.rb +1 -1
- data/lib/mencoro/configuration.rb +1 -1
- data/lib/mencoro/models/accepted_job_resource.rb +1 -1
- data/lib/mencoro/models/ai_response_report_resource.rb +1 -1
- data/lib/mencoro/models/ai_response_resource.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_clusters_inner.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_failed_inner.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_skipped_clusters_inner.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_successful_inner.rb +1 -1
- data/lib/mencoro/models/async_job_resource.rb +17 -7
- data/lib/mencoro/models/async_job_resource_error.rb +217 -0
- data/lib/mencoro/models/batch_change_tracked_query_check_frequency_request_data.rb +1 -1
- data/lib/mencoro/models/batch_change_tracked_query_passes_request_data.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_outcome.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_outcome_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_outcome_successful_inner.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_request_data.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_request_data.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_result_resource.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_result_resource_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_result_resource_successful_inner.rb +1 -1
- data/lib/mencoro/models/batch_force_check_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/batch_force_check_tracked_queries200_response_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_pause_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/batch_pause_tracked_queries200_response_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_pause_tracked_queries200_response_successful_inner.rb +1 -1
- data/lib/mencoro/models/batch_resume_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/batch_targets_request_data.rb +1 -1
- data/lib/mencoro/models/batch_write_outcome.rb +1 -1
- data/lib/mencoro/models/batch_write_outcome_failed_inner.rb +1 -1
- data/lib/mencoro/models/brand_profile_resource.rb +1 -1
- data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries_request.rb +1 -1
- data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries_request.rb +1 -1
- data/lib/mencoro/models/change_member_role_request.rb +1 -1
- data/lib/mencoro/models/change_tracked_query_check_frequency_request_data.rb +1 -1
- data/lib/mencoro/models/change_tracked_query_passes_request_data.rb +1 -1
- data/lib/mencoro/models/citation_resource.rb +1 -1
- data/lib/mencoro/models/cited_source_row.rb +298 -0
- data/lib/mencoro/models/cited_sources_response.rb +192 -0
- data/lib/mencoro/models/cluster_breakdown_row.rb +580 -0
- data/lib/mencoro/models/cluster_membership_request_data.rb +1 -1
- data/lib/mencoro/models/competitor_co_occurrence_response.rb +166 -0
- data/lib/mencoro/models/competitor_co_occurrence_row.rb +318 -0
- data/lib/mencoro/models/competitor_resource.rb +1 -1
- data/lib/mencoro/models/competitor_share_of_voice.rb +174 -0
- data/lib/mencoro/models/create_competitor_request.rb +1 -1
- data/lib/mencoro/models/create_invitation200_response.rb +1 -1
- data/lib/mencoro/models/create_invitation201_response.rb +60 -2
- data/lib/mencoro/models/create_invitation_request.rb +15 -5
- data/lib/mencoro/models/create_invitation_request_project_access.rb +201 -0
- data/lib/mencoro/models/create_organization201_response.rb +1 -1
- data/lib/mencoro/models/create_organization_request.rb +1 -1
- data/lib/mencoro/models/create_project_request.rb +1 -1
- data/lib/mencoro/models/create_project_request_competitors_inner.rb +1 -1
- data/lib/mencoro/models/create_query_cluster409_response.rb +1 -1
- data/lib/mencoro/models/create_query_cluster_request.rb +1 -1
- data/lib/mencoro/models/delete_query_cluster200_response.rb +1 -1
- data/lib/mencoro/models/entitlements_resource.rb +1 -1
- data/lib/mencoro/models/get_available_filters200_response.rb +1 -1
- data/lib/mencoro/models/get_available_filters200_response_clusters_inner.rb +1 -1
- data/lib/mencoro/models/get_me_stats200_response.rb +1 -1
- data/lib/mencoro/models/get_me_stats200_response_organizations.rb +1 -1
- data/lib/mencoro/models/get_me_stats200_response_projects.rb +2 -2
- data/lib/mencoro/models/get_membership_stats200_response.rb +1 -1
- data/lib/mencoro/models/get_mention_samples400_response.rb +1 -1
- data/lib/mencoro/models/get_mention_samples400_response_details_value_inner.rb +1 -1
- data/lib/mencoro/models/get_metric_glossary200_response.rb +1 -1
- data/lib/mencoro/models/get_metric_glossary200_response_metrics_inner.rb +1 -1
- data/lib/mencoro/models/get_organization_overview200_response.rb +1 -1
- data/lib/mencoro/models/get_organization_overview200_response_aggregate.rb +2 -2
- data/lib/mencoro/models/get_organization_overview200_response_projects_inner.rb +34 -3
- data/lib/mencoro/models/get_organization_stats200_response.rb +1 -1
- data/lib/mencoro/models/get_organization_stats200_response_invitations.rb +4 -7
- data/lib/mencoro/models/get_organization_stats200_response_members.rb +4 -7
- data/lib/mencoro/models/get_organization_stats200_response_projects.rb +2 -2
- data/lib/mencoro/models/get_share_of_voice_formula200_response.rb +1 -1
- data/lib/mencoro/models/get_tracking_coverage200_response.rb +1 -1
- data/lib/mencoro/models/get_tracking_coverage200_response_sample_inner.rb +1 -1
- data/lib/mencoro/models/invitation_resource.rb +64 -6
- data/lib/mencoro/models/keyword_listing_resource.rb +40 -14
- data/lib/mencoro/models/keyword_listing_resource_carried_positions.rb +187 -0
- data/lib/mencoro/models/keyword_listing_resource_carried_positions_serp.rb +192 -0
- data/lib/mencoro/models/keyword_listing_resource_mention_type_counts.rb +1 -1
- data/lib/mencoro/models/list_ai_responses200_response.rb +1 -1
- data/lib/mencoro/models/list_competitors200_response.rb +1 -1
- data/lib/mencoro/models/list_invitations200_response.rb +1 -1
- data/lib/mencoro/models/list_keyword_listings200_response.rb +1 -1
- data/lib/mencoro/models/list_members200_response.rb +1 -1
- data/lib/mencoro/models/list_organizations200_response.rb +1 -1
- data/lib/mencoro/models/list_projects200_response.rb +2 -2
- data/lib/mencoro/models/list_query_clusters200_response.rb +1 -1
- data/lib/mencoro/models/list_search_snapshots200_response.rb +1 -1
- data/lib/mencoro/models/list_shopping_snapshots200_response.rb +1 -1
- data/lib/mencoro/models/me_resource.rb +1 -1
- data/lib/mencoro/models/member_resource.rb +63 -5
- data/lib/mencoro/models/mention_match_resource.rb +432 -0
- data/lib/mencoro/models/mention_sample_response.rb +450 -0
- data/lib/mencoro/models/mention_type_counts.rb +268 -0
- data/lib/mencoro/models/operation_effect.rb +1 -1
- data/lib/mencoro/models/organization_resource.rb +1 -1
- data/lib/mencoro/models/per_competitor_sentiment.rb +304 -0
- data/lib/mencoro/models/per_engine_sentiment.rb +278 -0
- data/lib/mencoro/models/per_entity_metrics.rb +218 -0
- data/lib/mencoro/models/position_distribution_bucket.rb +190 -0
- data/lib/mencoro/models/preview_organization_operation200_response.rb +1 -1
- data/lib/mencoro/models/preview_organization_operation200_response_organization.rb +1 -1
- data/lib/mencoro/models/preview_organization_operation_request.rb +3 -3
- data/lib/mencoro/models/project_detail_resource.rb +1 -1
- data/lib/mencoro/models/project_detail_resource_competitors_inner.rb +1 -1
- data/lib/mencoro/models/project_mention_mix_response.rb +222 -0
- data/lib/mencoro/models/project_mention_samples_response.rb +192 -0
- data/lib/mencoro/models/project_rank_tracking_cluster_breakdown.rb +176 -0
- data/lib/mencoro/models/project_rank_tracking_stats.rb +718 -0
- data/lib/mencoro/models/project_rank_tracking_time_series.rb +176 -0
- data/lib/mencoro/models/project_resource.rb +1 -1
- data/lib/mencoro/models/project_sentiment_breakdown.rb +194 -0
- data/lib/mencoro/models/projected_monthly_checks_resource.rb +3 -3
- data/lib/mencoro/models/query_cluster_resource.rb +1 -1
- data/lib/mencoro/models/report_ai_response_request.rb +1 -1
- data/lib/mencoro/models/search_result_resource.rb +1 -1
- data/lib/mencoro/models/search_snapshot_resource.rb +1 -1
- data/lib/mencoro/models/search_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/search_tracked_query_mention_matches200_response.rb +158 -0
- data/lib/mencoro/models/search_tracked_query_serp_matches200_response.rb +158 -0
- data/lib/mencoro/models/serp_match_resource.rb +314 -0
- data/lib/mencoro/models/set_member_project_access_request.rb +200 -0
- data/lib/mencoro/models/shopping_offer_resource.rb +1 -1
- data/lib/mencoro/models/shopping_snapshot_resource.rb +1 -1
- data/lib/mencoro/models/start_brand_discovery_job_request.rb +1 -1
- data/lib/mencoro/models/start_brand_name_suggestion_job_request.rb +1 -1
- data/lib/mencoro/models/start_clustering_job_request_data.rb +1 -1
- data/lib/mencoro/models/start_keyword_discovery_job_request.rb +1 -1
- data/lib/mencoro/models/start_prompt_discovery_job_request.rb +1 -1
- data/lib/mencoro/models/submitted_checks_resource.rb +1 -1
- data/lib/mencoro/models/subscription_resource.rb +3 -3
- data/lib/mencoro/models/time_series_point.rb +218 -0
- data/lib/mencoro/models/tracked_query_count_resource.rb +3 -3
- data/lib/mencoro/models/tracked_query_detail_resource.rb +3 -3
- data/lib/mencoro/models/tracked_query_mover_row.rb +492 -0
- data/lib/mencoro/models/tracked_query_movers_response.rb +202 -0
- data/lib/mencoro/models/tracked_query_rank_tracking_time_series.rb +176 -0
- data/lib/mencoro/models/tracked_query_resource.rb +3 -3
- data/lib/mencoro/models/tracked_query_usage_resource.rb +2 -2
- data/lib/mencoro/models/update_organization_request.rb +1 -1
- data/lib/mencoro/models/update_project_brand_profile_request.rb +1 -1
- data/lib/mencoro/models/update_project_request.rb +1 -1
- data/lib/mencoro/version.rb +2 -2
- data/lib/mencoro.rb +32 -1
- data/mencoro.gemspec +2 -2
- data/spec/models/async_job_resource_error_spec.rb +46 -0
- data/spec/models/cited_source_row_spec.rb +78 -0
- data/spec/models/cited_sources_response_spec.rb +42 -0
- data/spec/models/cluster_breakdown_row_spec.rb +228 -0
- data/spec/models/competitor_co_occurrence_response_spec.rb +36 -0
- data/spec/models/competitor_co_occurrence_row_spec.rb +90 -0
- data/spec/models/competitor_share_of_voice_spec.rb +42 -0
- data/spec/models/create_invitation_request_project_access_spec.rb +46 -0
- data/spec/models/keyword_listing_resource_carried_positions_serp_spec.rb +42 -0
- data/spec/models/keyword_listing_resource_carried_positions_spec.rb +54 -0
- data/spec/models/mention_match_resource_spec.rb +114 -0
- data/spec/models/mention_sample_response_spec.rb +114 -0
- data/spec/models/mention_type_counts_spec.rb +60 -0
- data/spec/models/per_competitor_sentiment_spec.rb +72 -0
- data/spec/models/per_engine_sentiment_spec.rb +66 -0
- data/spec/models/per_entity_metrics_spec.rb +78 -0
- data/spec/models/position_distribution_bucket_spec.rb +42 -0
- data/spec/models/project_mention_mix_response_spec.rb +48 -0
- data/spec/models/project_mention_samples_response_spec.rb +42 -0
- data/spec/models/project_rank_tracking_cluster_breakdown_spec.rb +42 -0
- data/spec/models/project_rank_tracking_stats_spec.rb +270 -0
- data/spec/models/project_rank_tracking_time_series_spec.rb +42 -0
- data/spec/models/project_sentiment_breakdown_spec.rb +42 -0
- data/spec/models/search_tracked_query_mention_matches200_response_spec.rb +42 -0
- data/spec/models/search_tracked_query_serp_matches200_response_spec.rb +42 -0
- data/spec/models/serp_match_resource_spec.rb +72 -0
- data/spec/models/set_member_project_access_request_spec.rb +46 -0
- data/spec/models/time_series_point_spec.rb +48 -0
- data/spec/models/tracked_query_mover_row_spec.rb +156 -0
- data/spec/models/tracked_query_movers_response_spec.rb +48 -0
- data/spec/models/tracked_query_rank_tracking_time_series_spec.rb +42 -0
- data/spec/spec_helper.rb +1 -1
- metadata +235 -108
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -374,7 +374,7 @@ module Mencoro
|
|
|
374
374
|
end
|
|
375
375
|
|
|
376
376
|
# Check several tracked queries now
|
|
377
|
-
# Minimum role: manager. Asks for a fresh check of up to 100 named tracked queries straight away, ignoring how recently each was last checked. Answers 200 with per-item results and NO job id: a check that is already in flight for a query is reused rather than started again, so there is no id this operation could hand back that is guaranteed to exist. Follow progress on the tracked query itself — its lastCheckedAt advances when the check completes. A successful item means the check was accepted for submission with budget available for it at that moment; it does not mean the check has run. A checked query costs one
|
|
377
|
+
# Minimum role: manager. Asks for a fresh check of up to 100 named tracked queries straight away, ignoring how recently each was last checked. Answers 200 with per-item results and NO job id: a check that is already in flight for a query is reused rather than started again, so there is no id this operation could hand back that is guaranteed to exist. Follow progress on the tracked query itself — its lastCheckedAt advances when the check completes. A successful item means the check was accepted for submission with budget available for it at that moment; it does not mean the check has run. A checked query costs one check per pass; a Claude pass counts as five (nPasses), and items that do not fit the remaining budget are reported as failed with `check_budget_forecast_exhausted`, or `subscription_not_found` when the organization has no entitled subscription — they are never reported as successful. That budget figure is a forecast for this batch, and a pessimistic one: a tracked query already being checked is joined to the check in flight and costs nothing, but it is still debited here, so an item refused this way may have fitted. Resubmit it in a later batch rather than treating the refusal as a statement about your subscription. A paused query is reported as failed with `tracked_query_already_paused`: paused queries are never checked. An id that is not a tracked query of this project is reported as failed with `tracked_query_not_found`, exactly as an id that does not exist. Requires an Idempotency-Key header; a retry must repeat the same ids in the same order.
|
|
378
378
|
# @param organization_id [String]
|
|
379
379
|
# @param project_id [String]
|
|
380
380
|
# @param idempotency_key [String] Repeating a request with the same key and the same ids answers with the first attempt's result instead of submitting again.
|
|
@@ -387,7 +387,7 @@ module Mencoro
|
|
|
387
387
|
end
|
|
388
388
|
|
|
389
389
|
# Check several tracked queries now
|
|
390
|
-
# Minimum role: manager. Asks for a fresh check of up to 100 named tracked queries straight away, ignoring how recently each was last checked. Answers 200 with per-item results and NO job id: a check that is already in flight for a query is reused rather than started again, so there is no id this operation could hand back that is guaranteed to exist. Follow progress on the tracked query itself — its lastCheckedAt advances when the check completes. A successful item means the check was accepted for submission with budget available for it at that moment; it does not mean the check has run. A checked query costs one
|
|
390
|
+
# Minimum role: manager. Asks for a fresh check of up to 100 named tracked queries straight away, ignoring how recently each was last checked. Answers 200 with per-item results and NO job id: a check that is already in flight for a query is reused rather than started again, so there is no id this operation could hand back that is guaranteed to exist. Follow progress on the tracked query itself — its lastCheckedAt advances when the check completes. A successful item means the check was accepted for submission with budget available for it at that moment; it does not mean the check has run. A checked query costs one check per pass; a Claude pass counts as five (nPasses), and items that do not fit the remaining budget are reported as failed with `check_budget_forecast_exhausted`, or `subscription_not_found` when the organization has no entitled subscription — they are never reported as successful. That budget figure is a forecast for this batch, and a pessimistic one: a tracked query already being checked is joined to the check in flight and costs nothing, but it is still debited here, so an item refused this way may have fitted. Resubmit it in a later batch rather than treating the refusal as a statement about your subscription. A paused query is reported as failed with `tracked_query_already_paused`: paused queries are never checked. An id that is not a tracked query of this project is reported as failed with `tracked_query_not_found`, exactly as an id that does not exist. Requires an Idempotency-Key header; a retry must repeat the same ids in the same order.
|
|
391
391
|
# @param organization_id [String]
|
|
392
392
|
# @param project_id [String]
|
|
393
393
|
# @param idempotency_key [String] Repeating a request with the same key and the same ids answers with the first attempt's result instead of submitting again.
|
|
@@ -1082,7 +1082,7 @@ module Mencoro
|
|
|
1082
1082
|
end
|
|
1083
1083
|
|
|
1084
1084
|
# Count a project's tracked queries and price checking them
|
|
1085
|
-
# Minimum role: viewer. Two numbers about one project: how many tracked queries it holds, and what force-checking that same set would cost. Omit `status` to count every tracked query whatever its status; send `active` or `paused` to count and price only those. `checkCost` is a PRICED DRY RUN expressed in
|
|
1085
|
+
# Minimum role: viewer. Two numbers about one project: how many tracked queries it holds, and what force-checking that same set would cost. Omit `status` to count every tracked query whatever its status; send `active` or `paused` to count and price only those. `checkCost` is a PRICED DRY RUN expressed in checks — five checks per Claude pass and one check per pass for every other engine, the same currency as the plan allowance, so it is directly comparable with `checksAvailable` from the entitlements operation — and it is the sum of each matched tracked query's configured passes multiplied by its engine weight. Asking reserves nothing, debits nothing and starts no check. It is deliberately NOT a forecast of what the check-all operation will consume: that operation skips paused queries, skips a query whose check is already pending or running, re-runs a check awaiting retry without charging for it again, and stops at whatever budget is left — none of which is subtracted here. Count with `status=active` for the figure closest to a full check-all. Both numbers are read from the write model, so a tracked query created moments ago is already in them; that is why they can be AHEAD of the `total` returned by the tracked-queries listing, which counts a search projection, and ahead of the keyword listings, which read projections refreshed in the background. Summing the unfiltered count over every project of an organization, archived projects included, reproduces countOrganizationTrackedQueries, which counts through the same counter in the same store. An archived project still answers, because this is a read, but no check can be submitted there while it stays archived, so its cost is hypothetical. For a month of scheduled rounds across the whole organization instead of one round over one project, read getOrganizationProjectedMonthlyChecks. No monetary amount is published or implied: the cost of a check is published only in checks.
|
|
1086
1086
|
# @param organization_id [String]
|
|
1087
1087
|
# @param project_id [String]
|
|
1088
1088
|
# @param [Hash] opts the optional parameters
|
|
@@ -1094,7 +1094,7 @@ module Mencoro
|
|
|
1094
1094
|
end
|
|
1095
1095
|
|
|
1096
1096
|
# Count a project's tracked queries and price checking them
|
|
1097
|
-
# Minimum role: viewer. Two numbers about one project: how many tracked queries it holds, and what force-checking that same set would cost. Omit `status` to count every tracked query whatever its status; send `active` or `paused` to count and price only those. `checkCost` is a PRICED DRY RUN expressed in
|
|
1097
|
+
# Minimum role: viewer. Two numbers about one project: how many tracked queries it holds, and what force-checking that same set would cost. Omit `status` to count every tracked query whatever its status; send `active` or `paused` to count and price only those. `checkCost` is a PRICED DRY RUN expressed in checks — five checks per Claude pass and one check per pass for every other engine, the same currency as the plan allowance, so it is directly comparable with `checksAvailable` from the entitlements operation — and it is the sum of each matched tracked query's configured passes multiplied by its engine weight. Asking reserves nothing, debits nothing and starts no check. It is deliberately NOT a forecast of what the check-all operation will consume: that operation skips paused queries, skips a query whose check is already pending or running, re-runs a check awaiting retry without charging for it again, and stops at whatever budget is left — none of which is subtracted here. Count with `status=active` for the figure closest to a full check-all. Both numbers are read from the write model, so a tracked query created moments ago is already in them; that is why they can be AHEAD of the `total` returned by the tracked-queries listing, which counts a search projection, and ahead of the keyword listings, which read projections refreshed in the background. Summing the unfiltered count over every project of an organization, archived projects included, reproduces countOrganizationTrackedQueries, which counts through the same counter in the same store. An archived project still answers, because this is a read, but no check can be submitted there while it stays archived, so its cost is hypothetical. For a month of scheduled rounds across the whole organization instead of one round over one project, read getOrganizationProjectedMonthlyChecks. No monetary amount is published or implied: the cost of a check is published only in checks.
|
|
1098
1098
|
# @param organization_id [String]
|
|
1099
1099
|
# @param project_id [String]
|
|
1100
1100
|
# @param [Hash] opts the optional parameters
|
|
@@ -1158,7 +1158,7 @@ module Mencoro
|
|
|
1158
1158
|
end
|
|
1159
1159
|
|
|
1160
1160
|
# Check every eligible tracked query of a project now
|
|
1161
|
-
# Minimum role: manager. Submits a fresh check for every eligible tracked query of the project, ignoring how recently each was last checked, least-recently-checked first, and at most 1000 tracked queries per call. Eligible is narrower than active: a paused query is skipped, and so is one whose check is already pending or running for the same engine. A query whose check is awaiting a retry is included and, WHEN THE ENGINE HAS NOT CHANGED SINCE, costs nothing extra, because its first submission already paid for it; if the engine did change, the pending run is replaced and the replacement is paid for. What is left is trimmed to what the organization's remaining check budget can pay for — a check costs one
|
|
1161
|
+
# Minimum role: manager. Submits a fresh check for every eligible tracked query of the project, ignoring how recently each was last checked, least-recently-checked first, and at most 1000 tracked queries per call. Eligible is narrower than active: a paused query is skipped, and so is one whose check is already pending or running for the same engine. A query whose check is awaiting a retry is included and, WHEN THE ENGINE HAS NOT CHANGED SINCE, costs nothing extra, because its first submission already paid for it; if the engine did change, the pending run is replaced and the replacement is paid for. What is left is trimmed to what the organization's remaining check budget can pay for — a check costs one check per pass; a Claude pass counts as five. A subscription that is cancelled but still inside its paid grace window keeps paying for checks until that window ends. CALLING AGAIN DOES NOT CONTINUE WHERE THIS CALL STOPPED: submissions are handed to a worker, and a tracked query stops being selected only once that worker has started its check, so a second call made before the queue drains selects and submits the same tracked queries again. That is safe while the first check is still running — the duplicate is collapsed, and nothing is checked or charged twice — but a check that has already finished is run again and charged again, because this operation ignores staleness by design. To cover a project with more than 1000 eligible tracked queries, wait for the submitted wave to be picked up — each tracked query's lastCheckedAt advances when its check completes — and call again then. The response lists the tracked queries submitted and carries NO job id: a check already in flight is reused rather than started again, so no id could be guaranteed to exist. Submission is accepted, not completed: a listed tracked query can still lose the last budget units to another caller before the worker reaches it. The request takes no body, and any field sent is rejected. Requires an Idempotency-Key header.
|
|
1162
1162
|
# @param organization_id [String]
|
|
1163
1163
|
# @param project_id [String]
|
|
1164
1164
|
# @param idempotency_key [String] Repeating a request with the same key answers with the first attempt's result instead of submitting a second wave.
|
|
@@ -1170,7 +1170,7 @@ module Mencoro
|
|
|
1170
1170
|
end
|
|
1171
1171
|
|
|
1172
1172
|
# Check every eligible tracked query of a project now
|
|
1173
|
-
# Minimum role: manager. Submits a fresh check for every eligible tracked query of the project, ignoring how recently each was last checked, least-recently-checked first, and at most 1000 tracked queries per call. Eligible is narrower than active: a paused query is skipped, and so is one whose check is already pending or running for the same engine. A query whose check is awaiting a retry is included and, WHEN THE ENGINE HAS NOT CHANGED SINCE, costs nothing extra, because its first submission already paid for it; if the engine did change, the pending run is replaced and the replacement is paid for. What is left is trimmed to what the organization's remaining check budget can pay for — a check costs one
|
|
1173
|
+
# Minimum role: manager. Submits a fresh check for every eligible tracked query of the project, ignoring how recently each was last checked, least-recently-checked first, and at most 1000 tracked queries per call. Eligible is narrower than active: a paused query is skipped, and so is one whose check is already pending or running for the same engine. A query whose check is awaiting a retry is included and, WHEN THE ENGINE HAS NOT CHANGED SINCE, costs nothing extra, because its first submission already paid for it; if the engine did change, the pending run is replaced and the replacement is paid for. What is left is trimmed to what the organization's remaining check budget can pay for — a check costs one check per pass; a Claude pass counts as five. A subscription that is cancelled but still inside its paid grace window keeps paying for checks until that window ends. CALLING AGAIN DOES NOT CONTINUE WHERE THIS CALL STOPPED: submissions are handed to a worker, and a tracked query stops being selected only once that worker has started its check, so a second call made before the queue drains selects and submits the same tracked queries again. That is safe while the first check is still running — the duplicate is collapsed, and nothing is checked or charged twice — but a check that has already finished is run again and charged again, because this operation ignores staleness by design. To cover a project with more than 1000 eligible tracked queries, wait for the submitted wave to be picked up — each tracked query's lastCheckedAt advances when its check completes — and call again then. The response lists the tracked queries submitted and carries NO job id: a check already in flight is reused rather than started again, so no id could be guaranteed to exist. Submission is accepted, not completed: a listed tracked query can still lose the last budget units to another caller before the worker reaches it. The request takes no body, and any field sent is rejected. Requires an Idempotency-Key header.
|
|
1174
1174
|
# @param organization_id [String]
|
|
1175
1175
|
# @param project_id [String]
|
|
1176
1176
|
# @param idempotency_key [String] Repeating a request with the same key answers with the first attempt's result instead of submitting a second wave.
|
|
@@ -1729,7 +1729,7 @@ module Mencoro
|
|
|
1729
1729
|
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
1730
1730
|
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
1731
1731
|
end
|
|
1732
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
1732
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
1733
1733
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
1734
1734
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
1735
1735
|
end
|
|
@@ -1788,5 +1788,217 @@ module Mencoro
|
|
|
1788
1788
|
end
|
|
1789
1789
|
return data, status_code, headers
|
|
1790
1790
|
end
|
|
1791
|
+
|
|
1792
|
+
# List stored mention matches of a tracked query
|
|
1793
|
+
# Minimum role: viewer. Text mentions across own brand and tracked or untracked competitors. Citation-only rows are excluded before pagination. Read mentionRelation to distinguish own brand from untracked competitors; a null competitorId alone does not classify the mention. Newest first by detection time, with an id tie-break. Dates cover whole UTC days. Only the retained 16-month window is readable, including when dateFrom is omitted. Unknown filters are rejected. The total counts all matching rows before pagination. Send Accept: text/csv for the same bounded page and filters as CSV, with formula-safe cells and no total.
|
|
1794
|
+
# @param organization_id [String]
|
|
1795
|
+
# @param project_id [String]
|
|
1796
|
+
# @param tracked_query_id [String]
|
|
1797
|
+
# @param [Hash] opts the optional parameters
|
|
1798
|
+
# @option opts [Date] :date_from Inclusive UTC day; defaults to the retention floor.
|
|
1799
|
+
# @option opts [Date] :date_to Inclusive UTC day.
|
|
1800
|
+
# @option opts [Integer] :limit (default to 20)
|
|
1801
|
+
# @option opts [Integer] :offset (default to 0)
|
|
1802
|
+
# @option opts [String] :sort_order (default to 'desc')
|
|
1803
|
+
# @return [SearchTrackedQueryMentionMatches200Response]
|
|
1804
|
+
def search_tracked_query_mention_matches(organization_id, project_id, tracked_query_id, opts = {})
|
|
1805
|
+
data, _status_code, _headers = search_tracked_query_mention_matches_with_http_info(organization_id, project_id, tracked_query_id, opts)
|
|
1806
|
+
data
|
|
1807
|
+
end
|
|
1808
|
+
|
|
1809
|
+
# List stored mention matches of a tracked query
|
|
1810
|
+
# Minimum role: viewer. Text mentions across own brand and tracked or untracked competitors. Citation-only rows are excluded before pagination. Read mentionRelation to distinguish own brand from untracked competitors; a null competitorId alone does not classify the mention. Newest first by detection time, with an id tie-break. Dates cover whole UTC days. Only the retained 16-month window is readable, including when dateFrom is omitted. Unknown filters are rejected. The total counts all matching rows before pagination. Send Accept: text/csv for the same bounded page and filters as CSV, with formula-safe cells and no total.
|
|
1811
|
+
# @param organization_id [String]
|
|
1812
|
+
# @param project_id [String]
|
|
1813
|
+
# @param tracked_query_id [String]
|
|
1814
|
+
# @param [Hash] opts the optional parameters
|
|
1815
|
+
# @option opts [Date] :date_from Inclusive UTC day; defaults to the retention floor.
|
|
1816
|
+
# @option opts [Date] :date_to Inclusive UTC day.
|
|
1817
|
+
# @option opts [Integer] :limit (default to 20)
|
|
1818
|
+
# @option opts [Integer] :offset (default to 0)
|
|
1819
|
+
# @option opts [String] :sort_order (default to 'desc')
|
|
1820
|
+
# @return [Array<(SearchTrackedQueryMentionMatches200Response, Integer, Hash)>] SearchTrackedQueryMentionMatches200Response data, response status code and response headers
|
|
1821
|
+
def search_tracked_query_mention_matches_with_http_info(organization_id, project_id, tracked_query_id, opts = {})
|
|
1822
|
+
if @api_client.config.debugging
|
|
1823
|
+
@api_client.config.logger.debug 'Calling API: TrackedQueriesApi.search_tracked_query_mention_matches ...'
|
|
1824
|
+
end
|
|
1825
|
+
# verify the required parameter 'organization_id' is set
|
|
1826
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
1827
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling TrackedQueriesApi.search_tracked_query_mention_matches"
|
|
1828
|
+
end
|
|
1829
|
+
# verify the required parameter 'project_id' is set
|
|
1830
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1831
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TrackedQueriesApi.search_tracked_query_mention_matches"
|
|
1832
|
+
end
|
|
1833
|
+
# verify the required parameter 'tracked_query_id' is set
|
|
1834
|
+
if @api_client.config.client_side_validation && tracked_query_id.nil?
|
|
1835
|
+
fail ArgumentError, "Missing the required parameter 'tracked_query_id' when calling TrackedQueriesApi.search_tracked_query_mention_matches"
|
|
1836
|
+
end
|
|
1837
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
1838
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TrackedQueriesApi.search_tracked_query_mention_matches, must be smaller than or equal to 100.'
|
|
1839
|
+
end
|
|
1840
|
+
|
|
1841
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1842
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TrackedQueriesApi.search_tracked_query_mention_matches, must be greater than or equal to 1.'
|
|
1843
|
+
end
|
|
1844
|
+
|
|
1845
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
1846
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling TrackedQueriesApi.search_tracked_query_mention_matches, must be greater than or equal to 0.'
|
|
1847
|
+
end
|
|
1848
|
+
|
|
1849
|
+
allowable_values = ["asc", "desc"]
|
|
1850
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
1851
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
1852
|
+
end
|
|
1853
|
+
# resource path
|
|
1854
|
+
local_var_path = '/api/v1/organizations/{organizationId}/projects/{projectId}/tracked-queries/{trackedQueryId}/mention-matches'.sub('{organizationId}', CGI.escape(organization_id.to_s)).sub('{projectId}', CGI.escape(project_id.to_s)).sub('{trackedQueryId}', CGI.escape(tracked_query_id.to_s))
|
|
1855
|
+
|
|
1856
|
+
# query parameters
|
|
1857
|
+
query_params = opts[:query_params] || {}
|
|
1858
|
+
query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil?
|
|
1859
|
+
query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
|
1860
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1861
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1862
|
+
query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
1863
|
+
|
|
1864
|
+
# header parameters
|
|
1865
|
+
header_params = opts[:header_params] || {}
|
|
1866
|
+
# HTTP header 'Accept' (if needed)
|
|
1867
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv']) unless header_params['Accept']
|
|
1868
|
+
|
|
1869
|
+
# form parameters
|
|
1870
|
+
form_params = opts[:form_params] || {}
|
|
1871
|
+
|
|
1872
|
+
# http body (model)
|
|
1873
|
+
post_body = opts[:debug_body]
|
|
1874
|
+
|
|
1875
|
+
# return_type
|
|
1876
|
+
return_type = opts[:debug_return_type] || 'SearchTrackedQueryMentionMatches200Response'
|
|
1877
|
+
|
|
1878
|
+
# auth_names
|
|
1879
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
1880
|
+
|
|
1881
|
+
new_options = opts.merge(
|
|
1882
|
+
:operation => :"TrackedQueriesApi.search_tracked_query_mention_matches",
|
|
1883
|
+
:header_params => header_params,
|
|
1884
|
+
:query_params => query_params,
|
|
1885
|
+
:form_params => form_params,
|
|
1886
|
+
:body => post_body,
|
|
1887
|
+
:auth_names => auth_names,
|
|
1888
|
+
:return_type => return_type
|
|
1889
|
+
)
|
|
1890
|
+
|
|
1891
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1892
|
+
if @api_client.config.debugging
|
|
1893
|
+
@api_client.config.logger.debug "API called: TrackedQueriesApi#search_tracked_query_mention_matches\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1894
|
+
end
|
|
1895
|
+
return data, status_code, headers
|
|
1896
|
+
end
|
|
1897
|
+
|
|
1898
|
+
# List stored serp matches of a tracked query
|
|
1899
|
+
# Minimum role: viewer. Stored organic-search matches with the competitor attribution and position recorded at detection time. A null competitorId identifies the own-brand match. These are historical matches, not a reclassification using the current brand profile. Newest first by detection time, with an id tie-break. Dates cover whole UTC days. Only the retained 16-month window is readable, including when dateFrom is omitted. Unknown filters are rejected. The total counts all matching rows before pagination. Send Accept: text/csv for the same bounded page and filters as CSV, with formula-safe cells and no total.
|
|
1900
|
+
# @param organization_id [String]
|
|
1901
|
+
# @param project_id [String]
|
|
1902
|
+
# @param tracked_query_id [String]
|
|
1903
|
+
# @param [Hash] opts the optional parameters
|
|
1904
|
+
# @option opts [Date] :date_from Inclusive UTC day; defaults to the retention floor.
|
|
1905
|
+
# @option opts [Date] :date_to Inclusive UTC day.
|
|
1906
|
+
# @option opts [Integer] :limit (default to 20)
|
|
1907
|
+
# @option opts [Integer] :offset (default to 0)
|
|
1908
|
+
# @option opts [String] :sort_order (default to 'desc')
|
|
1909
|
+
# @return [SearchTrackedQuerySerpMatches200Response]
|
|
1910
|
+
def search_tracked_query_serp_matches(organization_id, project_id, tracked_query_id, opts = {})
|
|
1911
|
+
data, _status_code, _headers = search_tracked_query_serp_matches_with_http_info(organization_id, project_id, tracked_query_id, opts)
|
|
1912
|
+
data
|
|
1913
|
+
end
|
|
1914
|
+
|
|
1915
|
+
# List stored serp matches of a tracked query
|
|
1916
|
+
# Minimum role: viewer. Stored organic-search matches with the competitor attribution and position recorded at detection time. A null competitorId identifies the own-brand match. These are historical matches, not a reclassification using the current brand profile. Newest first by detection time, with an id tie-break. Dates cover whole UTC days. Only the retained 16-month window is readable, including when dateFrom is omitted. Unknown filters are rejected. The total counts all matching rows before pagination. Send Accept: text/csv for the same bounded page and filters as CSV, with formula-safe cells and no total.
|
|
1917
|
+
# @param organization_id [String]
|
|
1918
|
+
# @param project_id [String]
|
|
1919
|
+
# @param tracked_query_id [String]
|
|
1920
|
+
# @param [Hash] opts the optional parameters
|
|
1921
|
+
# @option opts [Date] :date_from Inclusive UTC day; defaults to the retention floor.
|
|
1922
|
+
# @option opts [Date] :date_to Inclusive UTC day.
|
|
1923
|
+
# @option opts [Integer] :limit (default to 20)
|
|
1924
|
+
# @option opts [Integer] :offset (default to 0)
|
|
1925
|
+
# @option opts [String] :sort_order (default to 'desc')
|
|
1926
|
+
# @return [Array<(SearchTrackedQuerySerpMatches200Response, Integer, Hash)>] SearchTrackedQuerySerpMatches200Response data, response status code and response headers
|
|
1927
|
+
def search_tracked_query_serp_matches_with_http_info(organization_id, project_id, tracked_query_id, opts = {})
|
|
1928
|
+
if @api_client.config.debugging
|
|
1929
|
+
@api_client.config.logger.debug 'Calling API: TrackedQueriesApi.search_tracked_query_serp_matches ...'
|
|
1930
|
+
end
|
|
1931
|
+
# verify the required parameter 'organization_id' is set
|
|
1932
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
1933
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling TrackedQueriesApi.search_tracked_query_serp_matches"
|
|
1934
|
+
end
|
|
1935
|
+
# verify the required parameter 'project_id' is set
|
|
1936
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
1937
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TrackedQueriesApi.search_tracked_query_serp_matches"
|
|
1938
|
+
end
|
|
1939
|
+
# verify the required parameter 'tracked_query_id' is set
|
|
1940
|
+
if @api_client.config.client_side_validation && tracked_query_id.nil?
|
|
1941
|
+
fail ArgumentError, "Missing the required parameter 'tracked_query_id' when calling TrackedQueriesApi.search_tracked_query_serp_matches"
|
|
1942
|
+
end
|
|
1943
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
1944
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TrackedQueriesApi.search_tracked_query_serp_matches, must be smaller than or equal to 100.'
|
|
1945
|
+
end
|
|
1946
|
+
|
|
1947
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1948
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TrackedQueriesApi.search_tracked_query_serp_matches, must be greater than or equal to 1.'
|
|
1949
|
+
end
|
|
1950
|
+
|
|
1951
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
1952
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling TrackedQueriesApi.search_tracked_query_serp_matches, must be greater than or equal to 0.'
|
|
1953
|
+
end
|
|
1954
|
+
|
|
1955
|
+
allowable_values = ["asc", "desc"]
|
|
1956
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
1957
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
1958
|
+
end
|
|
1959
|
+
# resource path
|
|
1960
|
+
local_var_path = '/api/v1/organizations/{organizationId}/projects/{projectId}/tracked-queries/{trackedQueryId}/serp-matches'.sub('{organizationId}', CGI.escape(organization_id.to_s)).sub('{projectId}', CGI.escape(project_id.to_s)).sub('{trackedQueryId}', CGI.escape(tracked_query_id.to_s))
|
|
1961
|
+
|
|
1962
|
+
# query parameters
|
|
1963
|
+
query_params = opts[:query_params] || {}
|
|
1964
|
+
query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil?
|
|
1965
|
+
query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
|
1966
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1967
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1968
|
+
query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
1969
|
+
|
|
1970
|
+
# header parameters
|
|
1971
|
+
header_params = opts[:header_params] || {}
|
|
1972
|
+
# HTTP header 'Accept' (if needed)
|
|
1973
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv']) unless header_params['Accept']
|
|
1974
|
+
|
|
1975
|
+
# form parameters
|
|
1976
|
+
form_params = opts[:form_params] || {}
|
|
1977
|
+
|
|
1978
|
+
# http body (model)
|
|
1979
|
+
post_body = opts[:debug_body]
|
|
1980
|
+
|
|
1981
|
+
# return_type
|
|
1982
|
+
return_type = opts[:debug_return_type] || 'SearchTrackedQuerySerpMatches200Response'
|
|
1983
|
+
|
|
1984
|
+
# auth_names
|
|
1985
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
1986
|
+
|
|
1987
|
+
new_options = opts.merge(
|
|
1988
|
+
:operation => :"TrackedQueriesApi.search_tracked_query_serp_matches",
|
|
1989
|
+
:header_params => header_params,
|
|
1990
|
+
:query_params => query_params,
|
|
1991
|
+
:form_params => form_params,
|
|
1992
|
+
:body => post_body,
|
|
1993
|
+
:auth_names => auth_names,
|
|
1994
|
+
:return_type => return_type
|
|
1995
|
+
)
|
|
1996
|
+
|
|
1997
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1998
|
+
if @api_client.config.debugging
|
|
1999
|
+
@api_client.config.logger.debug "API called: TrackedQueriesApi#search_tracked_query_serp_matches\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2000
|
+
end
|
|
2001
|
+
return data, status_code, headers
|
|
2002
|
+
end
|
|
1791
2003
|
end
|
|
1792
2004
|
end
|
data/lib/mencoro/api_client.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -34,7 +34,7 @@ module Mencoro
|
|
|
34
34
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
35
35
|
def initialize(config = Configuration.default)
|
|
36
36
|
@config = config
|
|
37
|
-
@user_agent = "mencoro-ruby/
|
|
37
|
+
@user_agent = "mencoro-ruby/2.0.1"
|
|
38
38
|
@default_headers = {
|
|
39
39
|
'Content-Type' => 'application/json',
|
|
40
40
|
'User-Agent' => @user_agent
|
data/lib/mencoro/api_error.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Mencoro
|
|
17
|
-
# An asynchronous job and, once it has completed, its result
|
|
17
|
+
# An asynchronous job and, once it has completed, its result, or once it has failed, why
|
|
18
18
|
class AsyncJobResource < ApiModelBase
|
|
19
19
|
attr_accessor :job_id
|
|
20
20
|
|
|
@@ -27,6 +27,8 @@ module Mencoro
|
|
|
27
27
|
# The job output, shaped by `type`. Null while the job is still in flight and for a job that failed: it means the result is not known, never that the job produced nothing.
|
|
28
28
|
attr_accessor :result
|
|
29
29
|
|
|
30
|
+
attr_accessor :error
|
|
31
|
+
|
|
30
32
|
class EnumAttributeValidator
|
|
31
33
|
attr_reader :datatype
|
|
32
34
|
attr_reader :allowable_values
|
|
@@ -55,7 +57,8 @@ module Mencoro
|
|
|
55
57
|
:'job_id' => :'jobId',
|
|
56
58
|
:'type' => :'type',
|
|
57
59
|
:'status' => :'status',
|
|
58
|
-
:'result' => :'result'
|
|
60
|
+
:'result' => :'result',
|
|
61
|
+
:'error' => :'error'
|
|
59
62
|
}
|
|
60
63
|
end
|
|
61
64
|
|
|
@@ -75,14 +78,16 @@ module Mencoro
|
|
|
75
78
|
:'job_id' => :'String',
|
|
76
79
|
:'type' => :'String',
|
|
77
80
|
:'status' => :'String',
|
|
78
|
-
:'result' => :'Object'
|
|
81
|
+
:'result' => :'Object',
|
|
82
|
+
:'error' => :'AsyncJobResourceError'
|
|
79
83
|
}
|
|
80
84
|
end
|
|
81
85
|
|
|
82
86
|
# List of attributes with nullable: true
|
|
83
87
|
def self.openapi_nullable
|
|
84
88
|
Set.new([
|
|
85
|
-
:'result'
|
|
89
|
+
:'result',
|
|
90
|
+
:'error'
|
|
86
91
|
])
|
|
87
92
|
end
|
|
88
93
|
|
|
@@ -123,6 +128,10 @@ module Mencoro
|
|
|
123
128
|
if attributes.key?(:'result')
|
|
124
129
|
self.result = attributes[:'result']
|
|
125
130
|
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'error')
|
|
133
|
+
self.error = attributes[:'error']
|
|
134
|
+
end
|
|
126
135
|
end
|
|
127
136
|
|
|
128
137
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -197,7 +206,8 @@ module Mencoro
|
|
|
197
206
|
job_id == o.job_id &&
|
|
198
207
|
type == o.type &&
|
|
199
208
|
status == o.status &&
|
|
200
|
-
result == o.result
|
|
209
|
+
result == o.result &&
|
|
210
|
+
error == o.error
|
|
201
211
|
end
|
|
202
212
|
|
|
203
213
|
# @see the `==` method
|
|
@@ -209,7 +219,7 @@ module Mencoro
|
|
|
209
219
|
# Calculates hash code according to all attributes.
|
|
210
220
|
# @return [Integer] Hash code
|
|
211
221
|
def hash
|
|
212
|
-
[job_id, type, status, result].hash
|
|
222
|
+
[job_id, type, status, result, error].hash
|
|
213
223
|
end
|
|
214
224
|
|
|
215
225
|
# Builds the object from hash
|