pinterest_sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +70 -0
- data/README.md +319 -0
- data/Rakefile +10 -0
- data/bin/bundle +114 -0
- data/bin/byebug +27 -0
- data/bin/coderay +27 -0
- data/bin/htmldiff +27 -0
- data/bin/ldiff +27 -0
- data/bin/pry +27 -0
- data/bin/rake +27 -0
- data/bin/rspec +27 -0
- data/bin/rubocop +27 -0
- data/bin/ruby-parse +27 -0
- data/bin/ruby-rewrite +27 -0
- data/docs/Account.md +24 -0
- data/docs/ActionType.md +15 -0
- data/docs/AdAccount.md +26 -0
- data/docs/AdAccountOwner.md +18 -0
- data/docs/AdAccountsApi.md +929 -0
- data/docs/AdGroupResponse.md +62 -0
- data/docs/AdGroupResponseAllOf.md +48 -0
- data/docs/AdGroupResponseAllOf1.md +30 -0
- data/docs/AdGroupSummaryStatus.md +15 -0
- data/docs/AdResponse.md +70 -0
- data/docs/AdResponseAllOf.md +48 -0
- data/docs/AdResponseAllOf1.md +38 -0
- data/docs/AdsAnalyticsCreateAsyncRequest.md +62 -0
- data/docs/AdsAnalyticsCreateAsyncRequestAllOf.md +32 -0
- data/docs/AdsAnalyticsCreateAsyncRequestAllOf1.md +22 -0
- data/docs/AdsAnalyticsCreateAsyncResponse.md +22 -0
- data/docs/AdsAnalyticsFilterColumn.md +15 -0
- data/docs/AdsAnalyticsFilterOperator.md +15 -0
- data/docs/AdsAnalyticsGetAsyncResponse.md +22 -0
- data/docs/AdsAnalyticsMetricsFilter.md +22 -0
- data/docs/AdsAnalyticsTargetingType.md +15 -0
- data/docs/AnalyticsMetricsResponse.md +20 -0
- data/docs/AnalyticsMetricsResponseDailyMetrics.md +22 -0
- data/docs/AvailabilityFilter.md +18 -0
- data/docs/BatchOperation.md +15 -0
- data/docs/BatchOperationStatus.md +15 -0
- data/docs/Board.md +26 -0
- data/docs/BoardOwner.md +18 -0
- data/docs/BoardSection.md +20 -0
- data/docs/BoardUpdate.md +22 -0
- data/docs/BoardsApi.md +811 -0
- data/docs/BrandFilter.md +18 -0
- data/docs/CampaignCommon.md +34 -0
- data/docs/CampaignResponse.md +44 -0
- data/docs/CampaignResponseAllOf.md +18 -0
- data/docs/CampaignResponseAllOf1.md +24 -0
- data/docs/CampaignSummaryStatus.md +15 -0
- data/docs/CatalogsApi.md +939 -0
- data/docs/CatalogsDbItem.md +22 -0
- data/docs/CatalogsFeed.md +42 -0
- data/docs/CatalogsFeedCredentials.md +20 -0
- data/docs/CatalogsFeedIngestionDetails.md +20 -0
- data/docs/CatalogsFeedIngestionErrors.md +26 -0
- data/docs/CatalogsFeedIngestionInfo.md +22 -0
- data/docs/CatalogsFeedProcessingResult.md +30 -0
- data/docs/CatalogsFeedProcessingResultFields.md +24 -0
- data/docs/CatalogsFeedProcessingSchedule.md +20 -0
- data/docs/CatalogsFeedProcessingStatus.md +15 -0
- data/docs/CatalogsFeedProductCounts.md +18 -0
- data/docs/CatalogsFeedValidationDetails.md +20 -0
- data/docs/CatalogsFeedValidationErrors.md +84 -0
- data/docs/CatalogsFeedValidationWarnings.md +106 -0
- data/docs/CatalogsFeedsCreateRequest.md +34 -0
- data/docs/CatalogsFeedsUpdateRequest.md +32 -0
- data/docs/CatalogsFormat.md +15 -0
- data/docs/CatalogsItems.md +18 -0
- data/docs/CatalogsItemsBatch.md +26 -0
- data/docs/CatalogsItemsBatchRequest.md +24 -0
- data/docs/CatalogsProductGroup.md +34 -0
- data/docs/CatalogsProductGroupCreateRequest.md +24 -0
- data/docs/CatalogsProductGroupCurrencyCriteria.md +20 -0
- data/docs/CatalogsProductGroupFilterKeys.md +68 -0
- data/docs/CatalogsProductGroupFilters.md +20 -0
- data/docs/CatalogsProductGroupFiltersAllOf.md +18 -0
- data/docs/CatalogsProductGroupFiltersAnyOf.md +18 -0
- data/docs/CatalogsProductGroupMultipleStringCriteria.md +20 -0
- data/docs/CatalogsProductGroupMultipleStringListCriteria.md +20 -0
- data/docs/CatalogsProductGroupPricingCriteria.md +22 -0
- data/docs/CatalogsProductGroupStatus.md +15 -0
- data/docs/CatalogsProductGroupType.md +15 -0
- data/docs/CatalogsProductGroupUpdateRequest.md +24 -0
- data/docs/CatalogsStatus.md +15 -0
- data/docs/ConditionFilter.md +18 -0
- data/docs/ConversionAttributionWindowDays.md +15 -0
- data/docs/ConversionReportAttributionType.md +15 -0
- data/docs/ConversionReportTimeType.md +15 -0
- data/docs/Country.md +15 -0
- data/docs/Currency.md +15 -0
- data/docs/CurrencyFilter.md +18 -0
- data/docs/CustomLabel0Filter.md +18 -0
- data/docs/CustomLabel1Filter.md +18 -0
- data/docs/CustomLabel2Filter.md +18 -0
- data/docs/CustomLabel3Filter.md +18 -0
- data/docs/CustomLabel4Filter.md +18 -0
- data/docs/DataOutputFormat.md +15 -0
- data/docs/EntityStatus.md +15 -0
- data/docs/Error.md +20 -0
- data/docs/FeedFields.md +36 -0
- data/docs/GenderFilter.md +18 -0
- data/docs/GoogleProductCategory0Filter.md +18 -0
- data/docs/GoogleProductCategory1Filter.md +18 -0
- data/docs/GoogleProductCategory2Filter.md +18 -0
- data/docs/GoogleProductCategory3Filter.md +18 -0
- data/docs/GoogleProductCategory4Filter.md +18 -0
- data/docs/GoogleProductCategory5Filter.md +18 -0
- data/docs/GoogleProductCategory6Filter.md +18 -0
- data/docs/Granularity.md +15 -0
- data/docs/ImageDetails.md +22 -0
- data/docs/ItemAttributes.md +104 -0
- data/docs/ItemBatchRecord.md +20 -0
- data/docs/ItemGroupIdFilter.md +18 -0
- data/docs/ItemIdFilter.md +18 -0
- data/docs/ItemProcessingRecord.md +24 -0
- data/docs/ItemProcessingStatus.md +15 -0
- data/docs/ItemValidationEvent.md +22 -0
- data/docs/Language.md +15 -0
- data/docs/MaxPriceFilter.md +18 -0
- data/docs/MediaApi.md +221 -0
- data/docs/MediaUpload.md +24 -0
- data/docs/MediaUploadAllOf.md +24 -0
- data/docs/MediaUploadAllOfUploadParameters.md +32 -0
- data/docs/MediaUploadDetails.md +22 -0
- data/docs/MediaUploadRequest.md +18 -0
- data/docs/MediaUploadStatus.md +15 -0
- data/docs/MediaUploadType.md +15 -0
- data/docs/MetricsReportingLevel.md +15 -0
- data/docs/MinPriceFilter.md +18 -0
- data/docs/NonNullableCatalogsCurrency.md +15 -0
- data/docs/NullableCurrency.md +15 -0
- data/docs/OauthAccessTokenRequest.md +18 -0
- data/docs/OauthAccessTokenRequestCode.md +20 -0
- data/docs/OauthAccessTokenRequestCodeAllOf.md +20 -0
- data/docs/OauthAccessTokenRequestRefresh.md +20 -0
- data/docs/OauthAccessTokenRequestRefreshAllOf.md +20 -0
- data/docs/OauthAccessTokenResponse.md +26 -0
- data/docs/OauthAccessTokenResponseCode.md +20 -0
- data/docs/OauthAccessTokenResponseCodeAllOf.md +20 -0
- data/docs/OauthAccessTokenResponseRefresh.md +15 -0
- data/docs/OauthApi.md +72 -0
- data/docs/ObjectiveType.md +15 -0
- data/docs/PacingDeliveryType.md +15 -0
- data/docs/Paginated.md +20 -0
- data/docs/Pin.md +38 -0
- data/docs/PinMedia.md +18 -0
- data/docs/PinMediaSource.md +81 -0
- data/docs/PinMediaSourceImageBase64.md +22 -0
- data/docs/PinMediaSourceImageURL.md +20 -0
- data/docs/PinMediaSourceVideoID.md +22 -0
- data/docs/PinMediaWithImage.md +18 -0
- data/docs/PinMediaWithImageAllOf.md +18 -0
- data/docs/PinPromotionSummaryStatus.md +15 -0
- data/docs/PinsApi.md +304 -0
- data/docs/PlacementGroupType.md +15 -0
- data/docs/ProductAvailabilityType.md +15 -0
- data/docs/ProductGroupSummaryStatus.md +15 -0
- data/docs/ProductType0Filter.md +18 -0
- data/docs/ProductType1Filter.md +18 -0
- data/docs/ProductType2Filter.md +18 -0
- data/docs/ProductType3Filter.md +18 -0
- data/docs/ProductType4Filter.md +18 -0
- data/docs/ReportingColumnAsync.md +15 -0
- data/docs/TargetingTypeFilter.md +18 -0
- data/docs/TrackingUrls.md +26 -0
- data/docs/UserAccountApi.md +165 -0
- data/git_push.sh +57 -0
- data/lib/pinterest_sdk/api/ad_accounts_api.rb +1287 -0
- data/lib/pinterest_sdk/api/boards_api.rb +888 -0
- data/lib/pinterest_sdk/api/catalogs_api.rb +965 -0
- data/lib/pinterest_sdk/api/media_api.rb +229 -0
- data/lib/pinterest_sdk/api/oauth_api.rb +96 -0
- data/lib/pinterest_sdk/api/pins_api.rb +330 -0
- data/lib/pinterest_sdk/api/user_account_api.rb +201 -0
- data/lib/pinterest_sdk/api_client.rb +390 -0
- data/lib/pinterest_sdk/api_error.rb +57 -0
- data/lib/pinterest_sdk/configuration.rb +285 -0
- data/lib/pinterest_sdk/models/account.rb +280 -0
- data/lib/pinterest_sdk/models/action_type.rb +39 -0
- data/lib/pinterest_sdk/models/ad_account.rb +254 -0
- data/lib/pinterest_sdk/models/ad_account_owner.rb +219 -0
- data/lib/pinterest_sdk/models/ad_group_response.rb +555 -0
- data/lib/pinterest_sdk/models/ad_group_response_all_of.rb +427 -0
- data/lib/pinterest_sdk/models/ad_group_response_all_of1.rb +329 -0
- data/lib/pinterest_sdk/models/ad_group_summary_status.rb +41 -0
- data/lib/pinterest_sdk/models/ad_response.rb +640 -0
- data/lib/pinterest_sdk/models/ad_response_all_of.rb +455 -0
- data/lib/pinterest_sdk/models/ad_response_all_of1.rb +409 -0
- data/lib/pinterest_sdk/models/ads_analytics_create_async_request.rb +831 -0
- data/lib/pinterest_sdk/models/ads_analytics_create_async_request_all_of.rb +356 -0
- data/lib/pinterest_sdk/models/ads_analytics_create_async_request_all_of1.rb +253 -0
- data/lib/pinterest_sdk/models/ads_analytics_create_async_response.rb +237 -0
- data/lib/pinterest_sdk/models/ads_analytics_filter_column.rb +37 -0
- data/lib/pinterest_sdk/models/ads_analytics_filter_operator.rb +37 -0
- data/lib/pinterest_sdk/models/ads_analytics_get_async_response.rb +238 -0
- data/lib/pinterest_sdk/models/ads_analytics_metrics_filter.rb +254 -0
- data/lib/pinterest_sdk/models/ads_analytics_targeting_type.rb +48 -0
- data/lib/pinterest_sdk/models/analytics_metrics_response.rb +233 -0
- data/lib/pinterest_sdk/models/analytics_metrics_response_daily_metrics.rb +275 -0
- data/lib/pinterest_sdk/models/availability_filter.rb +223 -0
- data/lib/pinterest_sdk/models/batch_operation.rb +38 -0
- data/lib/pinterest_sdk/models/batch_operation_status.rb +37 -0
- data/lib/pinterest_sdk/models/board.rb +301 -0
- data/lib/pinterest_sdk/models/board_owner.rb +218 -0
- data/lib/pinterest_sdk/models/board_section.rb +252 -0
- data/lib/pinterest_sdk/models/board_update.rb +272 -0
- data/lib/pinterest_sdk/models/brand_filter.rb +223 -0
- data/lib/pinterest_sdk/models/campaign_common.rb +352 -0
- data/lib/pinterest_sdk/models/campaign_response.rb +435 -0
- data/lib/pinterest_sdk/models/campaign_response_all_of.rb +245 -0
- data/lib/pinterest_sdk/models/campaign_response_all_of1.rb +248 -0
- data/lib/pinterest_sdk/models/campaign_summary_status.rb +41 -0
- data/lib/pinterest_sdk/models/catalogs_db_item.rb +236 -0
- data/lib/pinterest_sdk/models/catalogs_feed.rb +368 -0
- data/lib/pinterest_sdk/models/catalogs_feed_credentials.rb +240 -0
- data/lib/pinterest_sdk/models/catalogs_feed_ingestion_details.rb +237 -0
- data/lib/pinterest_sdk/models/catalogs_feed_ingestion_errors.rb +288 -0
- data/lib/pinterest_sdk/models/catalogs_feed_ingestion_info.rb +236 -0
- data/lib/pinterest_sdk/models/catalogs_feed_processing_result.rb +296 -0
- data/lib/pinterest_sdk/models/catalogs_feed_processing_result_fields.rb +261 -0
- data/lib/pinterest_sdk/models/catalogs_feed_processing_schedule.rb +291 -0
- data/lib/pinterest_sdk/models/catalogs_feed_processing_status.rb +43 -0
- data/lib/pinterest_sdk/models/catalogs_feed_product_counts.rb +220 -0
- data/lib/pinterest_sdk/models/catalogs_feed_validation_details.rb +237 -0
- data/lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb +515 -0
- data/lib/pinterest_sdk/models/catalogs_feed_validation_warnings.rb +614 -0
- data/lib/pinterest_sdk/models/catalogs_feeds_create_request.rb +313 -0
- data/lib/pinterest_sdk/models/catalogs_feeds_update_request.rb +288 -0
- data/lib/pinterest_sdk/models/catalogs_format.rb +38 -0
- data/lib/pinterest_sdk/models/catalogs_items.rb +222 -0
- data/lib/pinterest_sdk/models/catalogs_items_batch.rb +262 -0
- data/lib/pinterest_sdk/models/catalogs_items_batch_request.rb +249 -0
- data/lib/pinterest_sdk/models/catalogs_product_group.rb +345 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_create_request.rb +284 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_currency_criteria.rb +237 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_filter_keys.rb +617 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_filters.rb +252 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_filters_all_of.rb +220 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_filters_any_of.rb +220 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_multiple_string_criteria.rb +239 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_multiple_string_list_criteria.rb +239 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_pricing_criteria.rb +251 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_status.rb +37 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_type.rb +42 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_update_request.rb +284 -0
- data/lib/pinterest_sdk/models/catalogs_status.rb +37 -0
- data/lib/pinterest_sdk/models/condition_filter.rb +223 -0
- data/lib/pinterest_sdk/models/conversion_attribution_window_days.rb +39 -0
- data/lib/pinterest_sdk/models/conversion_report_attribution_type.rb +37 -0
- data/lib/pinterest_sdk/models/conversion_report_time_type.rb +37 -0
- data/lib/pinterest_sdk/models/country.rb +282 -0
- data/lib/pinterest_sdk/models/currency.rb +60 -0
- data/lib/pinterest_sdk/models/currency_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label0_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label1_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label2_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label3_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label4_filter.rb +223 -0
- data/lib/pinterest_sdk/models/data_output_format.rb +37 -0
- data/lib/pinterest_sdk/models/entity_status.rb +38 -0
- data/lib/pinterest_sdk/models/error.rb +237 -0
- data/lib/pinterest_sdk/models/feed_fields.rb +332 -0
- data/lib/pinterest_sdk/models/gender_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category0_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category1_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category2_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category3_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category4_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category5_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category6_filter.rb +223 -0
- data/lib/pinterest_sdk/models/granularity.rb +40 -0
- data/lib/pinterest_sdk/models/image_details.rb +281 -0
- data/lib/pinterest_sdk/models/item_attributes.rb +833 -0
- data/lib/pinterest_sdk/models/item_batch_record.rb +229 -0
- data/lib/pinterest_sdk/models/item_group_id_filter.rb +223 -0
- data/lib/pinterest_sdk/models/item_id_filter.rb +223 -0
- data/lib/pinterest_sdk/models/item_processing_record.rb +253 -0
- data/lib/pinterest_sdk/models/item_processing_status.rb +38 -0
- data/lib/pinterest_sdk/models/item_validation_event.rb +240 -0
- data/lib/pinterest_sdk/models/language.rb +96 -0
- data/lib/pinterest_sdk/models/max_price_filter.rb +223 -0
- data/lib/pinterest_sdk/models/media_upload.rb +255 -0
- data/lib/pinterest_sdk/models/media_upload_all_of.rb +247 -0
- data/lib/pinterest_sdk/models/media_upload_all_of_upload_parameters.rb +282 -0
- data/lib/pinterest_sdk/models/media_upload_details.rb +254 -0
- data/lib/pinterest_sdk/models/media_upload_request.rb +224 -0
- data/lib/pinterest_sdk/models/media_upload_status.rb +39 -0
- data/lib/pinterest_sdk/models/media_upload_type.rb +36 -0
- data/lib/pinterest_sdk/models/metrics_reporting_level.rb +47 -0
- data/lib/pinterest_sdk/models/min_price_filter.rb +223 -0
- data/lib/pinterest_sdk/models/non_nullable_catalogs_currency.rb +198 -0
- data/lib/pinterest_sdk/models/nullable_currency.rb +199 -0
- data/lib/pinterest_sdk/models/oauth_access_token_request_code.rb +272 -0
- data/lib/pinterest_sdk/models/oauth_access_token_request_code_all_of.rb +237 -0
- data/lib/pinterest_sdk/models/oauth_access_token_request_refresh.rb +267 -0
- data/lib/pinterest_sdk/models/oauth_access_token_request_refresh_all_of.rb +232 -0
- data/lib/pinterest_sdk/models/oauth_access_token_response.rb +316 -0
- data/lib/pinterest_sdk/models/oauth_access_token_response_code.rb +272 -0
- data/lib/pinterest_sdk/models/oauth_access_token_response_code_all_of.rb +237 -0
- data/lib/pinterest_sdk/models/oauth_access_token_response_refresh.rb +243 -0
- data/lib/pinterest_sdk/models/objective_type.rb +43 -0
- data/lib/pinterest_sdk/models/pacing_delivery_type.rb +37 -0
- data/lib/pinterest_sdk/models/paginated.rb +235 -0
- data/lib/pinterest_sdk/models/pin.rb +359 -0
- data/lib/pinterest_sdk/models/pin_media.rb +224 -0
- data/lib/pinterest_sdk/models/pin_media_source.rb +58 -0
- data/lib/pinterest_sdk/models/pin_media_source_image_base64.rb +319 -0
- data/lib/pinterest_sdk/models/pin_media_source_image_url.rb +272 -0
- data/lib/pinterest_sdk/models/pin_media_source_video_id.rb +307 -0
- data/lib/pinterest_sdk/models/pin_media_with_image.rb +233 -0
- data/lib/pinterest_sdk/models/pin_media_with_image_all_of.rb +220 -0
- data/lib/pinterest_sdk/models/pin_promotion_summary_status.rb +41 -0
- data/lib/pinterest_sdk/models/placement_group_type.rb +39 -0
- data/lib/pinterest_sdk/models/product_availability_type.rb +39 -0
- data/lib/pinterest_sdk/models/product_group_summary_status.rb +39 -0
- data/lib/pinterest_sdk/models/product_type0_filter.rb +223 -0
- data/lib/pinterest_sdk/models/product_type1_filter.rb +223 -0
- data/lib/pinterest_sdk/models/product_type2_filter.rb +223 -0
- data/lib/pinterest_sdk/models/product_type3_filter.rb +223 -0
- data/lib/pinterest_sdk/models/product_type4_filter.rb +223 -0
- data/lib/pinterest_sdk/models/reporting_column_async.rb +549 -0
- data/lib/pinterest_sdk/models/targeting_type_filter.rb +245 -0
- data/lib/pinterest_sdk/models/tracking_urls.rb +340 -0
- data/lib/pinterest_sdk/version.rb +15 -0
- data/lib/pinterest_sdk.rb +192 -0
- data/pinterest_sdk.gemspec +38 -0
- data/spec/api/ad_accounts_api_spec.rb +234 -0
- data/spec/api/boards_api_spec.rb +181 -0
- data/spec/api/catalogs_api_spec.rb +200 -0
- data/spec/api/media_api_spec.rb +72 -0
- data/spec/api/oauth_api_spec.rb +47 -0
- data/spec/api/pins_api_spec.rb +90 -0
- data/spec/api/user_account_api_spec.rb +66 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_spec.rb +56 -0
- data/spec/models/action_type_spec.rb +28 -0
- data/spec/models/ad_account_owner_spec.rb +34 -0
- data/spec/models/ad_account_spec.rb +58 -0
- data/spec/models/ad_group_response_all_of1_spec.rb +70 -0
- data/spec/models/ad_group_response_all_of_spec.rb +132 -0
- data/spec/models/ad_group_response_spec.rb +174 -0
- data/spec/models/ad_group_summary_status_spec.rb +28 -0
- data/spec/models/ad_response_all_of1_spec.rb +102 -0
- data/spec/models/ad_response_all_of_spec.rb +128 -0
- data/spec/models/ad_response_spec.rb +202 -0
- data/spec/models/ads_analytics_create_async_request_all_of1_spec.rb +46 -0
- data/spec/models/ads_analytics_create_async_request_all_of_spec.rb +76 -0
- data/spec/models/ads_analytics_create_async_request_spec.rb +166 -0
- data/spec/models/ads_analytics_create_async_response_spec.rb +46 -0
- data/spec/models/ads_analytics_filter_column_spec.rb +28 -0
- data/spec/models/ads_analytics_filter_operator_spec.rb +28 -0
- data/spec/models/ads_analytics_get_async_response_spec.rb +46 -0
- data/spec/models/ads_analytics_metrics_filter_spec.rb +46 -0
- data/spec/models/ads_analytics_targeting_type_spec.rb +28 -0
- data/spec/models/analytics_metrics_response_daily_metrics_spec.rb +50 -0
- data/spec/models/analytics_metrics_response_spec.rb +40 -0
- data/spec/models/availability_filter_spec.rb +34 -0
- data/spec/models/batch_operation_spec.rb +28 -0
- data/spec/models/batch_operation_status_spec.rb +28 -0
- data/spec/models/board_owner_spec.rb +34 -0
- data/spec/models/board_section_spec.rb +40 -0
- data/spec/models/board_spec.rb +62 -0
- data/spec/models/board_update_spec.rb +50 -0
- data/spec/models/brand_filter_spec.rb +34 -0
- data/spec/models/campaign_common_spec.rb +82 -0
- data/spec/models/campaign_response_all_of1_spec.rb +52 -0
- data/spec/models/campaign_response_all_of_spec.rb +34 -0
- data/spec/models/campaign_response_spec.rb +112 -0
- data/spec/models/campaign_summary_status_spec.rb +28 -0
- data/spec/models/catalogs_db_item_spec.rb +46 -0
- data/spec/models/catalogs_feed_credentials_spec.rb +40 -0
- data/spec/models/catalogs_feed_ingestion_details_spec.rb +40 -0
- data/spec/models/catalogs_feed_ingestion_errors_spec.rb +62 -0
- data/spec/models/catalogs_feed_ingestion_info_spec.rb +46 -0
- data/spec/models/catalogs_feed_processing_result_fields_spec.rb +52 -0
- data/spec/models/catalogs_feed_processing_result_spec.rb +70 -0
- data/spec/models/catalogs_feed_processing_schedule_spec.rb +44 -0
- data/spec/models/catalogs_feed_processing_status_spec.rb +28 -0
- data/spec/models/catalogs_feed_product_counts_spec.rb +34 -0
- data/spec/models/catalogs_feed_spec.rb +106 -0
- data/spec/models/catalogs_feed_validation_details_spec.rb +40 -0
- data/spec/models/catalogs_feed_validation_errors_spec.rb +232 -0
- data/spec/models/catalogs_feed_validation_warnings_spec.rb +298 -0
- data/spec/models/catalogs_feeds_create_request_spec.rb +82 -0
- data/spec/models/catalogs_feeds_update_request_spec.rb +76 -0
- data/spec/models/catalogs_format_spec.rb +28 -0
- data/spec/models/catalogs_items_batch_request_spec.rb +52 -0
- data/spec/models/catalogs_items_batch_spec.rb +58 -0
- data/spec/models/catalogs_items_spec.rb +34 -0
- data/spec/models/catalogs_product_group_create_request_spec.rb +52 -0
- data/spec/models/catalogs_product_group_currency_criteria_spec.rb +40 -0
- data/spec/models/catalogs_product_group_filter_keys_spec.rb +184 -0
- data/spec/models/catalogs_product_group_filters_all_of_spec.rb +34 -0
- data/spec/models/catalogs_product_group_filters_any_of_spec.rb +34 -0
- data/spec/models/catalogs_product_group_filters_spec.rb +40 -0
- data/spec/models/catalogs_product_group_multiple_string_criteria_spec.rb +40 -0
- data/spec/models/catalogs_product_group_multiple_string_list_criteria_spec.rb +40 -0
- data/spec/models/catalogs_product_group_pricing_criteria_spec.rb +46 -0
- data/spec/models/catalogs_product_group_spec.rb +82 -0
- data/spec/models/catalogs_product_group_status_spec.rb +28 -0
- data/spec/models/catalogs_product_group_type_spec.rb +28 -0
- data/spec/models/catalogs_product_group_update_request_spec.rb +52 -0
- data/spec/models/catalogs_status_spec.rb +28 -0
- data/spec/models/condition_filter_spec.rb +34 -0
- data/spec/models/conversion_attribution_window_days_spec.rb +28 -0
- data/spec/models/conversion_report_attribution_type_spec.rb +28 -0
- data/spec/models/conversion_report_time_type_spec.rb +28 -0
- data/spec/models/country_spec.rb +28 -0
- data/spec/models/currency_filter_spec.rb +34 -0
- data/spec/models/currency_spec.rb +28 -0
- data/spec/models/custom_label0_filter_spec.rb +34 -0
- data/spec/models/custom_label1_filter_spec.rb +34 -0
- data/spec/models/custom_label2_filter_spec.rb +34 -0
- data/spec/models/custom_label3_filter_spec.rb +34 -0
- data/spec/models/custom_label4_filter_spec.rb +34 -0
- data/spec/models/data_output_format_spec.rb +28 -0
- data/spec/models/entity_status_spec.rb +28 -0
- data/spec/models/error_spec.rb +40 -0
- data/spec/models/feed_fields_spec.rb +88 -0
- data/spec/models/gender_filter_spec.rb +34 -0
- data/spec/models/google_product_category0_filter_spec.rb +34 -0
- data/spec/models/google_product_category1_filter_spec.rb +34 -0
- data/spec/models/google_product_category2_filter_spec.rb +34 -0
- data/spec/models/google_product_category3_filter_spec.rb +34 -0
- data/spec/models/google_product_category4_filter_spec.rb +34 -0
- data/spec/models/google_product_category5_filter_spec.rb +34 -0
- data/spec/models/google_product_category6_filter_spec.rb +34 -0
- data/spec/models/granularity_spec.rb +28 -0
- data/spec/models/image_details_spec.rb +46 -0
- data/spec/models/item_attributes_spec.rb +292 -0
- data/spec/models/item_batch_record_spec.rb +40 -0
- data/spec/models/item_group_id_filter_spec.rb +34 -0
- data/spec/models/item_id_filter_spec.rb +34 -0
- data/spec/models/item_processing_record_spec.rb +52 -0
- data/spec/models/item_processing_status_spec.rb +28 -0
- data/spec/models/item_validation_event_spec.rb +46 -0
- data/spec/models/language_spec.rb +28 -0
- data/spec/models/max_price_filter_spec.rb +34 -0
- data/spec/models/media_upload_all_of_spec.rb +52 -0
- data/spec/models/media_upload_all_of_upload_parameters_spec.rb +76 -0
- data/spec/models/media_upload_details_spec.rb +46 -0
- data/spec/models/media_upload_request_spec.rb +34 -0
- data/spec/models/media_upload_spec.rb +52 -0
- data/spec/models/media_upload_status_spec.rb +28 -0
- data/spec/models/media_upload_type_spec.rb +28 -0
- data/spec/models/metrics_reporting_level_spec.rb +28 -0
- data/spec/models/min_price_filter_spec.rb +34 -0
- data/spec/models/non_nullable_catalogs_currency_spec.rb +28 -0
- data/spec/models/nullable_currency_spec.rb +28 -0
- data/spec/models/oauth_access_token_request_code_all_of_spec.rb +40 -0
- data/spec/models/oauth_access_token_request_code_spec.rb +40 -0
- data/spec/models/oauth_access_token_request_refresh_all_of_spec.rb +40 -0
- data/spec/models/oauth_access_token_request_refresh_spec.rb +40 -0
- data/spec/models/oauth_access_token_request_spec.rb +38 -0
- data/spec/models/oauth_access_token_response_code_all_of_spec.rb +40 -0
- data/spec/models/oauth_access_token_response_code_spec.rb +40 -0
- data/spec/models/oauth_access_token_response_refresh_spec.rb +28 -0
- data/spec/models/oauth_access_token_response_spec.rb +62 -0
- data/spec/models/objective_type_spec.rb +28 -0
- data/spec/models/pacing_delivery_type_spec.rb +28 -0
- data/spec/models/paginated_spec.rb +40 -0
- data/spec/models/pin_media_source_image_base64_spec.rb +54 -0
- data/spec/models/pin_media_source_image_url_spec.rb +44 -0
- data/spec/models/pin_media_source_spec.rb +43 -0
- data/spec/models/pin_media_source_video_id_spec.rb +50 -0
- data/spec/models/pin_media_spec.rb +34 -0
- data/spec/models/pin_media_with_image_all_of_spec.rb +34 -0
- data/spec/models/pin_media_with_image_spec.rb +34 -0
- data/spec/models/pin_promotion_summary_status_spec.rb +28 -0
- data/spec/models/pin_spec.rb +94 -0
- data/spec/models/placement_group_type_spec.rb +28 -0
- data/spec/models/product_availability_type_spec.rb +28 -0
- data/spec/models/product_group_summary_status_spec.rb +28 -0
- data/spec/models/product_type0_filter_spec.rb +34 -0
- data/spec/models/product_type1_filter_spec.rb +34 -0
- data/spec/models/product_type2_filter_spec.rb +34 -0
- data/spec/models/product_type3_filter_spec.rb +34 -0
- data/spec/models/product_type4_filter_spec.rb +34 -0
- data/spec/models/reporting_column_async_spec.rb +28 -0
- data/spec/models/targeting_type_filter_spec.rb +34 -0
- data/spec/models/tracking_urls_spec.rb +58 -0
- data/spec/spec_helper.rb +111 -0
- metadata +726 -0
@@ -0,0 +1,929 @@
|
|
1
|
+
# PinterestSdkClient::AdAccountsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.pinterest.com/v5*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**ad_account_analytics**](AdAccountsApi.md#ad_account_analytics) | **GET** /ad_accounts/{ad_account_id}/analytics | Get ad account analytics |
|
8
|
+
| [**ad_accounts_list**](AdAccountsApi.md#ad_accounts_list) | **GET** /ad_accounts | List ad accounts |
|
9
|
+
| [**ad_groups_analytics**](AdAccountsApi.md#ad_groups_analytics) | **GET** /ad_accounts/{ad_account_id}/ad_groups/analytics | Get ad group analytics |
|
10
|
+
| [**ad_groups_list**](AdAccountsApi.md#ad_groups_list) | **GET** /ad_accounts/{ad_account_id}/ad_groups | List ad groups |
|
11
|
+
| [**ads_analytics**](AdAccountsApi.md#ads_analytics) | **GET** /ad_accounts/{ad_account_id}/ads/analytics | Get ad analytics |
|
12
|
+
| [**ads_list**](AdAccountsApi.md#ads_list) | **GET** /ad_accounts/{ad_account_id}/ads | List ads |
|
13
|
+
| [**analytics_create_report**](AdAccountsApi.md#analytics_create_report) | **POST** /ad_accounts/{ad_account_id}/reports | Create async request for an account analytics report |
|
14
|
+
| [**analytics_get_report**](AdAccountsApi.md#analytics_get_report) | **GET** /ad_accounts/{ad_account_id}/reports | Get the account analytics report created by the async call |
|
15
|
+
| [**campaigns_analytics**](AdAccountsApi.md#campaigns_analytics) | **GET** /ad_accounts/{ad_account_id}/campaigns/analytics | Get campaign analytics |
|
16
|
+
| [**campaigns_list**](AdAccountsApi.md#campaigns_list) | **GET** /ad_accounts/{ad_account_id}/campaigns | List campaigns |
|
17
|
+
| [**product_groups_analytics**](AdAccountsApi.md#product_groups_analytics) | **GET** /ad_accounts/{ad_account_id}/product_groups/analytics | Get product group analytics |
|
18
|
+
|
19
|
+
|
20
|
+
## ad_account_analytics
|
21
|
+
|
22
|
+
> Array<Hash<String, Object>> ad_account_analytics(ad_account_id, start_date, end_date, columns, granularity, opts)
|
23
|
+
|
24
|
+
Get ad account analytics
|
25
|
+
|
26
|
+
Get analytics for the specified <code>ad_account_id</code>, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
27
|
+
|
28
|
+
### Examples
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
require 'time'
|
32
|
+
require 'pinterest_sdk'
|
33
|
+
# setup authorization
|
34
|
+
PinterestSdkClient.configure do |config|
|
35
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
36
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
37
|
+
end
|
38
|
+
|
39
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
40
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
41
|
+
start_date = Date.parse('2013-10-20') # Date | Metric report start date (UTC). Format: YYYY-MM-DD
|
42
|
+
end_date = Date.parse('2013-10-20') # Date | Metric report end date (UTC). Format: YYYY-MM-DD
|
43
|
+
columns = ['AD_ACCOUNT_ID'] # Array<String> | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned
|
44
|
+
granularity = PinterestSdkClient::Granularity::TOTAL # Granularity | Granularity
|
45
|
+
opts = {
|
46
|
+
click_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
47
|
+
engagement_window_days: 1, # Integer | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
48
|
+
view_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.
|
49
|
+
conversion_report_time: 'TIME_OF_AD_ACTION' # String | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.
|
50
|
+
}
|
51
|
+
|
52
|
+
begin
|
53
|
+
# Get ad account analytics
|
54
|
+
result = api_instance.ad_account_analytics(ad_account_id, start_date, end_date, columns, granularity, opts)
|
55
|
+
p result
|
56
|
+
rescue PinterestSdkClient::ApiError => e
|
57
|
+
puts "Error when calling AdAccountsApi->ad_account_analytics: #{e}"
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
61
|
+
#### Using the ad_account_analytics_with_http_info variant
|
62
|
+
|
63
|
+
This returns an Array which contains the response data, status code and headers.
|
64
|
+
|
65
|
+
> <Array(Array<Hash<String, Object>>, Integer, Hash)> ad_account_analytics_with_http_info(ad_account_id, start_date, end_date, columns, granularity, opts)
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
begin
|
69
|
+
# Get ad account analytics
|
70
|
+
data, status_code, headers = api_instance.ad_account_analytics_with_http_info(ad_account_id, start_date, end_date, columns, granularity, opts)
|
71
|
+
p status_code # => 2xx
|
72
|
+
p headers # => { ... }
|
73
|
+
p data # => Array<Hash<String, Object>>
|
74
|
+
rescue PinterestSdkClient::ApiError => e
|
75
|
+
puts "Error when calling AdAccountsApi->ad_account_analytics_with_http_info: #{e}"
|
76
|
+
end
|
77
|
+
```
|
78
|
+
|
79
|
+
### Parameters
|
80
|
+
|
81
|
+
| Name | Type | Description | Notes |
|
82
|
+
| ---- | ---- | ----------- | ----- |
|
83
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
84
|
+
| **start_date** | **Date** | Metric report start date (UTC). Format: YYYY-MM-DD | |
|
85
|
+
| **end_date** | **Date** | Metric report end date (UTC). Format: YYYY-MM-DD | |
|
86
|
+
| **columns** | [**Array<String>**](String.md) | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | |
|
87
|
+
| **granularity** | [**Granularity**](.md) | Granularity | |
|
88
|
+
| **click_window_days** | **Integer** | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
89
|
+
| **engagement_window_days** | **Integer** | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
90
|
+
| **view_window_days** | **Integer** | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day. | [optional][default to 1] |
|
91
|
+
| **conversion_report_time** | **String** | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event. | [optional][default to 'TIME_OF_AD_ACTION'] |
|
92
|
+
|
93
|
+
### Return type
|
94
|
+
|
95
|
+
**Array<Hash<String, Object>>**
|
96
|
+
|
97
|
+
### Authorization
|
98
|
+
|
99
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
100
|
+
|
101
|
+
### HTTP request headers
|
102
|
+
|
103
|
+
- **Content-Type**: Not defined
|
104
|
+
- **Accept**: application/json
|
105
|
+
|
106
|
+
|
107
|
+
## ad_accounts_list
|
108
|
+
|
109
|
+
> <Paginated> ad_accounts_list(opts)
|
110
|
+
|
111
|
+
List ad accounts
|
112
|
+
|
113
|
+
Get a list of the ad_accounts that the \"operation user_account\" has access to. - This includes ad_accounts they own and ad_accounts that are owned by others who have granted them <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>.
|
114
|
+
|
115
|
+
### Examples
|
116
|
+
|
117
|
+
```ruby
|
118
|
+
require 'time'
|
119
|
+
require 'pinterest_sdk'
|
120
|
+
# setup authorization
|
121
|
+
PinterestSdkClient.configure do |config|
|
122
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
123
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
124
|
+
end
|
125
|
+
|
126
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
127
|
+
opts = {
|
128
|
+
bookmark: 'bookmark_example', # String | Cursor used to fetch the next page of items
|
129
|
+
page_size: 56, # Integer | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information.
|
130
|
+
include_shared_accounts: true # Boolean | Include shared ad accounts
|
131
|
+
}
|
132
|
+
|
133
|
+
begin
|
134
|
+
# List ad accounts
|
135
|
+
result = api_instance.ad_accounts_list(opts)
|
136
|
+
p result
|
137
|
+
rescue PinterestSdkClient::ApiError => e
|
138
|
+
puts "Error when calling AdAccountsApi->ad_accounts_list: #{e}"
|
139
|
+
end
|
140
|
+
```
|
141
|
+
|
142
|
+
#### Using the ad_accounts_list_with_http_info variant
|
143
|
+
|
144
|
+
This returns an Array which contains the response data, status code and headers.
|
145
|
+
|
146
|
+
> <Array(<Paginated>, Integer, Hash)> ad_accounts_list_with_http_info(opts)
|
147
|
+
|
148
|
+
```ruby
|
149
|
+
begin
|
150
|
+
# List ad accounts
|
151
|
+
data, status_code, headers = api_instance.ad_accounts_list_with_http_info(opts)
|
152
|
+
p status_code # => 2xx
|
153
|
+
p headers # => { ... }
|
154
|
+
p data # => <Paginated>
|
155
|
+
rescue PinterestSdkClient::ApiError => e
|
156
|
+
puts "Error when calling AdAccountsApi->ad_accounts_list_with_http_info: #{e}"
|
157
|
+
end
|
158
|
+
```
|
159
|
+
|
160
|
+
### Parameters
|
161
|
+
|
162
|
+
| Name | Type | Description | Notes |
|
163
|
+
| ---- | ---- | ----------- | ----- |
|
164
|
+
| **bookmark** | **String** | Cursor used to fetch the next page of items | [optional] |
|
165
|
+
| **page_size** | **Integer** | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information. | [optional][default to 25] |
|
166
|
+
| **include_shared_accounts** | **Boolean** | Include shared ad accounts | [optional][default to true] |
|
167
|
+
|
168
|
+
### Return type
|
169
|
+
|
170
|
+
[**Paginated**](Paginated.md)
|
171
|
+
|
172
|
+
### Authorization
|
173
|
+
|
174
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
175
|
+
|
176
|
+
### HTTP request headers
|
177
|
+
|
178
|
+
- **Content-Type**: Not defined
|
179
|
+
- **Accept**: application/json
|
180
|
+
|
181
|
+
|
182
|
+
## ad_groups_analytics
|
183
|
+
|
184
|
+
> Array<Hash<String, Object>> ad_groups_analytics(ad_account_id, start_date, end_date, ad_group_ids, columns, granularity, opts)
|
185
|
+
|
186
|
+
Get ad group analytics
|
187
|
+
|
188
|
+
Get analytics for the specified ad groups in the specified <code>ad_account_id</code>, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
189
|
+
|
190
|
+
### Examples
|
191
|
+
|
192
|
+
```ruby
|
193
|
+
require 'time'
|
194
|
+
require 'pinterest_sdk'
|
195
|
+
# setup authorization
|
196
|
+
PinterestSdkClient.configure do |config|
|
197
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
198
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
199
|
+
end
|
200
|
+
|
201
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
202
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
203
|
+
start_date = Date.parse('2013-10-20') # Date | Metric report start date (UTC). Format: YYYY-MM-DD
|
204
|
+
end_date = Date.parse('2013-10-20') # Date | Metric report end date (UTC). Format: YYYY-MM-DD
|
205
|
+
ad_group_ids = ['inner_example'] # Array<String> | List of Ad group Ids to use to filter the results.
|
206
|
+
columns = ['AD_ACCOUNT_ID'] # Array<String> | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned
|
207
|
+
granularity = PinterestSdkClient::Granularity::TOTAL # Granularity | Granularity
|
208
|
+
opts = {
|
209
|
+
click_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
210
|
+
engagement_window_days: 1, # Integer | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
211
|
+
view_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.
|
212
|
+
conversion_report_time: 'TIME_OF_AD_ACTION' # String | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.
|
213
|
+
}
|
214
|
+
|
215
|
+
begin
|
216
|
+
# Get ad group analytics
|
217
|
+
result = api_instance.ad_groups_analytics(ad_account_id, start_date, end_date, ad_group_ids, columns, granularity, opts)
|
218
|
+
p result
|
219
|
+
rescue PinterestSdkClient::ApiError => e
|
220
|
+
puts "Error when calling AdAccountsApi->ad_groups_analytics: #{e}"
|
221
|
+
end
|
222
|
+
```
|
223
|
+
|
224
|
+
#### Using the ad_groups_analytics_with_http_info variant
|
225
|
+
|
226
|
+
This returns an Array which contains the response data, status code and headers.
|
227
|
+
|
228
|
+
> <Array(Array<Hash<String, Object>>, Integer, Hash)> ad_groups_analytics_with_http_info(ad_account_id, start_date, end_date, ad_group_ids, columns, granularity, opts)
|
229
|
+
|
230
|
+
```ruby
|
231
|
+
begin
|
232
|
+
# Get ad group analytics
|
233
|
+
data, status_code, headers = api_instance.ad_groups_analytics_with_http_info(ad_account_id, start_date, end_date, ad_group_ids, columns, granularity, opts)
|
234
|
+
p status_code # => 2xx
|
235
|
+
p headers # => { ... }
|
236
|
+
p data # => Array<Hash<String, Object>>
|
237
|
+
rescue PinterestSdkClient::ApiError => e
|
238
|
+
puts "Error when calling AdAccountsApi->ad_groups_analytics_with_http_info: #{e}"
|
239
|
+
end
|
240
|
+
```
|
241
|
+
|
242
|
+
### Parameters
|
243
|
+
|
244
|
+
| Name | Type | Description | Notes |
|
245
|
+
| ---- | ---- | ----------- | ----- |
|
246
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
247
|
+
| **start_date** | **Date** | Metric report start date (UTC). Format: YYYY-MM-DD | |
|
248
|
+
| **end_date** | **Date** | Metric report end date (UTC). Format: YYYY-MM-DD | |
|
249
|
+
| **ad_group_ids** | [**Array<String>**](String.md) | List of Ad group Ids to use to filter the results. | |
|
250
|
+
| **columns** | [**Array<String>**](String.md) | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | |
|
251
|
+
| **granularity** | [**Granularity**](.md) | Granularity | |
|
252
|
+
| **click_window_days** | **Integer** | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
253
|
+
| **engagement_window_days** | **Integer** | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
254
|
+
| **view_window_days** | **Integer** | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day. | [optional][default to 1] |
|
255
|
+
| **conversion_report_time** | **String** | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event. | [optional][default to 'TIME_OF_AD_ACTION'] |
|
256
|
+
|
257
|
+
### Return type
|
258
|
+
|
259
|
+
**Array<Hash<String, Object>>**
|
260
|
+
|
261
|
+
### Authorization
|
262
|
+
|
263
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
264
|
+
|
265
|
+
### HTTP request headers
|
266
|
+
|
267
|
+
- **Content-Type**: Not defined
|
268
|
+
- **Accept**: application/json
|
269
|
+
|
270
|
+
|
271
|
+
## ad_groups_list
|
272
|
+
|
273
|
+
> <Paginated> ad_groups_list(ad_account_id, opts)
|
274
|
+
|
275
|
+
List ad groups
|
276
|
+
|
277
|
+
Get a list of the ad groups in the specified <code>ad_account_id</code>, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
278
|
+
|
279
|
+
### Examples
|
280
|
+
|
281
|
+
```ruby
|
282
|
+
require 'time'
|
283
|
+
require 'pinterest_sdk'
|
284
|
+
# setup authorization
|
285
|
+
PinterestSdkClient.configure do |config|
|
286
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
287
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
288
|
+
end
|
289
|
+
|
290
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
291
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
292
|
+
opts = {
|
293
|
+
campaign_ids: ['inner_example'], # Array<String> | List of Campaign Ids to use to filter the results.
|
294
|
+
ad_group_ids: ['inner_example'], # Array<String> | List of Ad group Ids to use to filter the results.
|
295
|
+
entity_statuses: ['ACTIVE'], # Array<String> | Entity status
|
296
|
+
page_size: 56, # Integer | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information.
|
297
|
+
order: 'ASCENDING', # String | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.
|
298
|
+
bookmark: 'bookmark_example', # String | Cursor used to fetch the next page of items
|
299
|
+
translate_interests_to_names: true # Boolean | Return interests as text names (if value is true) rather than topic IDs.
|
300
|
+
}
|
301
|
+
|
302
|
+
begin
|
303
|
+
# List ad groups
|
304
|
+
result = api_instance.ad_groups_list(ad_account_id, opts)
|
305
|
+
p result
|
306
|
+
rescue PinterestSdkClient::ApiError => e
|
307
|
+
puts "Error when calling AdAccountsApi->ad_groups_list: #{e}"
|
308
|
+
end
|
309
|
+
```
|
310
|
+
|
311
|
+
#### Using the ad_groups_list_with_http_info variant
|
312
|
+
|
313
|
+
This returns an Array which contains the response data, status code and headers.
|
314
|
+
|
315
|
+
> <Array(<Paginated>, Integer, Hash)> ad_groups_list_with_http_info(ad_account_id, opts)
|
316
|
+
|
317
|
+
```ruby
|
318
|
+
begin
|
319
|
+
# List ad groups
|
320
|
+
data, status_code, headers = api_instance.ad_groups_list_with_http_info(ad_account_id, opts)
|
321
|
+
p status_code # => 2xx
|
322
|
+
p headers # => { ... }
|
323
|
+
p data # => <Paginated>
|
324
|
+
rescue PinterestSdkClient::ApiError => e
|
325
|
+
puts "Error when calling AdAccountsApi->ad_groups_list_with_http_info: #{e}"
|
326
|
+
end
|
327
|
+
```
|
328
|
+
|
329
|
+
### Parameters
|
330
|
+
|
331
|
+
| Name | Type | Description | Notes |
|
332
|
+
| ---- | ---- | ----------- | ----- |
|
333
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
334
|
+
| **campaign_ids** | [**Array<String>**](String.md) | List of Campaign Ids to use to filter the results. | [optional] |
|
335
|
+
| **ad_group_ids** | [**Array<String>**](String.md) | List of Ad group Ids to use to filter the results. | [optional] |
|
336
|
+
| **entity_statuses** | [**Array<String>**](String.md) | Entity status | [optional] |
|
337
|
+
| **page_size** | **Integer** | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information. | [optional][default to 25] |
|
338
|
+
| **order** | **String** | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] |
|
339
|
+
| **bookmark** | **String** | Cursor used to fetch the next page of items | [optional] |
|
340
|
+
| **translate_interests_to_names** | **Boolean** | Return interests as text names (if value is true) rather than topic IDs. | [optional][default to false] |
|
341
|
+
|
342
|
+
### Return type
|
343
|
+
|
344
|
+
[**Paginated**](Paginated.md)
|
345
|
+
|
346
|
+
### Authorization
|
347
|
+
|
348
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
349
|
+
|
350
|
+
### HTTP request headers
|
351
|
+
|
352
|
+
- **Content-Type**: Not defined
|
353
|
+
- **Accept**: application/json
|
354
|
+
|
355
|
+
|
356
|
+
## ads_analytics
|
357
|
+
|
358
|
+
> Array<Hash<String, Object>> ads_analytics(ad_account_id, start_date, end_date, ad_ids, columns, granularity, opts)
|
359
|
+
|
360
|
+
Get ad analytics
|
361
|
+
|
362
|
+
Get analytics for the specified ads in the specified <code>ad_account_id</code>, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
363
|
+
|
364
|
+
### Examples
|
365
|
+
|
366
|
+
```ruby
|
367
|
+
require 'time'
|
368
|
+
require 'pinterest_sdk'
|
369
|
+
# setup authorization
|
370
|
+
PinterestSdkClient.configure do |config|
|
371
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
372
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
373
|
+
end
|
374
|
+
|
375
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
376
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
377
|
+
start_date = Date.parse('2013-10-20') # Date | Metric report start date (UTC). Format: YYYY-MM-DD
|
378
|
+
end_date = Date.parse('2013-10-20') # Date | Metric report end date (UTC). Format: YYYY-MM-DD
|
379
|
+
ad_ids = ['inner_example'] # Array<String> | List of Ad Ids to use to filter the results.
|
380
|
+
columns = ['AD_ACCOUNT_ID'] # Array<String> | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned
|
381
|
+
granularity = PinterestSdkClient::Granularity::TOTAL # Granularity | Granularity
|
382
|
+
opts = {
|
383
|
+
click_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
384
|
+
engagement_window_days: 1, # Integer | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
385
|
+
view_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.
|
386
|
+
conversion_report_time: 'TIME_OF_AD_ACTION' # String | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.
|
387
|
+
}
|
388
|
+
|
389
|
+
begin
|
390
|
+
# Get ad analytics
|
391
|
+
result = api_instance.ads_analytics(ad_account_id, start_date, end_date, ad_ids, columns, granularity, opts)
|
392
|
+
p result
|
393
|
+
rescue PinterestSdkClient::ApiError => e
|
394
|
+
puts "Error when calling AdAccountsApi->ads_analytics: #{e}"
|
395
|
+
end
|
396
|
+
```
|
397
|
+
|
398
|
+
#### Using the ads_analytics_with_http_info variant
|
399
|
+
|
400
|
+
This returns an Array which contains the response data, status code and headers.
|
401
|
+
|
402
|
+
> <Array(Array<Hash<String, Object>>, Integer, Hash)> ads_analytics_with_http_info(ad_account_id, start_date, end_date, ad_ids, columns, granularity, opts)
|
403
|
+
|
404
|
+
```ruby
|
405
|
+
begin
|
406
|
+
# Get ad analytics
|
407
|
+
data, status_code, headers = api_instance.ads_analytics_with_http_info(ad_account_id, start_date, end_date, ad_ids, columns, granularity, opts)
|
408
|
+
p status_code # => 2xx
|
409
|
+
p headers # => { ... }
|
410
|
+
p data # => Array<Hash<String, Object>>
|
411
|
+
rescue PinterestSdkClient::ApiError => e
|
412
|
+
puts "Error when calling AdAccountsApi->ads_analytics_with_http_info: #{e}"
|
413
|
+
end
|
414
|
+
```
|
415
|
+
|
416
|
+
### Parameters
|
417
|
+
|
418
|
+
| Name | Type | Description | Notes |
|
419
|
+
| ---- | ---- | ----------- | ----- |
|
420
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
421
|
+
| **start_date** | **Date** | Metric report start date (UTC). Format: YYYY-MM-DD | |
|
422
|
+
| **end_date** | **Date** | Metric report end date (UTC). Format: YYYY-MM-DD | |
|
423
|
+
| **ad_ids** | [**Array<String>**](String.md) | List of Ad Ids to use to filter the results. | |
|
424
|
+
| **columns** | [**Array<String>**](String.md) | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | |
|
425
|
+
| **granularity** | [**Granularity**](.md) | Granularity | |
|
426
|
+
| **click_window_days** | **Integer** | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
427
|
+
| **engagement_window_days** | **Integer** | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
428
|
+
| **view_window_days** | **Integer** | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day. | [optional][default to 1] |
|
429
|
+
| **conversion_report_time** | **String** | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event. | [optional][default to 'TIME_OF_AD_ACTION'] |
|
430
|
+
|
431
|
+
### Return type
|
432
|
+
|
433
|
+
**Array<Hash<String, Object>>**
|
434
|
+
|
435
|
+
### Authorization
|
436
|
+
|
437
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
438
|
+
|
439
|
+
### HTTP request headers
|
440
|
+
|
441
|
+
- **Content-Type**: Not defined
|
442
|
+
- **Accept**: application/json
|
443
|
+
|
444
|
+
|
445
|
+
## ads_list
|
446
|
+
|
447
|
+
> <Paginated> ads_list(ad_account_id, opts)
|
448
|
+
|
449
|
+
List ads
|
450
|
+
|
451
|
+
Get a list of the ads in the specified <code>ad_account_id</code>, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
452
|
+
|
453
|
+
### Examples
|
454
|
+
|
455
|
+
```ruby
|
456
|
+
require 'time'
|
457
|
+
require 'pinterest_sdk'
|
458
|
+
# setup authorization
|
459
|
+
PinterestSdkClient.configure do |config|
|
460
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
461
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
462
|
+
end
|
463
|
+
|
464
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
465
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
466
|
+
opts = {
|
467
|
+
campaign_ids: ['inner_example'], # Array<String> | List of Campaign Ids to use to filter the results.
|
468
|
+
ad_group_ids: ['inner_example'], # Array<String> | List of Ad group Ids to use to filter the results.
|
469
|
+
ad_ids: ['inner_example'], # Array<String> | List of Ad Ids to use to filter the results.
|
470
|
+
entity_statuses: ['ACTIVE'], # Array<String> | Entity status
|
471
|
+
page_size: 56, # Integer | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information.
|
472
|
+
order: 'ASCENDING', # String | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.
|
473
|
+
bookmark: 'bookmark_example' # String | Cursor used to fetch the next page of items
|
474
|
+
}
|
475
|
+
|
476
|
+
begin
|
477
|
+
# List ads
|
478
|
+
result = api_instance.ads_list(ad_account_id, opts)
|
479
|
+
p result
|
480
|
+
rescue PinterestSdkClient::ApiError => e
|
481
|
+
puts "Error when calling AdAccountsApi->ads_list: #{e}"
|
482
|
+
end
|
483
|
+
```
|
484
|
+
|
485
|
+
#### Using the ads_list_with_http_info variant
|
486
|
+
|
487
|
+
This returns an Array which contains the response data, status code and headers.
|
488
|
+
|
489
|
+
> <Array(<Paginated>, Integer, Hash)> ads_list_with_http_info(ad_account_id, opts)
|
490
|
+
|
491
|
+
```ruby
|
492
|
+
begin
|
493
|
+
# List ads
|
494
|
+
data, status_code, headers = api_instance.ads_list_with_http_info(ad_account_id, opts)
|
495
|
+
p status_code # => 2xx
|
496
|
+
p headers # => { ... }
|
497
|
+
p data # => <Paginated>
|
498
|
+
rescue PinterestSdkClient::ApiError => e
|
499
|
+
puts "Error when calling AdAccountsApi->ads_list_with_http_info: #{e}"
|
500
|
+
end
|
501
|
+
```
|
502
|
+
|
503
|
+
### Parameters
|
504
|
+
|
505
|
+
| Name | Type | Description | Notes |
|
506
|
+
| ---- | ---- | ----------- | ----- |
|
507
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
508
|
+
| **campaign_ids** | [**Array<String>**](String.md) | List of Campaign Ids to use to filter the results. | [optional] |
|
509
|
+
| **ad_group_ids** | [**Array<String>**](String.md) | List of Ad group Ids to use to filter the results. | [optional] |
|
510
|
+
| **ad_ids** | [**Array<String>**](String.md) | List of Ad Ids to use to filter the results. | [optional] |
|
511
|
+
| **entity_statuses** | [**Array<String>**](String.md) | Entity status | [optional] |
|
512
|
+
| **page_size** | **Integer** | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information. | [optional][default to 25] |
|
513
|
+
| **order** | **String** | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] |
|
514
|
+
| **bookmark** | **String** | Cursor used to fetch the next page of items | [optional] |
|
515
|
+
|
516
|
+
### Return type
|
517
|
+
|
518
|
+
[**Paginated**](Paginated.md)
|
519
|
+
|
520
|
+
### Authorization
|
521
|
+
|
522
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
523
|
+
|
524
|
+
### HTTP request headers
|
525
|
+
|
526
|
+
- **Content-Type**: Not defined
|
527
|
+
- **Accept**: application/json
|
528
|
+
|
529
|
+
|
530
|
+
## analytics_create_report
|
531
|
+
|
532
|
+
> <AdsAnalyticsCreateAsyncResponse> analytics_create_report(ad_account_id, ads_analytics_create_async_request)
|
533
|
+
|
534
|
+
Create async request for an account analytics report
|
535
|
+
|
536
|
+
This returns a token that you can use to download the report when it is ready. Note that this endpoint requires the parameters to be passed as JSON-formatted in the request body. This endpoint does not support URL query parameters. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
537
|
+
|
538
|
+
### Examples
|
539
|
+
|
540
|
+
```ruby
|
541
|
+
require 'time'
|
542
|
+
require 'pinterest_sdk'
|
543
|
+
# setup authorization
|
544
|
+
PinterestSdkClient.configure do |config|
|
545
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
546
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
547
|
+
end
|
548
|
+
|
549
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
550
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
551
|
+
ads_analytics_create_async_request = PinterestSdkClient::AdsAnalyticsCreateAsyncRequest.new({start_date: '2020-12-20', end_date: '2020-12-20', granularity: PinterestSdkClient::Granularity::TOTAL, columns: [PinterestSdkClient::ReportingColumnAsync::SPEND_IN_MICRO_DOLLAR], level: PinterestSdkClient::MetricsReportingLevel::ADVERTISER}) # AdsAnalyticsCreateAsyncRequest |
|
552
|
+
|
553
|
+
begin
|
554
|
+
# Create async request for an account analytics report
|
555
|
+
result = api_instance.analytics_create_report(ad_account_id, ads_analytics_create_async_request)
|
556
|
+
p result
|
557
|
+
rescue PinterestSdkClient::ApiError => e
|
558
|
+
puts "Error when calling AdAccountsApi->analytics_create_report: #{e}"
|
559
|
+
end
|
560
|
+
```
|
561
|
+
|
562
|
+
#### Using the analytics_create_report_with_http_info variant
|
563
|
+
|
564
|
+
This returns an Array which contains the response data, status code and headers.
|
565
|
+
|
566
|
+
> <Array(<AdsAnalyticsCreateAsyncResponse>, Integer, Hash)> analytics_create_report_with_http_info(ad_account_id, ads_analytics_create_async_request)
|
567
|
+
|
568
|
+
```ruby
|
569
|
+
begin
|
570
|
+
# Create async request for an account analytics report
|
571
|
+
data, status_code, headers = api_instance.analytics_create_report_with_http_info(ad_account_id, ads_analytics_create_async_request)
|
572
|
+
p status_code # => 2xx
|
573
|
+
p headers # => { ... }
|
574
|
+
p data # => <AdsAnalyticsCreateAsyncResponse>
|
575
|
+
rescue PinterestSdkClient::ApiError => e
|
576
|
+
puts "Error when calling AdAccountsApi->analytics_create_report_with_http_info: #{e}"
|
577
|
+
end
|
578
|
+
```
|
579
|
+
|
580
|
+
### Parameters
|
581
|
+
|
582
|
+
| Name | Type | Description | Notes |
|
583
|
+
| ---- | ---- | ----------- | ----- |
|
584
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
585
|
+
| **ads_analytics_create_async_request** | [**AdsAnalyticsCreateAsyncRequest**](AdsAnalyticsCreateAsyncRequest.md) | | |
|
586
|
+
|
587
|
+
### Return type
|
588
|
+
|
589
|
+
[**AdsAnalyticsCreateAsyncResponse**](AdsAnalyticsCreateAsyncResponse.md)
|
590
|
+
|
591
|
+
### Authorization
|
592
|
+
|
593
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
594
|
+
|
595
|
+
### HTTP request headers
|
596
|
+
|
597
|
+
- **Content-Type**: application/json
|
598
|
+
- **Accept**: application/json
|
599
|
+
|
600
|
+
|
601
|
+
## analytics_get_report
|
602
|
+
|
603
|
+
> <AdsAnalyticsGetAsyncResponse> analytics_get_report(ad_account_id, token)
|
604
|
+
|
605
|
+
Get the account analytics report created by the async call
|
606
|
+
|
607
|
+
This returns a URL to an analytics report given a token returned from the post request report creation call. You can use the URL to download the report and it's valid for an hour. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
608
|
+
|
609
|
+
### Examples
|
610
|
+
|
611
|
+
```ruby
|
612
|
+
require 'time'
|
613
|
+
require 'pinterest_sdk'
|
614
|
+
# setup authorization
|
615
|
+
PinterestSdkClient.configure do |config|
|
616
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
617
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
618
|
+
end
|
619
|
+
|
620
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
621
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
622
|
+
token = 'token_example' # String | Token returned from the post request creation call
|
623
|
+
|
624
|
+
begin
|
625
|
+
# Get the account analytics report created by the async call
|
626
|
+
result = api_instance.analytics_get_report(ad_account_id, token)
|
627
|
+
p result
|
628
|
+
rescue PinterestSdkClient::ApiError => e
|
629
|
+
puts "Error when calling AdAccountsApi->analytics_get_report: #{e}"
|
630
|
+
end
|
631
|
+
```
|
632
|
+
|
633
|
+
#### Using the analytics_get_report_with_http_info variant
|
634
|
+
|
635
|
+
This returns an Array which contains the response data, status code and headers.
|
636
|
+
|
637
|
+
> <Array(<AdsAnalyticsGetAsyncResponse>, Integer, Hash)> analytics_get_report_with_http_info(ad_account_id, token)
|
638
|
+
|
639
|
+
```ruby
|
640
|
+
begin
|
641
|
+
# Get the account analytics report created by the async call
|
642
|
+
data, status_code, headers = api_instance.analytics_get_report_with_http_info(ad_account_id, token)
|
643
|
+
p status_code # => 2xx
|
644
|
+
p headers # => { ... }
|
645
|
+
p data # => <AdsAnalyticsGetAsyncResponse>
|
646
|
+
rescue PinterestSdkClient::ApiError => e
|
647
|
+
puts "Error when calling AdAccountsApi->analytics_get_report_with_http_info: #{e}"
|
648
|
+
end
|
649
|
+
```
|
650
|
+
|
651
|
+
### Parameters
|
652
|
+
|
653
|
+
| Name | Type | Description | Notes |
|
654
|
+
| ---- | ---- | ----------- | ----- |
|
655
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
656
|
+
| **token** | **String** | Token returned from the post request creation call | |
|
657
|
+
|
658
|
+
### Return type
|
659
|
+
|
660
|
+
[**AdsAnalyticsGetAsyncResponse**](AdsAnalyticsGetAsyncResponse.md)
|
661
|
+
|
662
|
+
### Authorization
|
663
|
+
|
664
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
665
|
+
|
666
|
+
### HTTP request headers
|
667
|
+
|
668
|
+
- **Content-Type**: Not defined
|
669
|
+
- **Accept**: application/json
|
670
|
+
|
671
|
+
|
672
|
+
## campaigns_analytics
|
673
|
+
|
674
|
+
> Array<Hash<String, Object>> campaigns_analytics(ad_account_id, start_date, end_date, campaign_ids, columns, granularity, opts)
|
675
|
+
|
676
|
+
Get campaign analytics
|
677
|
+
|
678
|
+
Get analytics for the specified campaigns in the specified <code>ad_account_id</code>, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
679
|
+
|
680
|
+
### Examples
|
681
|
+
|
682
|
+
```ruby
|
683
|
+
require 'time'
|
684
|
+
require 'pinterest_sdk'
|
685
|
+
# setup authorization
|
686
|
+
PinterestSdkClient.configure do |config|
|
687
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
688
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
689
|
+
end
|
690
|
+
|
691
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
692
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
693
|
+
start_date = Date.parse('2013-10-20') # Date | Metric report start date (UTC). Format: YYYY-MM-DD
|
694
|
+
end_date = Date.parse('2013-10-20') # Date | Metric report end date (UTC). Format: YYYY-MM-DD
|
695
|
+
campaign_ids = ['inner_example'] # Array<String> | List of Campaign Ids to use to filter the results.
|
696
|
+
columns = ['AD_ACCOUNT_ID'] # Array<String> | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned
|
697
|
+
granularity = PinterestSdkClient::Granularity::TOTAL # Granularity | Granularity
|
698
|
+
opts = {
|
699
|
+
click_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
700
|
+
engagement_window_days: 1, # Integer | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
701
|
+
view_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.
|
702
|
+
conversion_report_time: 'TIME_OF_AD_ACTION' # String | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.
|
703
|
+
}
|
704
|
+
|
705
|
+
begin
|
706
|
+
# Get campaign analytics
|
707
|
+
result = api_instance.campaigns_analytics(ad_account_id, start_date, end_date, campaign_ids, columns, granularity, opts)
|
708
|
+
p result
|
709
|
+
rescue PinterestSdkClient::ApiError => e
|
710
|
+
puts "Error when calling AdAccountsApi->campaigns_analytics: #{e}"
|
711
|
+
end
|
712
|
+
```
|
713
|
+
|
714
|
+
#### Using the campaigns_analytics_with_http_info variant
|
715
|
+
|
716
|
+
This returns an Array which contains the response data, status code and headers.
|
717
|
+
|
718
|
+
> <Array(Array<Hash<String, Object>>, Integer, Hash)> campaigns_analytics_with_http_info(ad_account_id, start_date, end_date, campaign_ids, columns, granularity, opts)
|
719
|
+
|
720
|
+
```ruby
|
721
|
+
begin
|
722
|
+
# Get campaign analytics
|
723
|
+
data, status_code, headers = api_instance.campaigns_analytics_with_http_info(ad_account_id, start_date, end_date, campaign_ids, columns, granularity, opts)
|
724
|
+
p status_code # => 2xx
|
725
|
+
p headers # => { ... }
|
726
|
+
p data # => Array<Hash<String, Object>>
|
727
|
+
rescue PinterestSdkClient::ApiError => e
|
728
|
+
puts "Error when calling AdAccountsApi->campaigns_analytics_with_http_info: #{e}"
|
729
|
+
end
|
730
|
+
```
|
731
|
+
|
732
|
+
### Parameters
|
733
|
+
|
734
|
+
| Name | Type | Description | Notes |
|
735
|
+
| ---- | ---- | ----------- | ----- |
|
736
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
737
|
+
| **start_date** | **Date** | Metric report start date (UTC). Format: YYYY-MM-DD | |
|
738
|
+
| **end_date** | **Date** | Metric report end date (UTC). Format: YYYY-MM-DD | |
|
739
|
+
| **campaign_ids** | [**Array<String>**](String.md) | List of Campaign Ids to use to filter the results. | |
|
740
|
+
| **columns** | [**Array<String>**](String.md) | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | |
|
741
|
+
| **granularity** | [**Granularity**](.md) | Granularity | |
|
742
|
+
| **click_window_days** | **Integer** | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
743
|
+
| **engagement_window_days** | **Integer** | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
744
|
+
| **view_window_days** | **Integer** | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day. | [optional][default to 1] |
|
745
|
+
| **conversion_report_time** | **String** | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event. | [optional][default to 'TIME_OF_AD_ACTION'] |
|
746
|
+
|
747
|
+
### Return type
|
748
|
+
|
749
|
+
**Array<Hash<String, Object>>**
|
750
|
+
|
751
|
+
### Authorization
|
752
|
+
|
753
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
754
|
+
|
755
|
+
### HTTP request headers
|
756
|
+
|
757
|
+
- **Content-Type**: Not defined
|
758
|
+
- **Accept**: application/json
|
759
|
+
|
760
|
+
|
761
|
+
## campaigns_list
|
762
|
+
|
763
|
+
> <Paginated> campaigns_list(ad_account_id, opts)
|
764
|
+
|
765
|
+
List campaigns
|
766
|
+
|
767
|
+
Get a list of the campaigns in the specified <code>ad_account_id</code>, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
768
|
+
|
769
|
+
### Examples
|
770
|
+
|
771
|
+
```ruby
|
772
|
+
require 'time'
|
773
|
+
require 'pinterest_sdk'
|
774
|
+
# setup authorization
|
775
|
+
PinterestSdkClient.configure do |config|
|
776
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
777
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
778
|
+
end
|
779
|
+
|
780
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
781
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
782
|
+
opts = {
|
783
|
+
campaign_ids: ['inner_example'], # Array<String> | List of Campaign Ids to use to filter the results.
|
784
|
+
entity_statuses: ['ACTIVE'], # Array<String> | Entity status
|
785
|
+
page_size: 56, # Integer | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information.
|
786
|
+
order: 'ASCENDING', # String | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.
|
787
|
+
bookmark: 'bookmark_example' # String | Cursor used to fetch the next page of items
|
788
|
+
}
|
789
|
+
|
790
|
+
begin
|
791
|
+
# List campaigns
|
792
|
+
result = api_instance.campaigns_list(ad_account_id, opts)
|
793
|
+
p result
|
794
|
+
rescue PinterestSdkClient::ApiError => e
|
795
|
+
puts "Error when calling AdAccountsApi->campaigns_list: #{e}"
|
796
|
+
end
|
797
|
+
```
|
798
|
+
|
799
|
+
#### Using the campaigns_list_with_http_info variant
|
800
|
+
|
801
|
+
This returns an Array which contains the response data, status code and headers.
|
802
|
+
|
803
|
+
> <Array(<Paginated>, Integer, Hash)> campaigns_list_with_http_info(ad_account_id, opts)
|
804
|
+
|
805
|
+
```ruby
|
806
|
+
begin
|
807
|
+
# List campaigns
|
808
|
+
data, status_code, headers = api_instance.campaigns_list_with_http_info(ad_account_id, opts)
|
809
|
+
p status_code # => 2xx
|
810
|
+
p headers # => { ... }
|
811
|
+
p data # => <Paginated>
|
812
|
+
rescue PinterestSdkClient::ApiError => e
|
813
|
+
puts "Error when calling AdAccountsApi->campaigns_list_with_http_info: #{e}"
|
814
|
+
end
|
815
|
+
```
|
816
|
+
|
817
|
+
### Parameters
|
818
|
+
|
819
|
+
| Name | Type | Description | Notes |
|
820
|
+
| ---- | ---- | ----------- | ----- |
|
821
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
822
|
+
| **campaign_ids** | [**Array<String>**](String.md) | List of Campaign Ids to use to filter the results. | [optional] |
|
823
|
+
| **entity_statuses** | [**Array<String>**](String.md) | Entity status | [optional] |
|
824
|
+
| **page_size** | **Integer** | Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information. | [optional][default to 25] |
|
825
|
+
| **order** | **String** | The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items. | [optional] |
|
826
|
+
| **bookmark** | **String** | Cursor used to fetch the next page of items | [optional] |
|
827
|
+
|
828
|
+
### Return type
|
829
|
+
|
830
|
+
[**Paginated**](Paginated.md)
|
831
|
+
|
832
|
+
### Authorization
|
833
|
+
|
834
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
835
|
+
|
836
|
+
### HTTP request headers
|
837
|
+
|
838
|
+
- **Content-Type**: Not defined
|
839
|
+
- **Accept**: application/json
|
840
|
+
|
841
|
+
|
842
|
+
## product_groups_analytics
|
843
|
+
|
844
|
+
> Array<Hash<String, Object>> product_groups_analytics(ad_account_id, start_date, end_date, product_group_ids, columns, granularity, opts)
|
845
|
+
|
846
|
+
Get product group analytics
|
847
|
+
|
848
|
+
Get analytics for the specified product groups in the specified <code>ad_account_id</code>, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.
|
849
|
+
|
850
|
+
### Examples
|
851
|
+
|
852
|
+
```ruby
|
853
|
+
require 'time'
|
854
|
+
require 'pinterest_sdk'
|
855
|
+
# setup authorization
|
856
|
+
PinterestSdkClient.configure do |config|
|
857
|
+
# Configure OAuth2 access token for authorization: pinterest_oauth2
|
858
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
859
|
+
end
|
860
|
+
|
861
|
+
api_instance = PinterestSdkClient::AdAccountsApi.new
|
862
|
+
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
|
863
|
+
start_date = Date.parse('2013-10-20') # Date | Metric report start date (UTC). Format: YYYY-MM-DD
|
864
|
+
end_date = Date.parse('2013-10-20') # Date | Metric report end date (UTC). Format: YYYY-MM-DD
|
865
|
+
product_group_ids = ['inner_example'] # Array<String> | List of Product group Ids to use to filter the results.
|
866
|
+
columns = ['AD_ACCOUNT_ID'] # Array<String> | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned
|
867
|
+
granularity = PinterestSdkClient::Granularity::TOTAL # Granularity | Granularity
|
868
|
+
opts = {
|
869
|
+
click_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
870
|
+
engagement_window_days: 1, # Integer | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
|
871
|
+
view_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.
|
872
|
+
conversion_report_time: 'TIME_OF_AD_ACTION' # String | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.
|
873
|
+
}
|
874
|
+
|
875
|
+
begin
|
876
|
+
# Get product group analytics
|
877
|
+
result = api_instance.product_groups_analytics(ad_account_id, start_date, end_date, product_group_ids, columns, granularity, opts)
|
878
|
+
p result
|
879
|
+
rescue PinterestSdkClient::ApiError => e
|
880
|
+
puts "Error when calling AdAccountsApi->product_groups_analytics: #{e}"
|
881
|
+
end
|
882
|
+
```
|
883
|
+
|
884
|
+
#### Using the product_groups_analytics_with_http_info variant
|
885
|
+
|
886
|
+
This returns an Array which contains the response data, status code and headers.
|
887
|
+
|
888
|
+
> <Array(Array<Hash<String, Object>>, Integer, Hash)> product_groups_analytics_with_http_info(ad_account_id, start_date, end_date, product_group_ids, columns, granularity, opts)
|
889
|
+
|
890
|
+
```ruby
|
891
|
+
begin
|
892
|
+
# Get product group analytics
|
893
|
+
data, status_code, headers = api_instance.product_groups_analytics_with_http_info(ad_account_id, start_date, end_date, product_group_ids, columns, granularity, opts)
|
894
|
+
p status_code # => 2xx
|
895
|
+
p headers # => { ... }
|
896
|
+
p data # => Array<Hash<String, Object>>
|
897
|
+
rescue PinterestSdkClient::ApiError => e
|
898
|
+
puts "Error when calling AdAccountsApi->product_groups_analytics_with_http_info: #{e}"
|
899
|
+
end
|
900
|
+
```
|
901
|
+
|
902
|
+
### Parameters
|
903
|
+
|
904
|
+
| Name | Type | Description | Notes |
|
905
|
+
| ---- | ---- | ----------- | ----- |
|
906
|
+
| **ad_account_id** | **String** | Unique identifier of an ad account. | |
|
907
|
+
| **start_date** | **Date** | Metric report start date (UTC). Format: YYYY-MM-DD | |
|
908
|
+
| **end_date** | **Date** | Metric report end date (UTC). Format: YYYY-MM-DD | |
|
909
|
+
| **product_group_ids** | [**Array<String>**](String.md) | List of Product group Ids to use to filter the results. | |
|
910
|
+
| **columns** | [**Array<String>**](String.md) | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned | |
|
911
|
+
| **granularity** | [**Granularity**](.md) | Granularity | |
|
912
|
+
| **click_window_days** | **Integer** | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
913
|
+
| **engagement_window_days** | **Integer** | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. | [optional][default to 30] |
|
914
|
+
| **view_window_days** | **Integer** | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day. | [optional][default to 1] |
|
915
|
+
| **conversion_report_time** | **String** | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event. | [optional][default to 'TIME_OF_AD_ACTION'] |
|
916
|
+
|
917
|
+
### Return type
|
918
|
+
|
919
|
+
**Array<Hash<String, Object>>**
|
920
|
+
|
921
|
+
### Authorization
|
922
|
+
|
923
|
+
[pinterest_oauth2](../README.md#pinterest_oauth2)
|
924
|
+
|
925
|
+
### HTTP request headers
|
926
|
+
|
927
|
+
- **Content-Type**: Not defined
|
928
|
+
- **Accept**: application/json
|
929
|
+
|