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,888 @@
|
|
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 BoardsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create board section
|
23
|
+
# Create a board section on a board 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.
|
24
|
+
# @param board_id [String] Unique identifier of a board.
|
25
|
+
# @param board_section [BoardSection] Create a board section.
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [BoardSection]
|
28
|
+
def board_sections_create(board_id, board_section, opts = {})
|
29
|
+
data, _status_code, _headers = board_sections_create_with_http_info(board_id, board_section, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create board section
|
34
|
+
# Create a board section on a board 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.
|
35
|
+
# @param board_id [String] Unique identifier of a board.
|
36
|
+
# @param board_section [BoardSection] Create a board section.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(BoardSection, Integer, Hash)>] BoardSection data, response status code and response headers
|
39
|
+
def board_sections_create_with_http_info(board_id, board_section, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_create ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'board_id' is set
|
44
|
+
if @api_client.config.client_side_validation && board_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_create"
|
46
|
+
end
|
47
|
+
pattern = Regexp.new(/^\d+$/)
|
48
|
+
if @api_client.config.client_side_validation && board_id !~ pattern
|
49
|
+
fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_create, must conform to the pattern #{pattern}."
|
50
|
+
end
|
51
|
+
|
52
|
+
# verify the required parameter 'board_section' is set
|
53
|
+
if @api_client.config.client_side_validation && board_section.nil?
|
54
|
+
fail ArgumentError, "Missing the required parameter 'board_section' when calling BoardsApi.board_sections_create"
|
55
|
+
end
|
56
|
+
# resource path
|
57
|
+
local_var_path = '/boards/{board_id}/sections'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s))
|
58
|
+
|
59
|
+
# query parameters
|
60
|
+
query_params = opts[:query_params] || {}
|
61
|
+
|
62
|
+
# header parameters
|
63
|
+
header_params = opts[:header_params] || {}
|
64
|
+
# HTTP header 'Accept' (if needed)
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
66
|
+
# HTTP header 'Content-Type'
|
67
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
68
|
+
if !content_type.nil?
|
69
|
+
header_params['Content-Type'] = content_type
|
70
|
+
end
|
71
|
+
|
72
|
+
# form parameters
|
73
|
+
form_params = opts[:form_params] || {}
|
74
|
+
|
75
|
+
# http body (model)
|
76
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(board_section)
|
77
|
+
|
78
|
+
# return_type
|
79
|
+
return_type = opts[:debug_return_type] || 'BoardSection'
|
80
|
+
|
81
|
+
# auth_names
|
82
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
83
|
+
|
84
|
+
new_options = opts.merge(
|
85
|
+
:operation => :"BoardsApi.board_sections_create",
|
86
|
+
:header_params => header_params,
|
87
|
+
:query_params => query_params,
|
88
|
+
:form_params => form_params,
|
89
|
+
:body => post_body,
|
90
|
+
:auth_names => auth_names,
|
91
|
+
:return_type => return_type
|
92
|
+
)
|
93
|
+
|
94
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
95
|
+
if @api_client.config.debugging
|
96
|
+
@api_client.config.logger.debug "API called: BoardsApi#board_sections_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
97
|
+
end
|
98
|
+
return data, status_code, headers
|
99
|
+
end
|
100
|
+
|
101
|
+
# Delete board section
|
102
|
+
# Delete a board section on a board 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.
|
103
|
+
# @param board_id [String] Unique identifier of a board.
|
104
|
+
# @param section_id [String] Unique identifier of a board section.
|
105
|
+
# @param [Hash] opts the optional parameters
|
106
|
+
# @return [nil]
|
107
|
+
def board_sections_delete(board_id, section_id, opts = {})
|
108
|
+
board_sections_delete_with_http_info(board_id, section_id, opts)
|
109
|
+
nil
|
110
|
+
end
|
111
|
+
|
112
|
+
# Delete board section
|
113
|
+
# Delete a board section on a board 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.
|
114
|
+
# @param board_id [String] Unique identifier of a board.
|
115
|
+
# @param section_id [String] Unique identifier of a board section.
|
116
|
+
# @param [Hash] opts the optional parameters
|
117
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
118
|
+
def board_sections_delete_with_http_info(board_id, section_id, opts = {})
|
119
|
+
if @api_client.config.debugging
|
120
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_delete ...'
|
121
|
+
end
|
122
|
+
# verify the required parameter 'board_id' is set
|
123
|
+
if @api_client.config.client_side_validation && board_id.nil?
|
124
|
+
fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_delete"
|
125
|
+
end
|
126
|
+
pattern = Regexp.new(/^\d+$/)
|
127
|
+
if @api_client.config.client_side_validation && board_id !~ pattern
|
128
|
+
fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_delete, must conform to the pattern #{pattern}."
|
129
|
+
end
|
130
|
+
|
131
|
+
# verify the required parameter 'section_id' is set
|
132
|
+
if @api_client.config.client_side_validation && section_id.nil?
|
133
|
+
fail ArgumentError, "Missing the required parameter 'section_id' when calling BoardsApi.board_sections_delete"
|
134
|
+
end
|
135
|
+
pattern = Regexp.new(/^\d+$/)
|
136
|
+
if @api_client.config.client_side_validation && section_id !~ pattern
|
137
|
+
fail ArgumentError, "invalid value for 'section_id' when calling BoardsApi.board_sections_delete, must conform to the pattern #{pattern}."
|
138
|
+
end
|
139
|
+
|
140
|
+
# resource path
|
141
|
+
local_var_path = '/boards/{board_id}/sections/{section_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)).sub('{' + 'section_id' + '}', CGI.escape(section_id.to_s))
|
142
|
+
|
143
|
+
# query parameters
|
144
|
+
query_params = opts[:query_params] || {}
|
145
|
+
|
146
|
+
# header parameters
|
147
|
+
header_params = opts[:header_params] || {}
|
148
|
+
# HTTP header 'Accept' (if needed)
|
149
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
150
|
+
|
151
|
+
# form parameters
|
152
|
+
form_params = opts[:form_params] || {}
|
153
|
+
|
154
|
+
# http body (model)
|
155
|
+
post_body = opts[:debug_body]
|
156
|
+
|
157
|
+
# return_type
|
158
|
+
return_type = opts[:debug_return_type]
|
159
|
+
|
160
|
+
# auth_names
|
161
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
162
|
+
|
163
|
+
new_options = opts.merge(
|
164
|
+
:operation => :"BoardsApi.board_sections_delete",
|
165
|
+
:header_params => header_params,
|
166
|
+
:query_params => query_params,
|
167
|
+
:form_params => form_params,
|
168
|
+
:body => post_body,
|
169
|
+
:auth_names => auth_names,
|
170
|
+
:return_type => return_type
|
171
|
+
)
|
172
|
+
|
173
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
174
|
+
if @api_client.config.debugging
|
175
|
+
@api_client.config.logger.debug "API called: BoardsApi#board_sections_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
176
|
+
end
|
177
|
+
return data, status_code, headers
|
178
|
+
end
|
179
|
+
|
180
|
+
# List board sections
|
181
|
+
# Get a list of all board sections from a board owned by the \"operation user_account\" - or a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account.
|
182
|
+
# @param board_id [String] Unique identifier of a board.
|
183
|
+
# @param [Hash] opts the optional parameters
|
184
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
185
|
+
# @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)
|
186
|
+
# @return [Paginated]
|
187
|
+
def board_sections_list(board_id, opts = {})
|
188
|
+
data, _status_code, _headers = board_sections_list_with_http_info(board_id, opts)
|
189
|
+
data
|
190
|
+
end
|
191
|
+
|
192
|
+
# List board sections
|
193
|
+
# Get a list of all board sections from a board owned by the \"operation user_account\" - or a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account.
|
194
|
+
# @param board_id [String] Unique identifier of a board.
|
195
|
+
# @param [Hash] opts the optional parameters
|
196
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
197
|
+
# @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.
|
198
|
+
# @return [Array<(Paginated, Integer, Hash)>] Paginated data, response status code and response headers
|
199
|
+
def board_sections_list_with_http_info(board_id, opts = {})
|
200
|
+
if @api_client.config.debugging
|
201
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_list ...'
|
202
|
+
end
|
203
|
+
# verify the required parameter 'board_id' is set
|
204
|
+
if @api_client.config.client_side_validation && board_id.nil?
|
205
|
+
fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_list"
|
206
|
+
end
|
207
|
+
pattern = Regexp.new(/^\d+$/)
|
208
|
+
if @api_client.config.client_side_validation && board_id !~ pattern
|
209
|
+
fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_list, must conform to the pattern #{pattern}."
|
210
|
+
end
|
211
|
+
|
212
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
213
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.board_sections_list, must be smaller than or equal to 100.'
|
214
|
+
end
|
215
|
+
|
216
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
217
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.board_sections_list, must be greater than or equal to 1.'
|
218
|
+
end
|
219
|
+
|
220
|
+
# resource path
|
221
|
+
local_var_path = '/boards/{board_id}/sections'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s))
|
222
|
+
|
223
|
+
# query parameters
|
224
|
+
query_params = opts[:query_params] || {}
|
225
|
+
query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil?
|
226
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
227
|
+
|
228
|
+
# header parameters
|
229
|
+
header_params = opts[:header_params] || {}
|
230
|
+
# HTTP header 'Accept' (if needed)
|
231
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
232
|
+
|
233
|
+
# form parameters
|
234
|
+
form_params = opts[:form_params] || {}
|
235
|
+
|
236
|
+
# http body (model)
|
237
|
+
post_body = opts[:debug_body]
|
238
|
+
|
239
|
+
# return_type
|
240
|
+
return_type = opts[:debug_return_type] || 'Paginated'
|
241
|
+
|
242
|
+
# auth_names
|
243
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
244
|
+
|
245
|
+
new_options = opts.merge(
|
246
|
+
:operation => :"BoardsApi.board_sections_list",
|
247
|
+
:header_params => header_params,
|
248
|
+
:query_params => query_params,
|
249
|
+
:form_params => form_params,
|
250
|
+
:body => post_body,
|
251
|
+
:auth_names => auth_names,
|
252
|
+
:return_type => return_type
|
253
|
+
)
|
254
|
+
|
255
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
256
|
+
if @api_client.config.debugging
|
257
|
+
@api_client.config.logger.debug "API called: BoardsApi#board_sections_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
258
|
+
end
|
259
|
+
return data, status_code, headers
|
260
|
+
end
|
261
|
+
|
262
|
+
# List Pins on board section
|
263
|
+
# Get a list of the Pins on a board section of a board 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.
|
264
|
+
# @param board_id [String] Unique identifier of a board.
|
265
|
+
# @param section_id [String] Unique identifier of a board section.
|
266
|
+
# @param [Hash] opts the optional parameters
|
267
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
268
|
+
# @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)
|
269
|
+
# @return [Paginated]
|
270
|
+
def board_sections_list_pins(board_id, section_id, opts = {})
|
271
|
+
data, _status_code, _headers = board_sections_list_pins_with_http_info(board_id, section_id, opts)
|
272
|
+
data
|
273
|
+
end
|
274
|
+
|
275
|
+
# List Pins on board section
|
276
|
+
# Get a list of the Pins on a board section of a board 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.
|
277
|
+
# @param board_id [String] Unique identifier of a board.
|
278
|
+
# @param section_id [String] Unique identifier of a board section.
|
279
|
+
# @param [Hash] opts the optional parameters
|
280
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
281
|
+
# @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.
|
282
|
+
# @return [Array<(Paginated, Integer, Hash)>] Paginated data, response status code and response headers
|
283
|
+
def board_sections_list_pins_with_http_info(board_id, section_id, opts = {})
|
284
|
+
if @api_client.config.debugging
|
285
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_list_pins ...'
|
286
|
+
end
|
287
|
+
# verify the required parameter 'board_id' is set
|
288
|
+
if @api_client.config.client_side_validation && board_id.nil?
|
289
|
+
fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_list_pins"
|
290
|
+
end
|
291
|
+
pattern = Regexp.new(/^\d+$/)
|
292
|
+
if @api_client.config.client_side_validation && board_id !~ pattern
|
293
|
+
fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_list_pins, must conform to the pattern #{pattern}."
|
294
|
+
end
|
295
|
+
|
296
|
+
# verify the required parameter 'section_id' is set
|
297
|
+
if @api_client.config.client_side_validation && section_id.nil?
|
298
|
+
fail ArgumentError, "Missing the required parameter 'section_id' when calling BoardsApi.board_sections_list_pins"
|
299
|
+
end
|
300
|
+
pattern = Regexp.new(/^\d+$/)
|
301
|
+
if @api_client.config.client_side_validation && section_id !~ pattern
|
302
|
+
fail ArgumentError, "invalid value for 'section_id' when calling BoardsApi.board_sections_list_pins, must conform to the pattern #{pattern}."
|
303
|
+
end
|
304
|
+
|
305
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
306
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.board_sections_list_pins, must be smaller than or equal to 100.'
|
307
|
+
end
|
308
|
+
|
309
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
310
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.board_sections_list_pins, must be greater than or equal to 1.'
|
311
|
+
end
|
312
|
+
|
313
|
+
# resource path
|
314
|
+
local_var_path = '/boards/{board_id}/sections/{section_id}/pins'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)).sub('{' + 'section_id' + '}', CGI.escape(section_id.to_s))
|
315
|
+
|
316
|
+
# query parameters
|
317
|
+
query_params = opts[:query_params] || {}
|
318
|
+
query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil?
|
319
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
320
|
+
|
321
|
+
# header parameters
|
322
|
+
header_params = opts[:header_params] || {}
|
323
|
+
# HTTP header 'Accept' (if needed)
|
324
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
325
|
+
|
326
|
+
# form parameters
|
327
|
+
form_params = opts[:form_params] || {}
|
328
|
+
|
329
|
+
# http body (model)
|
330
|
+
post_body = opts[:debug_body]
|
331
|
+
|
332
|
+
# return_type
|
333
|
+
return_type = opts[:debug_return_type] || 'Paginated'
|
334
|
+
|
335
|
+
# auth_names
|
336
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
337
|
+
|
338
|
+
new_options = opts.merge(
|
339
|
+
:operation => :"BoardsApi.board_sections_list_pins",
|
340
|
+
:header_params => header_params,
|
341
|
+
:query_params => query_params,
|
342
|
+
:form_params => form_params,
|
343
|
+
:body => post_body,
|
344
|
+
:auth_names => auth_names,
|
345
|
+
:return_type => return_type
|
346
|
+
)
|
347
|
+
|
348
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
349
|
+
if @api_client.config.debugging
|
350
|
+
@api_client.config.logger.debug "API called: BoardsApi#board_sections_list_pins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
351
|
+
end
|
352
|
+
return data, status_code, headers
|
353
|
+
end
|
354
|
+
|
355
|
+
# Update board section
|
356
|
+
# Update a board section on a board 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.
|
357
|
+
# @param board_id [String] Unique identifier of a board.
|
358
|
+
# @param section_id [String] Unique identifier of a board section.
|
359
|
+
# @param board_section [BoardSection] Update a board section.
|
360
|
+
# @param [Hash] opts the optional parameters
|
361
|
+
# @return [BoardSection]
|
362
|
+
def board_sections_update(board_id, section_id, board_section, opts = {})
|
363
|
+
data, _status_code, _headers = board_sections_update_with_http_info(board_id, section_id, board_section, opts)
|
364
|
+
data
|
365
|
+
end
|
366
|
+
|
367
|
+
# Update board section
|
368
|
+
# Update a board section on a board 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.
|
369
|
+
# @param board_id [String] Unique identifier of a board.
|
370
|
+
# @param section_id [String] Unique identifier of a board section.
|
371
|
+
# @param board_section [BoardSection] Update a board section.
|
372
|
+
# @param [Hash] opts the optional parameters
|
373
|
+
# @return [Array<(BoardSection, Integer, Hash)>] BoardSection data, response status code and response headers
|
374
|
+
def board_sections_update_with_http_info(board_id, section_id, board_section, opts = {})
|
375
|
+
if @api_client.config.debugging
|
376
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_update ...'
|
377
|
+
end
|
378
|
+
# verify the required parameter 'board_id' is set
|
379
|
+
if @api_client.config.client_side_validation && board_id.nil?
|
380
|
+
fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_update"
|
381
|
+
end
|
382
|
+
pattern = Regexp.new(/^\d+$/)
|
383
|
+
if @api_client.config.client_side_validation && board_id !~ pattern
|
384
|
+
fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_update, must conform to the pattern #{pattern}."
|
385
|
+
end
|
386
|
+
|
387
|
+
# verify the required parameter 'section_id' is set
|
388
|
+
if @api_client.config.client_side_validation && section_id.nil?
|
389
|
+
fail ArgumentError, "Missing the required parameter 'section_id' when calling BoardsApi.board_sections_update"
|
390
|
+
end
|
391
|
+
pattern = Regexp.new(/^\d+$/)
|
392
|
+
if @api_client.config.client_side_validation && section_id !~ pattern
|
393
|
+
fail ArgumentError, "invalid value for 'section_id' when calling BoardsApi.board_sections_update, must conform to the pattern #{pattern}."
|
394
|
+
end
|
395
|
+
|
396
|
+
# verify the required parameter 'board_section' is set
|
397
|
+
if @api_client.config.client_side_validation && board_section.nil?
|
398
|
+
fail ArgumentError, "Missing the required parameter 'board_section' when calling BoardsApi.board_sections_update"
|
399
|
+
end
|
400
|
+
# resource path
|
401
|
+
local_var_path = '/boards/{board_id}/sections/{section_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)).sub('{' + 'section_id' + '}', CGI.escape(section_id.to_s))
|
402
|
+
|
403
|
+
# query parameters
|
404
|
+
query_params = opts[:query_params] || {}
|
405
|
+
|
406
|
+
# header parameters
|
407
|
+
header_params = opts[:header_params] || {}
|
408
|
+
# HTTP header 'Accept' (if needed)
|
409
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
410
|
+
# HTTP header 'Content-Type'
|
411
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
412
|
+
if !content_type.nil?
|
413
|
+
header_params['Content-Type'] = content_type
|
414
|
+
end
|
415
|
+
|
416
|
+
# form parameters
|
417
|
+
form_params = opts[:form_params] || {}
|
418
|
+
|
419
|
+
# http body (model)
|
420
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(board_section)
|
421
|
+
|
422
|
+
# return_type
|
423
|
+
return_type = opts[:debug_return_type] || 'BoardSection'
|
424
|
+
|
425
|
+
# auth_names
|
426
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
427
|
+
|
428
|
+
new_options = opts.merge(
|
429
|
+
:operation => :"BoardsApi.board_sections_update",
|
430
|
+
:header_params => header_params,
|
431
|
+
:query_params => query_params,
|
432
|
+
:form_params => form_params,
|
433
|
+
:body => post_body,
|
434
|
+
:auth_names => auth_names,
|
435
|
+
:return_type => return_type
|
436
|
+
)
|
437
|
+
|
438
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
439
|
+
if @api_client.config.debugging
|
440
|
+
@api_client.config.logger.debug "API called: BoardsApi#board_sections_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
441
|
+
end
|
442
|
+
return data, status_code, headers
|
443
|
+
end
|
444
|
+
|
445
|
+
# Create board
|
446
|
+
# Create a board owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account.
|
447
|
+
# @param board [Board] Create a board using a single board json object.
|
448
|
+
# @param [Hash] opts the optional parameters
|
449
|
+
# @return [Board]
|
450
|
+
def boards_create(board, opts = {})
|
451
|
+
data, _status_code, _headers = boards_create_with_http_info(board, opts)
|
452
|
+
data
|
453
|
+
end
|
454
|
+
|
455
|
+
# Create board
|
456
|
+
# Create a board owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account.
|
457
|
+
# @param board [Board] Create a board using a single board json object.
|
458
|
+
# @param [Hash] opts the optional parameters
|
459
|
+
# @return [Array<(Board, Integer, Hash)>] Board data, response status code and response headers
|
460
|
+
def boards_create_with_http_info(board, opts = {})
|
461
|
+
if @api_client.config.debugging
|
462
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.boards_create ...'
|
463
|
+
end
|
464
|
+
# verify the required parameter 'board' is set
|
465
|
+
if @api_client.config.client_side_validation && board.nil?
|
466
|
+
fail ArgumentError, "Missing the required parameter 'board' when calling BoardsApi.boards_create"
|
467
|
+
end
|
468
|
+
# resource path
|
469
|
+
local_var_path = '/boards'
|
470
|
+
|
471
|
+
# query parameters
|
472
|
+
query_params = opts[:query_params] || {}
|
473
|
+
|
474
|
+
# header parameters
|
475
|
+
header_params = opts[:header_params] || {}
|
476
|
+
# HTTP header 'Accept' (if needed)
|
477
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
478
|
+
# HTTP header 'Content-Type'
|
479
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
480
|
+
if !content_type.nil?
|
481
|
+
header_params['Content-Type'] = content_type
|
482
|
+
end
|
483
|
+
|
484
|
+
# form parameters
|
485
|
+
form_params = opts[:form_params] || {}
|
486
|
+
|
487
|
+
# http body (model)
|
488
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(board)
|
489
|
+
|
490
|
+
# return_type
|
491
|
+
return_type = opts[:debug_return_type] || 'Board'
|
492
|
+
|
493
|
+
# auth_names
|
494
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
495
|
+
|
496
|
+
new_options = opts.merge(
|
497
|
+
:operation => :"BoardsApi.boards_create",
|
498
|
+
:header_params => header_params,
|
499
|
+
:query_params => query_params,
|
500
|
+
:form_params => form_params,
|
501
|
+
:body => post_body,
|
502
|
+
:auth_names => auth_names,
|
503
|
+
:return_type => return_type
|
504
|
+
)
|
505
|
+
|
506
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
507
|
+
if @api_client.config.debugging
|
508
|
+
@api_client.config.logger.debug "API called: BoardsApi#boards_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
509
|
+
end
|
510
|
+
return data, status_code, headers
|
511
|
+
end
|
512
|
+
|
513
|
+
# Delete board
|
514
|
+
# Delete a board owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account.
|
515
|
+
# @param board_id [String] Unique identifier of a board.
|
516
|
+
# @param [Hash] opts the optional parameters
|
517
|
+
# @return [nil]
|
518
|
+
def boards_delete(board_id, opts = {})
|
519
|
+
boards_delete_with_http_info(board_id, opts)
|
520
|
+
nil
|
521
|
+
end
|
522
|
+
|
523
|
+
# Delete board
|
524
|
+
# Delete a board owned by the \"operation user_account\". - By default, the \"operation user_account\" is the token user_account.
|
525
|
+
# @param board_id [String] Unique identifier of a board.
|
526
|
+
# @param [Hash] opts the optional parameters
|
527
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
528
|
+
def boards_delete_with_http_info(board_id, opts = {})
|
529
|
+
if @api_client.config.debugging
|
530
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.boards_delete ...'
|
531
|
+
end
|
532
|
+
# verify the required parameter 'board_id' is set
|
533
|
+
if @api_client.config.client_side_validation && board_id.nil?
|
534
|
+
fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.boards_delete"
|
535
|
+
end
|
536
|
+
pattern = Regexp.new(/^\d+$/)
|
537
|
+
if @api_client.config.client_side_validation && board_id !~ pattern
|
538
|
+
fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.boards_delete, must conform to the pattern #{pattern}."
|
539
|
+
end
|
540
|
+
|
541
|
+
# resource path
|
542
|
+
local_var_path = '/boards/{board_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s))
|
543
|
+
|
544
|
+
# query parameters
|
545
|
+
query_params = opts[:query_params] || {}
|
546
|
+
|
547
|
+
# header parameters
|
548
|
+
header_params = opts[:header_params] || {}
|
549
|
+
# HTTP header 'Accept' (if needed)
|
550
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
551
|
+
|
552
|
+
# form parameters
|
553
|
+
form_params = opts[:form_params] || {}
|
554
|
+
|
555
|
+
# http body (model)
|
556
|
+
post_body = opts[:debug_body]
|
557
|
+
|
558
|
+
# return_type
|
559
|
+
return_type = opts[:debug_return_type]
|
560
|
+
|
561
|
+
# auth_names
|
562
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
563
|
+
|
564
|
+
new_options = opts.merge(
|
565
|
+
:operation => :"BoardsApi.boards_delete",
|
566
|
+
:header_params => header_params,
|
567
|
+
:query_params => query_params,
|
568
|
+
:form_params => form_params,
|
569
|
+
:body => post_body,
|
570
|
+
:auth_names => auth_names,
|
571
|
+
:return_type => return_type
|
572
|
+
)
|
573
|
+
|
574
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
575
|
+
if @api_client.config.debugging
|
576
|
+
@api_client.config.logger.debug "API called: BoardsApi#boards_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
577
|
+
end
|
578
|
+
return data, status_code, headers
|
579
|
+
end
|
580
|
+
|
581
|
+
# Get board
|
582
|
+
# Get a board owned by the operation user_account - or a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account.
|
583
|
+
# @param board_id [String] Unique identifier of a board.
|
584
|
+
# @param [Hash] opts the optional parameters
|
585
|
+
# @return [Board]
|
586
|
+
def boards_get(board_id, opts = {})
|
587
|
+
data, _status_code, _headers = boards_get_with_http_info(board_id, opts)
|
588
|
+
data
|
589
|
+
end
|
590
|
+
|
591
|
+
# Get board
|
592
|
+
# Get a board owned by the operation user_account - or a group board that has been shared with this account. - By default, the \"operation user_account\" is the token user_account.
|
593
|
+
# @param board_id [String] Unique identifier of a board.
|
594
|
+
# @param [Hash] opts the optional parameters
|
595
|
+
# @return [Array<(Board, Integer, Hash)>] Board data, response status code and response headers
|
596
|
+
def boards_get_with_http_info(board_id, opts = {})
|
597
|
+
if @api_client.config.debugging
|
598
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.boards_get ...'
|
599
|
+
end
|
600
|
+
# verify the required parameter 'board_id' is set
|
601
|
+
if @api_client.config.client_side_validation && board_id.nil?
|
602
|
+
fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.boards_get"
|
603
|
+
end
|
604
|
+
pattern = Regexp.new(/^\d+$/)
|
605
|
+
if @api_client.config.client_side_validation && board_id !~ pattern
|
606
|
+
fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.boards_get, must conform to the pattern #{pattern}."
|
607
|
+
end
|
608
|
+
|
609
|
+
# resource path
|
610
|
+
local_var_path = '/boards/{board_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s))
|
611
|
+
|
612
|
+
# query parameters
|
613
|
+
query_params = opts[:query_params] || {}
|
614
|
+
|
615
|
+
# header parameters
|
616
|
+
header_params = opts[:header_params] || {}
|
617
|
+
# HTTP header 'Accept' (if needed)
|
618
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
619
|
+
|
620
|
+
# form parameters
|
621
|
+
form_params = opts[:form_params] || {}
|
622
|
+
|
623
|
+
# http body (model)
|
624
|
+
post_body = opts[:debug_body]
|
625
|
+
|
626
|
+
# return_type
|
627
|
+
return_type = opts[:debug_return_type] || 'Board'
|
628
|
+
|
629
|
+
# auth_names
|
630
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
631
|
+
|
632
|
+
new_options = opts.merge(
|
633
|
+
:operation => :"BoardsApi.boards_get",
|
634
|
+
:header_params => header_params,
|
635
|
+
:query_params => query_params,
|
636
|
+
:form_params => form_params,
|
637
|
+
:body => post_body,
|
638
|
+
:auth_names => auth_names,
|
639
|
+
:return_type => return_type
|
640
|
+
)
|
641
|
+
|
642
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
643
|
+
if @api_client.config.debugging
|
644
|
+
@api_client.config.logger.debug "API called: BoardsApi#boards_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
645
|
+
end
|
646
|
+
return data, status_code, headers
|
647
|
+
end
|
648
|
+
|
649
|
+
# List boards
|
650
|
+
# Get a list of the boards owned by the \"operation user_account\" + group boards where this account is a collaborator Optional: Specify a privacy type (public, protected, or secret) to indicate which boards to return. - If no privacy is specified, all boards that can be returned (based on the scopes of the token and ad_account role if applicable) will be returned.
|
651
|
+
# @param [Hash] opts the optional parameters
|
652
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
653
|
+
# @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)
|
654
|
+
# @option opts [String] :privacy Privacy setting for a board.
|
655
|
+
# @return [Paginated]
|
656
|
+
def boards_list(opts = {})
|
657
|
+
data, _status_code, _headers = boards_list_with_http_info(opts)
|
658
|
+
data
|
659
|
+
end
|
660
|
+
|
661
|
+
# List boards
|
662
|
+
# Get a list of the boards owned by the \"operation user_account\" + group boards where this account is a collaborator Optional: Specify a privacy type (public, protected, or secret) to indicate which boards to return. - If no privacy is specified, all boards that can be returned (based on the scopes of the token and ad_account role if applicable) will be returned.
|
663
|
+
# @param [Hash] opts the optional parameters
|
664
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
665
|
+
# @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.
|
666
|
+
# @option opts [String] :privacy Privacy setting for a board.
|
667
|
+
# @return [Array<(Paginated, Integer, Hash)>] Paginated data, response status code and response headers
|
668
|
+
def boards_list_with_http_info(opts = {})
|
669
|
+
if @api_client.config.debugging
|
670
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.boards_list ...'
|
671
|
+
end
|
672
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
673
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.boards_list, must be smaller than or equal to 100.'
|
674
|
+
end
|
675
|
+
|
676
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
677
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.boards_list, must be greater than or equal to 1.'
|
678
|
+
end
|
679
|
+
|
680
|
+
allowable_values = ["PUBLIC", "PROTECTED", "SECRET"]
|
681
|
+
if @api_client.config.client_side_validation && opts[:'privacy'] && !allowable_values.include?(opts[:'privacy'])
|
682
|
+
fail ArgumentError, "invalid value for \"privacy\", must be one of #{allowable_values}"
|
683
|
+
end
|
684
|
+
# resource path
|
685
|
+
local_var_path = '/boards'
|
686
|
+
|
687
|
+
# query parameters
|
688
|
+
query_params = opts[:query_params] || {}
|
689
|
+
query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil?
|
690
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
691
|
+
query_params[:'privacy'] = opts[:'privacy'] if !opts[:'privacy'].nil?
|
692
|
+
|
693
|
+
# header parameters
|
694
|
+
header_params = opts[:header_params] || {}
|
695
|
+
# HTTP header 'Accept' (if needed)
|
696
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
697
|
+
|
698
|
+
# form parameters
|
699
|
+
form_params = opts[:form_params] || {}
|
700
|
+
|
701
|
+
# http body (model)
|
702
|
+
post_body = opts[:debug_body]
|
703
|
+
|
704
|
+
# return_type
|
705
|
+
return_type = opts[:debug_return_type] || 'Paginated'
|
706
|
+
|
707
|
+
# auth_names
|
708
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
709
|
+
|
710
|
+
new_options = opts.merge(
|
711
|
+
:operation => :"BoardsApi.boards_list",
|
712
|
+
:header_params => header_params,
|
713
|
+
:query_params => query_params,
|
714
|
+
:form_params => form_params,
|
715
|
+
:body => post_body,
|
716
|
+
:auth_names => auth_names,
|
717
|
+
:return_type => return_type
|
718
|
+
)
|
719
|
+
|
720
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
721
|
+
if @api_client.config.debugging
|
722
|
+
@api_client.config.logger.debug "API called: BoardsApi#boards_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
723
|
+
end
|
724
|
+
return data, status_code, headers
|
725
|
+
end
|
726
|
+
|
727
|
+
# List Pins on board
|
728
|
+
# Get a list of the Pins on a board 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.
|
729
|
+
# @param board_id [String] Unique identifier of a board.
|
730
|
+
# @param [Hash] opts the optional parameters
|
731
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
732
|
+
# @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)
|
733
|
+
# @return [Paginated]
|
734
|
+
def boards_list_pins(board_id, opts = {})
|
735
|
+
data, _status_code, _headers = boards_list_pins_with_http_info(board_id, opts)
|
736
|
+
data
|
737
|
+
end
|
738
|
+
|
739
|
+
# List Pins on board
|
740
|
+
# Get a list of the Pins on a board 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.
|
741
|
+
# @param board_id [String] Unique identifier of a board.
|
742
|
+
# @param [Hash] opts the optional parameters
|
743
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
744
|
+
# @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.
|
745
|
+
# @return [Array<(Paginated, Integer, Hash)>] Paginated data, response status code and response headers
|
746
|
+
def boards_list_pins_with_http_info(board_id, opts = {})
|
747
|
+
if @api_client.config.debugging
|
748
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.boards_list_pins ...'
|
749
|
+
end
|
750
|
+
# verify the required parameter 'board_id' is set
|
751
|
+
if @api_client.config.client_side_validation && board_id.nil?
|
752
|
+
fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.boards_list_pins"
|
753
|
+
end
|
754
|
+
pattern = Regexp.new(/^\d+$/)
|
755
|
+
if @api_client.config.client_side_validation && board_id !~ pattern
|
756
|
+
fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.boards_list_pins, must conform to the pattern #{pattern}."
|
757
|
+
end
|
758
|
+
|
759
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
760
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.boards_list_pins, must be smaller than or equal to 100.'
|
761
|
+
end
|
762
|
+
|
763
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
764
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.boards_list_pins, must be greater than or equal to 1.'
|
765
|
+
end
|
766
|
+
|
767
|
+
# resource path
|
768
|
+
local_var_path = '/boards/{board_id}/pins'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s))
|
769
|
+
|
770
|
+
# query parameters
|
771
|
+
query_params = opts[:query_params] || {}
|
772
|
+
query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil?
|
773
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
774
|
+
|
775
|
+
# header parameters
|
776
|
+
header_params = opts[:header_params] || {}
|
777
|
+
# HTTP header 'Accept' (if needed)
|
778
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
779
|
+
|
780
|
+
# form parameters
|
781
|
+
form_params = opts[:form_params] || {}
|
782
|
+
|
783
|
+
# http body (model)
|
784
|
+
post_body = opts[:debug_body]
|
785
|
+
|
786
|
+
# return_type
|
787
|
+
return_type = opts[:debug_return_type] || 'Paginated'
|
788
|
+
|
789
|
+
# auth_names
|
790
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
791
|
+
|
792
|
+
new_options = opts.merge(
|
793
|
+
:operation => :"BoardsApi.boards_list_pins",
|
794
|
+
:header_params => header_params,
|
795
|
+
:query_params => query_params,
|
796
|
+
:form_params => form_params,
|
797
|
+
:body => post_body,
|
798
|
+
:auth_names => auth_names,
|
799
|
+
:return_type => return_type
|
800
|
+
)
|
801
|
+
|
802
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
803
|
+
if @api_client.config.debugging
|
804
|
+
@api_client.config.logger.debug "API called: BoardsApi#boards_list_pins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
805
|
+
end
|
806
|
+
return data, status_code, headers
|
807
|
+
end
|
808
|
+
|
809
|
+
# Update board
|
810
|
+
# Update a board owned by the \"operating user_account\".
|
811
|
+
# @param board_id [String] Unique identifier of a board.
|
812
|
+
# @param board_update [BoardUpdate] Update a board.
|
813
|
+
# @param [Hash] opts the optional parameters
|
814
|
+
# @return [Board]
|
815
|
+
def boards_update(board_id, board_update, opts = {})
|
816
|
+
data, _status_code, _headers = boards_update_with_http_info(board_id, board_update, opts)
|
817
|
+
data
|
818
|
+
end
|
819
|
+
|
820
|
+
# Update board
|
821
|
+
# Update a board owned by the \"operating user_account\".
|
822
|
+
# @param board_id [String] Unique identifier of a board.
|
823
|
+
# @param board_update [BoardUpdate] Update a board.
|
824
|
+
# @param [Hash] opts the optional parameters
|
825
|
+
# @return [Array<(Board, Integer, Hash)>] Board data, response status code and response headers
|
826
|
+
def boards_update_with_http_info(board_id, board_update, opts = {})
|
827
|
+
if @api_client.config.debugging
|
828
|
+
@api_client.config.logger.debug 'Calling API: BoardsApi.boards_update ...'
|
829
|
+
end
|
830
|
+
# verify the required parameter 'board_id' is set
|
831
|
+
if @api_client.config.client_side_validation && board_id.nil?
|
832
|
+
fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.boards_update"
|
833
|
+
end
|
834
|
+
pattern = Regexp.new(/^\d+$/)
|
835
|
+
if @api_client.config.client_side_validation && board_id !~ pattern
|
836
|
+
fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.boards_update, must conform to the pattern #{pattern}."
|
837
|
+
end
|
838
|
+
|
839
|
+
# verify the required parameter 'board_update' is set
|
840
|
+
if @api_client.config.client_side_validation && board_update.nil?
|
841
|
+
fail ArgumentError, "Missing the required parameter 'board_update' when calling BoardsApi.boards_update"
|
842
|
+
end
|
843
|
+
# resource path
|
844
|
+
local_var_path = '/boards/{board_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s))
|
845
|
+
|
846
|
+
# query parameters
|
847
|
+
query_params = opts[:query_params] || {}
|
848
|
+
|
849
|
+
# header parameters
|
850
|
+
header_params = opts[:header_params] || {}
|
851
|
+
# HTTP header 'Accept' (if needed)
|
852
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
853
|
+
# HTTP header 'Content-Type'
|
854
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
855
|
+
if !content_type.nil?
|
856
|
+
header_params['Content-Type'] = content_type
|
857
|
+
end
|
858
|
+
|
859
|
+
# form parameters
|
860
|
+
form_params = opts[:form_params] || {}
|
861
|
+
|
862
|
+
# http body (model)
|
863
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(board_update)
|
864
|
+
|
865
|
+
# return_type
|
866
|
+
return_type = opts[:debug_return_type] || 'Board'
|
867
|
+
|
868
|
+
# auth_names
|
869
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
870
|
+
|
871
|
+
new_options = opts.merge(
|
872
|
+
:operation => :"BoardsApi.boards_update",
|
873
|
+
:header_params => header_params,
|
874
|
+
:query_params => query_params,
|
875
|
+
:form_params => form_params,
|
876
|
+
:body => post_body,
|
877
|
+
:auth_names => auth_names,
|
878
|
+
:return_type => return_type
|
879
|
+
)
|
880
|
+
|
881
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
882
|
+
if @api_client.config.debugging
|
883
|
+
@api_client.config.logger.debug "API called: BoardsApi#boards_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
884
|
+
end
|
885
|
+
return data, status_code, headers
|
886
|
+
end
|
887
|
+
end
|
888
|
+
end
|