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,229 @@
|
|
1
|
+
=begin
|
2
|
+
#Pinterest REST API
|
3
|
+
|
4
|
+
#Pinterest's REST API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 5.3.0
|
7
|
+
Contact: pinterest-api@pinterest.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PinterestSdkClient
|
16
|
+
class MediaApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Register media upload
|
23
|
+
# Register your intent to upload media The response includes all of the information needed to upload the media to Pinterest. To upload the media, make an HTTP POST request (using <tt>curl</tt>, for example) to <tt>upload_url</tt> using the <tt>Content-Type</tt> header value. Send the media file's contents as the request's <tt>file</tt> parameter and also include all of the parameters from <tt>upload_parameters</tt>. <strong><a href='/docs/solutions/content-apps/#creatingvideopins'>Learn more</a></strong> about video Pin creation.
|
24
|
+
# @param media_upload_request [MediaUploadRequest] Create a media upload request
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [MediaUpload]
|
27
|
+
def media_create(media_upload_request, opts = {})
|
28
|
+
data, _status_code, _headers = media_create_with_http_info(media_upload_request, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Register media upload
|
33
|
+
# Register your intent to upload media The response includes all of the information needed to upload the media to Pinterest. To upload the media, make an HTTP POST request (using <tt>curl</tt>, for example) to <tt>upload_url</tt> using the <tt>Content-Type</tt> header value. Send the media file's contents as the request's <tt>file</tt> parameter and also include all of the parameters from <tt>upload_parameters</tt>. <strong><a href='/docs/solutions/content-apps/#creatingvideopins'>Learn more</a></strong> about video Pin creation.
|
34
|
+
# @param media_upload_request [MediaUploadRequest] Create a media upload request
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(MediaUpload, Integer, Hash)>] MediaUpload data, response status code and response headers
|
37
|
+
def media_create_with_http_info(media_upload_request, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.media_create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'media_upload_request' is set
|
42
|
+
if @api_client.config.client_side_validation && media_upload_request.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'media_upload_request' when calling MediaApi.media_create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/media'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
57
|
+
if !content_type.nil?
|
58
|
+
header_params['Content-Type'] = content_type
|
59
|
+
end
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(media_upload_request)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:debug_return_type] || 'MediaUpload'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:operation => :"MediaApi.media_create",
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: MediaApi#media_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Get media upload details
|
91
|
+
# Get details for a registered media upload, including its current status. <strong><a href='/docs/solutions/content-apps/#creatingvideopins'>Learn more</a></strong> about video Pin creation.
|
92
|
+
# @param media_id [String] Media identifier
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [MediaUploadDetails]
|
95
|
+
def media_get(media_id, opts = {})
|
96
|
+
data, _status_code, _headers = media_get_with_http_info(media_id, opts)
|
97
|
+
data
|
98
|
+
end
|
99
|
+
|
100
|
+
# Get media upload details
|
101
|
+
# Get details for a registered media upload, including its current status. <strong><a href='/docs/solutions/content-apps/#creatingvideopins'>Learn more</a></strong> about video Pin creation.
|
102
|
+
# @param media_id [String] Media identifier
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [Array<(MediaUploadDetails, Integer, Hash)>] MediaUploadDetails data, response status code and response headers
|
105
|
+
def media_get_with_http_info(media_id, opts = {})
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.media_get ...'
|
108
|
+
end
|
109
|
+
# verify the required parameter 'media_id' is set
|
110
|
+
if @api_client.config.client_side_validation && media_id.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'media_id' when calling MediaApi.media_get"
|
112
|
+
end
|
113
|
+
pattern = Regexp.new(/^\d+$/)
|
114
|
+
if @api_client.config.client_side_validation && media_id !~ pattern
|
115
|
+
fail ArgumentError, "invalid value for 'media_id' when calling MediaApi.media_get, must conform to the pattern #{pattern}."
|
116
|
+
end
|
117
|
+
|
118
|
+
# resource path
|
119
|
+
local_var_path = '/media/{media_id}'.sub('{' + 'media_id' + '}', CGI.escape(media_id.to_s))
|
120
|
+
|
121
|
+
# query parameters
|
122
|
+
query_params = opts[:query_params] || {}
|
123
|
+
|
124
|
+
# header parameters
|
125
|
+
header_params = opts[:header_params] || {}
|
126
|
+
# HTTP header 'Accept' (if needed)
|
127
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
128
|
+
|
129
|
+
# form parameters
|
130
|
+
form_params = opts[:form_params] || {}
|
131
|
+
|
132
|
+
# http body (model)
|
133
|
+
post_body = opts[:debug_body]
|
134
|
+
|
135
|
+
# return_type
|
136
|
+
return_type = opts[:debug_return_type] || 'MediaUploadDetails'
|
137
|
+
|
138
|
+
# auth_names
|
139
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
140
|
+
|
141
|
+
new_options = opts.merge(
|
142
|
+
:operation => :"MediaApi.media_get",
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => return_type
|
149
|
+
)
|
150
|
+
|
151
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "API called: MediaApi#media_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
154
|
+
end
|
155
|
+
return data, status_code, headers
|
156
|
+
end
|
157
|
+
|
158
|
+
# List media uploads
|
159
|
+
# List media uploads filtered by given parameters. <strong><a href='/docs/solutions/content-apps/#creatingvideopins'>Learn more</a></strong> about video Pin creation.
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
162
|
+
# @option opts [Integer] :page_size 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. (default to 25)
|
163
|
+
# @return [Paginated]
|
164
|
+
def media_list(opts = {})
|
165
|
+
data, _status_code, _headers = media_list_with_http_info(opts)
|
166
|
+
data
|
167
|
+
end
|
168
|
+
|
169
|
+
# List media uploads
|
170
|
+
# List media uploads filtered by given parameters. <strong><a href='/docs/solutions/content-apps/#creatingvideopins'>Learn more</a></strong> about video Pin creation.
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
173
|
+
# @option opts [Integer] :page_size 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.
|
174
|
+
# @return [Array<(Paginated, Integer, Hash)>] Paginated data, response status code and response headers
|
175
|
+
def media_list_with_http_info(opts = {})
|
176
|
+
if @api_client.config.debugging
|
177
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.media_list ...'
|
178
|
+
end
|
179
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
180
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling MediaApi.media_list, must be smaller than or equal to 100.'
|
181
|
+
end
|
182
|
+
|
183
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
184
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling MediaApi.media_list, must be greater than or equal to 1.'
|
185
|
+
end
|
186
|
+
|
187
|
+
# resource path
|
188
|
+
local_var_path = '/media'
|
189
|
+
|
190
|
+
# query parameters
|
191
|
+
query_params = opts[:query_params] || {}
|
192
|
+
query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil?
|
193
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
194
|
+
|
195
|
+
# header parameters
|
196
|
+
header_params = opts[:header_params] || {}
|
197
|
+
# HTTP header 'Accept' (if needed)
|
198
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
199
|
+
|
200
|
+
# form parameters
|
201
|
+
form_params = opts[:form_params] || {}
|
202
|
+
|
203
|
+
# http body (model)
|
204
|
+
post_body = opts[:debug_body]
|
205
|
+
|
206
|
+
# return_type
|
207
|
+
return_type = opts[:debug_return_type] || 'Paginated'
|
208
|
+
|
209
|
+
# auth_names
|
210
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
211
|
+
|
212
|
+
new_options = opts.merge(
|
213
|
+
:operation => :"MediaApi.media_list",
|
214
|
+
:header_params => header_params,
|
215
|
+
:query_params => query_params,
|
216
|
+
:form_params => form_params,
|
217
|
+
:body => post_body,
|
218
|
+
:auth_names => auth_names,
|
219
|
+
:return_type => return_type
|
220
|
+
)
|
221
|
+
|
222
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
223
|
+
if @api_client.config.debugging
|
224
|
+
@api_client.config.logger.debug "API called: MediaApi#media_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
225
|
+
end
|
226
|
+
return data, status_code, headers
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
=begin
|
2
|
+
#Pinterest REST API
|
3
|
+
|
4
|
+
#Pinterest's REST API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 5.3.0
|
7
|
+
Contact: pinterest-api@pinterest.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PinterestSdkClient
|
16
|
+
class OauthApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Generate OAuth access token
|
23
|
+
# Generate an OAuth access token by using an authorization code or a refresh token. See <a href='/docs/api/v5/#tag/Authentication'>Authentication</a> for more.
|
24
|
+
# @param grant_type [String]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [OauthAccessTokenResponse]
|
27
|
+
def oauth_token(grant_type, opts = {})
|
28
|
+
data, _status_code, _headers = oauth_token_with_http_info(grant_type, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Generate OAuth access token
|
33
|
+
# Generate an OAuth access token by using an authorization code or a refresh token. See <a href='/docs/api/v5/#tag/Authentication'>Authentication</a> for more.
|
34
|
+
# @param grant_type [String]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(OauthAccessTokenResponse, Integer, Hash)>] OauthAccessTokenResponse data, response status code and response headers
|
37
|
+
def oauth_token_with_http_info(grant_type, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: OauthApi.oauth_token ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'grant_type' is set
|
42
|
+
if @api_client.config.client_side_validation && grant_type.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'grant_type' when calling OauthApi.oauth_token"
|
44
|
+
end
|
45
|
+
# verify enum value
|
46
|
+
allowable_values = ["authorization_code", "refresh_token"]
|
47
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(grant_type)
|
48
|
+
fail ArgumentError, "invalid value for \"grant_type\", must be one of #{allowable_values}"
|
49
|
+
end
|
50
|
+
# resource path
|
51
|
+
local_var_path = '/oauth/token'
|
52
|
+
|
53
|
+
# query parameters
|
54
|
+
query_params = opts[:query_params] || {}
|
55
|
+
|
56
|
+
# header parameters
|
57
|
+
header_params = opts[:header_params] || {}
|
58
|
+
# HTTP header 'Accept' (if needed)
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
# HTTP header 'Content-Type'
|
61
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
62
|
+
if !content_type.nil?
|
63
|
+
header_params['Content-Type'] = content_type
|
64
|
+
end
|
65
|
+
|
66
|
+
# form parameters
|
67
|
+
form_params = opts[:form_params] || {}
|
68
|
+
form_params['grant_type'] = grant_type
|
69
|
+
|
70
|
+
# http body (model)
|
71
|
+
post_body = opts[:debug_body]
|
72
|
+
|
73
|
+
# return_type
|
74
|
+
return_type = opts[:debug_return_type] || 'OauthAccessTokenResponse'
|
75
|
+
|
76
|
+
# auth_names
|
77
|
+
auth_names = opts[:debug_auth_names] || []
|
78
|
+
|
79
|
+
new_options = opts.merge(
|
80
|
+
:operation => :"OauthApi.oauth_token",
|
81
|
+
:header_params => header_params,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body,
|
85
|
+
:auth_names => auth_names,
|
86
|
+
:return_type => return_type
|
87
|
+
)
|
88
|
+
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug "API called: OauthApi#oauth_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
|
+
end
|
93
|
+
return data, status_code, headers
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,330 @@
|
|
1
|
+
=begin
|
2
|
+
#Pinterest REST API
|
3
|
+
|
4
|
+
#Pinterest's REST API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 5.3.0
|
7
|
+
Contact: pinterest-api@pinterest.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PinterestSdkClient
|
16
|
+
class PinsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get Pin analytics
|
23
|
+
# Get analytics for a Pin owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an <code>ad_account_id</code> (obtained via <a href=\"https://developers.pinterest.com/docs/api/v5/#operation/ad_accounts/list\">List ad accounts</a>) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a> roles on the ad_account: - For Pins on public or protected boards: Admin, Analyst. - For Pins on secret boards: Admin.
|
24
|
+
# @param pin_id [String] Unique identifier of a Pin.
|
25
|
+
# @param start_date [Date] Metric report start date (UTC). Format: YYYY-MM-DD
|
26
|
+
# @param end_date [Date] Metric report end date (UTC). Format: YYYY-MM-DD
|
27
|
+
# @param metric_types [Array<String>] Pin metric types to get data for, default is all.
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @option opts [String] :app_types Apps or devices to get data for, default is all. (default to 'ALL')
|
30
|
+
# @option opts [String] :split_field How to split the data into groups. Not including this param means data won't be split. (default to 'NO_SPLIT')
|
31
|
+
# @option opts [String] :ad_account_id Unique identifier of an ad account.
|
32
|
+
# @return [Hash<String, AnalyticsMetricsResponse>]
|
33
|
+
def pins_analytics(pin_id, start_date, end_date, metric_types, opts = {})
|
34
|
+
data, _status_code, _headers = pins_analytics_with_http_info(pin_id, start_date, end_date, metric_types, opts)
|
35
|
+
data
|
36
|
+
end
|
37
|
+
|
38
|
+
# Get Pin analytics
|
39
|
+
# Get analytics for a Pin owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an <code>ad_account_id</code> (obtained via <a href=\"https://developers.pinterest.com/docs/api/v5/#operation/ad_accounts/list\">List ad accounts</a>) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a> roles on the ad_account: - For Pins on public or protected boards: Admin, Analyst. - For Pins on secret boards: Admin.
|
40
|
+
# @param pin_id [String] Unique identifier of a Pin.
|
41
|
+
# @param start_date [Date] Metric report start date (UTC). Format: YYYY-MM-DD
|
42
|
+
# @param end_date [Date] Metric report end date (UTC). Format: YYYY-MM-DD
|
43
|
+
# @param metric_types [Array<String>] Pin metric types to get data for, default is all.
|
44
|
+
# @param [Hash] opts the optional parameters
|
45
|
+
# @option opts [String] :app_types Apps or devices to get data for, default is all.
|
46
|
+
# @option opts [String] :split_field How to split the data into groups. Not including this param means data won't be split.
|
47
|
+
# @option opts [String] :ad_account_id Unique identifier of an ad account.
|
48
|
+
# @return [Array<(Hash<String, AnalyticsMetricsResponse>, Integer, Hash)>] Hash<String, AnalyticsMetricsResponse> data, response status code and response headers
|
49
|
+
def pins_analytics_with_http_info(pin_id, start_date, end_date, metric_types, opts = {})
|
50
|
+
if @api_client.config.debugging
|
51
|
+
@api_client.config.logger.debug 'Calling API: PinsApi.pins_analytics ...'
|
52
|
+
end
|
53
|
+
# verify the required parameter 'pin_id' is set
|
54
|
+
if @api_client.config.client_side_validation && pin_id.nil?
|
55
|
+
fail ArgumentError, "Missing the required parameter 'pin_id' when calling PinsApi.pins_analytics"
|
56
|
+
end
|
57
|
+
# verify the required parameter 'start_date' is set
|
58
|
+
if @api_client.config.client_side_validation && start_date.nil?
|
59
|
+
fail ArgumentError, "Missing the required parameter 'start_date' when calling PinsApi.pins_analytics"
|
60
|
+
end
|
61
|
+
# verify the required parameter 'end_date' is set
|
62
|
+
if @api_client.config.client_side_validation && end_date.nil?
|
63
|
+
fail ArgumentError, "Missing the required parameter 'end_date' when calling PinsApi.pins_analytics"
|
64
|
+
end
|
65
|
+
# verify the required parameter 'metric_types' is set
|
66
|
+
if @api_client.config.client_side_validation && metric_types.nil?
|
67
|
+
fail ArgumentError, "Missing the required parameter 'metric_types' when calling PinsApi.pins_analytics"
|
68
|
+
end
|
69
|
+
allowable_values = ["ALL", "MOBILE", "TABLET", "WEB"]
|
70
|
+
if @api_client.config.client_side_validation && opts[:'app_types'] && !allowable_values.include?(opts[:'app_types'])
|
71
|
+
fail ArgumentError, "invalid value for \"app_types\", must be one of #{allowable_values}"
|
72
|
+
end
|
73
|
+
allowable_values = ["NO_SPLIT", "APP_TYPE"]
|
74
|
+
if @api_client.config.client_side_validation && opts[:'split_field'] && !allowable_values.include?(opts[:'split_field'])
|
75
|
+
fail ArgumentError, "invalid value for \"split_field\", must be one of #{allowable_values}"
|
76
|
+
end
|
77
|
+
pattern = Regexp.new(/^\d+$/)
|
78
|
+
if @api_client.config.client_side_validation && !opts[:'ad_account_id'].nil? && opts[:'ad_account_id'] !~ pattern
|
79
|
+
fail ArgumentError, "invalid value for 'opts[:\"ad_account_id\"]' when calling PinsApi.pins_analytics, must conform to the pattern #{pattern}."
|
80
|
+
end
|
81
|
+
|
82
|
+
# resource path
|
83
|
+
local_var_path = '/pins/{pin_id}/analytics'.sub('{' + 'pin_id' + '}', CGI.escape(pin_id.to_s))
|
84
|
+
|
85
|
+
# query parameters
|
86
|
+
query_params = opts[:query_params] || {}
|
87
|
+
query_params[:'start_date'] = start_date
|
88
|
+
query_params[:'end_date'] = end_date
|
89
|
+
query_params[:'metric_types'] = @api_client.build_collection_param(metric_types, :csv)
|
90
|
+
query_params[:'app_types'] = opts[:'app_types'] if !opts[:'app_types'].nil?
|
91
|
+
query_params[:'split_field'] = opts[:'split_field'] if !opts[:'split_field'].nil?
|
92
|
+
query_params[:'ad_account_id'] = opts[:'ad_account_id'] if !opts[:'ad_account_id'].nil?
|
93
|
+
|
94
|
+
# header parameters
|
95
|
+
header_params = opts[:header_params] || {}
|
96
|
+
# HTTP header 'Accept' (if needed)
|
97
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
98
|
+
|
99
|
+
# form parameters
|
100
|
+
form_params = opts[:form_params] || {}
|
101
|
+
|
102
|
+
# http body (model)
|
103
|
+
post_body = opts[:debug_body]
|
104
|
+
|
105
|
+
# return_type
|
106
|
+
return_type = opts[:debug_return_type] || 'Hash<String, AnalyticsMetricsResponse>'
|
107
|
+
|
108
|
+
# auth_names
|
109
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
110
|
+
|
111
|
+
new_options = opts.merge(
|
112
|
+
:operation => :"PinsApi.pins_analytics",
|
113
|
+
:header_params => header_params,
|
114
|
+
:query_params => query_params,
|
115
|
+
:form_params => form_params,
|
116
|
+
:body => post_body,
|
117
|
+
:auth_names => auth_names,
|
118
|
+
:return_type => return_type
|
119
|
+
)
|
120
|
+
|
121
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
122
|
+
if @api_client.config.debugging
|
123
|
+
@api_client.config.logger.debug "API called: PinsApi#pins_analytics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
124
|
+
end
|
125
|
+
return data, status_code, headers
|
126
|
+
end
|
127
|
+
|
128
|
+
# Create Pin
|
129
|
+
# Create a Pin on a board or board section owned by the \"operation user_account\". Note: If the current \"operation user_account\" (defined by the access token) has access to another user's Ad Accounts via Pinterest Business Access, you can modify your request to make use of the current operation_user_account's permissions to those Ad Accounts by including the ad_account_id in the path parameters for the request (e.g. .../?ad_account_id=12345&...). - This function is intended solely for publishing new content created by the user. If you are interested in saving content created by others to your Pinterest boards, sometimes called 'curated content', please use our <a href='/docs/add-ons/save-button'>Save button</a> instead. For more tips on creating fresh content for Pinterest, review our <a href='/docs/solutions/content-apps'>Content App Solutions Guide</a>. <strong><a href='/docs/solutions/content-apps/#creatingvideopins'>Learn more</a></strong> about video Pin creation.
|
130
|
+
# @param pin [Pin] Create a new Pin.
|
131
|
+
# @param [Hash] opts the optional parameters
|
132
|
+
# @return [Pin]
|
133
|
+
def pins_create(pin, opts = {})
|
134
|
+
data, _status_code, _headers = pins_create_with_http_info(pin, opts)
|
135
|
+
data
|
136
|
+
end
|
137
|
+
|
138
|
+
# Create Pin
|
139
|
+
# Create a Pin on a board or board section owned by the \"operation user_account\". Note: If the current \"operation user_account\" (defined by the access token) has access to another user's Ad Accounts via Pinterest Business Access, you can modify your request to make use of the current operation_user_account's permissions to those Ad Accounts by including the ad_account_id in the path parameters for the request (e.g. .../?ad_account_id=12345&...). - This function is intended solely for publishing new content created by the user. If you are interested in saving content created by others to your Pinterest boards, sometimes called 'curated content', please use our <a href='/docs/add-ons/save-button'>Save button</a> instead. For more tips on creating fresh content for Pinterest, review our <a href='/docs/solutions/content-apps'>Content App Solutions Guide</a>. <strong><a href='/docs/solutions/content-apps/#creatingvideopins'>Learn more</a></strong> about video Pin creation.
|
140
|
+
# @param pin [Pin] Create a new Pin.
|
141
|
+
# @param [Hash] opts the optional parameters
|
142
|
+
# @return [Array<(Pin, Integer, Hash)>] Pin data, response status code and response headers
|
143
|
+
def pins_create_with_http_info(pin, opts = {})
|
144
|
+
if @api_client.config.debugging
|
145
|
+
@api_client.config.logger.debug 'Calling API: PinsApi.pins_create ...'
|
146
|
+
end
|
147
|
+
# verify the required parameter 'pin' is set
|
148
|
+
if @api_client.config.client_side_validation && pin.nil?
|
149
|
+
fail ArgumentError, "Missing the required parameter 'pin' when calling PinsApi.pins_create"
|
150
|
+
end
|
151
|
+
# resource path
|
152
|
+
local_var_path = '/pins'
|
153
|
+
|
154
|
+
# query parameters
|
155
|
+
query_params = opts[:query_params] || {}
|
156
|
+
|
157
|
+
# header parameters
|
158
|
+
header_params = opts[:header_params] || {}
|
159
|
+
# HTTP header 'Accept' (if needed)
|
160
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
161
|
+
# HTTP header 'Content-Type'
|
162
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
163
|
+
if !content_type.nil?
|
164
|
+
header_params['Content-Type'] = content_type
|
165
|
+
end
|
166
|
+
|
167
|
+
# form parameters
|
168
|
+
form_params = opts[:form_params] || {}
|
169
|
+
|
170
|
+
# http body (model)
|
171
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(pin)
|
172
|
+
|
173
|
+
# return_type
|
174
|
+
return_type = opts[:debug_return_type] || 'Pin'
|
175
|
+
|
176
|
+
# auth_names
|
177
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
178
|
+
|
179
|
+
new_options = opts.merge(
|
180
|
+
:operation => :"PinsApi.pins_create",
|
181
|
+
:header_params => header_params,
|
182
|
+
:query_params => query_params,
|
183
|
+
:form_params => form_params,
|
184
|
+
:body => post_body,
|
185
|
+
:auth_names => auth_names,
|
186
|
+
:return_type => return_type
|
187
|
+
)
|
188
|
+
|
189
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
190
|
+
if @api_client.config.debugging
|
191
|
+
@api_client.config.logger.debug "API called: PinsApi#pins_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
192
|
+
end
|
193
|
+
return data, status_code, headers
|
194
|
+
end
|
195
|
+
|
196
|
+
# Delete Pin
|
197
|
+
# Delete a Pins owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account.
|
198
|
+
# @param pin_id [String] Unique identifier of a Pin.
|
199
|
+
# @param [Hash] opts the optional parameters
|
200
|
+
# @return [nil]
|
201
|
+
def pins_delete(pin_id, opts = {})
|
202
|
+
pins_delete_with_http_info(pin_id, opts)
|
203
|
+
nil
|
204
|
+
end
|
205
|
+
|
206
|
+
# Delete Pin
|
207
|
+
# Delete a Pins owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account.
|
208
|
+
# @param pin_id [String] Unique identifier of a Pin.
|
209
|
+
# @param [Hash] opts the optional parameters
|
210
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
211
|
+
def pins_delete_with_http_info(pin_id, opts = {})
|
212
|
+
if @api_client.config.debugging
|
213
|
+
@api_client.config.logger.debug 'Calling API: PinsApi.pins_delete ...'
|
214
|
+
end
|
215
|
+
# verify the required parameter 'pin_id' is set
|
216
|
+
if @api_client.config.client_side_validation && pin_id.nil?
|
217
|
+
fail ArgumentError, "Missing the required parameter 'pin_id' when calling PinsApi.pins_delete"
|
218
|
+
end
|
219
|
+
# resource path
|
220
|
+
local_var_path = '/pins/{pin_id}'.sub('{' + 'pin_id' + '}', CGI.escape(pin_id.to_s))
|
221
|
+
|
222
|
+
# query parameters
|
223
|
+
query_params = opts[:query_params] || {}
|
224
|
+
|
225
|
+
# header parameters
|
226
|
+
header_params = opts[:header_params] || {}
|
227
|
+
# HTTP header 'Accept' (if needed)
|
228
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
229
|
+
|
230
|
+
# form parameters
|
231
|
+
form_params = opts[:form_params] || {}
|
232
|
+
|
233
|
+
# http body (model)
|
234
|
+
post_body = opts[:debug_body]
|
235
|
+
|
236
|
+
# return_type
|
237
|
+
return_type = opts[:debug_return_type]
|
238
|
+
|
239
|
+
# auth_names
|
240
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
241
|
+
|
242
|
+
new_options = opts.merge(
|
243
|
+
:operation => :"PinsApi.pins_delete",
|
244
|
+
:header_params => header_params,
|
245
|
+
:query_params => query_params,
|
246
|
+
:form_params => form_params,
|
247
|
+
:body => post_body,
|
248
|
+
:auth_names => auth_names,
|
249
|
+
:return_type => return_type
|
250
|
+
)
|
251
|
+
|
252
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
253
|
+
if @api_client.config.debugging
|
254
|
+
@api_client.config.logger.debug "API called: PinsApi#pins_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
255
|
+
end
|
256
|
+
return data, status_code, headers
|
257
|
+
end
|
258
|
+
|
259
|
+
# Get Pin
|
260
|
+
# Get a Pin owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an <code>ad_account_id</code> (obtained via <a href='/docs/api/v5/#operation/ad_accounts/list'>List ad accounts</a>) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a> roles on the ad_account: - For Pins on public or protected boards: Owner, Admin, Analyst, Campaign Manager. - For Pins on secret boards: Owner, Admin.
|
261
|
+
# @param pin_id [String] Unique identifier of a Pin.
|
262
|
+
# @param [Hash] opts the optional parameters
|
263
|
+
# @option opts [String] :ad_account_id Unique identifier of an ad account.
|
264
|
+
# @return [Pin]
|
265
|
+
def pins_get(pin_id, opts = {})
|
266
|
+
data, _status_code, _headers = pins_get_with_http_info(pin_id, opts)
|
267
|
+
data
|
268
|
+
end
|
269
|
+
|
270
|
+
# Get Pin
|
271
|
+
# Get a Pin owned by the \"operation user_account\" - or on a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account. Optional: Business Access: Specify an <code>ad_account_id</code> (obtained via <a href='/docs/api/v5/#operation/ad_accounts/list'>List ad accounts</a>) to use the owner of that ad_account as the \"operation user_account\". In order to do this, the token user_account must have one of the following <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a> roles on the ad_account: - For Pins on public or protected boards: Owner, Admin, Analyst, Campaign Manager. - For Pins on secret boards: Owner, Admin.
|
272
|
+
# @param pin_id [String] Unique identifier of a Pin.
|
273
|
+
# @param [Hash] opts the optional parameters
|
274
|
+
# @option opts [String] :ad_account_id Unique identifier of an ad account.
|
275
|
+
# @return [Array<(Pin, Integer, Hash)>] Pin data, response status code and response headers
|
276
|
+
def pins_get_with_http_info(pin_id, opts = {})
|
277
|
+
if @api_client.config.debugging
|
278
|
+
@api_client.config.logger.debug 'Calling API: PinsApi.pins_get ...'
|
279
|
+
end
|
280
|
+
# verify the required parameter 'pin_id' is set
|
281
|
+
if @api_client.config.client_side_validation && pin_id.nil?
|
282
|
+
fail ArgumentError, "Missing the required parameter 'pin_id' when calling PinsApi.pins_get"
|
283
|
+
end
|
284
|
+
pattern = Regexp.new(/^\d+$/)
|
285
|
+
if @api_client.config.client_side_validation && !opts[:'ad_account_id'].nil? && opts[:'ad_account_id'] !~ pattern
|
286
|
+
fail ArgumentError, "invalid value for 'opts[:\"ad_account_id\"]' when calling PinsApi.pins_get, must conform to the pattern #{pattern}."
|
287
|
+
end
|
288
|
+
|
289
|
+
# resource path
|
290
|
+
local_var_path = '/pins/{pin_id}'.sub('{' + 'pin_id' + '}', CGI.escape(pin_id.to_s))
|
291
|
+
|
292
|
+
# query parameters
|
293
|
+
query_params = opts[:query_params] || {}
|
294
|
+
query_params[:'ad_account_id'] = opts[:'ad_account_id'] if !opts[:'ad_account_id'].nil?
|
295
|
+
|
296
|
+
# header parameters
|
297
|
+
header_params = opts[:header_params] || {}
|
298
|
+
# HTTP header 'Accept' (if needed)
|
299
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
300
|
+
|
301
|
+
# form parameters
|
302
|
+
form_params = opts[:form_params] || {}
|
303
|
+
|
304
|
+
# http body (model)
|
305
|
+
post_body = opts[:debug_body]
|
306
|
+
|
307
|
+
# return_type
|
308
|
+
return_type = opts[:debug_return_type] || 'Pin'
|
309
|
+
|
310
|
+
# auth_names
|
311
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
312
|
+
|
313
|
+
new_options = opts.merge(
|
314
|
+
:operation => :"PinsApi.pins_get",
|
315
|
+
:header_params => header_params,
|
316
|
+
:query_params => query_params,
|
317
|
+
:form_params => form_params,
|
318
|
+
:body => post_body,
|
319
|
+
:auth_names => auth_names,
|
320
|
+
:return_type => return_type
|
321
|
+
)
|
322
|
+
|
323
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug "API called: PinsApi#pins_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
326
|
+
end
|
327
|
+
return data, status_code, headers
|
328
|
+
end
|
329
|
+
end
|
330
|
+
end
|