google-api-client 0.8.7 → 0.9.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +63 -0
- data/.travis.yml +21 -0
- data/.yardopts +12 -0
- data/CHANGELOG.md +6 -3
- data/CONTRIBUTING.md +31 -0
- data/Gemfile +28 -2
- data/MIGRATING.md +171 -0
- data/README.md +158 -150
- data/Rakefile +1 -40
- data/api_names.yaml +872 -0
- data/api_names_out.yaml +20843 -0
- data/bin/generate-api +93 -0
- data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
- data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
- data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
- data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
- data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
- data/generated/google/apis/admin_directory_v1.rb +89 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
- data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
- data/generated/google/apis/admin_reports_v1.rb +38 -0
- data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
- data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
- data/generated/google/apis/admin_reports_v1/service.rb +341 -0
- data/generated/google/apis/adsense_v1_4.rb +38 -0
- data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
- data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
- data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
- data/generated/google/apis/adsensehost_v4_1.rb +35 -0
- data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
- data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
- data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
- data/generated/google/apis/analytics_v3.rb +49 -0
- data/generated/google/apis/analytics_v3/classes.rb +5113 -0
- data/generated/google/apis/analytics_v3/representations.rb +1661 -0
- data/generated/google/apis/analytics_v3/service.rb +3600 -0
- data/generated/google/apis/androidenterprise_v1.rb +34 -0
- data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
- data/generated/google/apis/androidpublisher_v2.rb +34 -0
- data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
- data/generated/google/apis/appsactivity_v1.rb +46 -0
- data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
- data/generated/google/apis/appsactivity_v1/service.rb +129 -0
- data/generated/google/apis/appstate_v1.rb +34 -0
- data/generated/google/apis/appstate_v1/classes.rb +154 -0
- data/generated/google/apis/appstate_v1/representations.rb +79 -0
- data/generated/google/apis/appstate_v1/service.rb +265 -0
- data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
- data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
- data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
- data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
- data/generated/google/apis/bigquery_v2.rb +49 -0
- data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
- data/generated/google/apis/bigquery_v2/representations.rb +754 -0
- data/generated/google/apis/bigquery_v2/service.rb +1003 -0
- data/generated/google/apis/blogger_v3.rb +37 -0
- data/generated/google/apis/blogger_v3/classes.rb +1354 -0
- data/generated/google/apis/blogger_v3/representations.rb +562 -0
- data/generated/google/apis/blogger_v3/service.rb +1620 -0
- data/generated/google/apis/books_v1.rb +34 -0
- data/generated/google/apis/books_v1/classes.rb +3515 -0
- data/generated/google/apis/books_v1/representations.rb +1361 -0
- data/generated/google/apis/books_v1/service.rb +2170 -0
- data/generated/google/apis/calendar_v3.rb +37 -0
- data/generated/google/apis/calendar_v3/classes.rb +1702 -0
- data/generated/google/apis/calendar_v3/representations.rb +566 -0
- data/generated/google/apis/calendar_v3/service.rb +1943 -0
- data/generated/google/apis/civicinfo_v2.rb +31 -0
- data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
- data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
- data/generated/google/apis/civicinfo_v2/service.rb +284 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
- data/generated/google/apis/compute_v1.rb +49 -0
- data/generated/google/apis/compute_v1/classes.rb +6391 -0
- data/generated/google/apis/compute_v1/representations.rb +2209 -0
- data/generated/google/apis/compute_v1/service.rb +6352 -0
- data/generated/google/apis/container_v1beta1.rb +35 -0
- data/generated/google/apis/container_v1beta1/classes.rb +466 -0
- data/generated/google/apis/container_v1beta1/representations.rb +177 -0
- data/generated/google/apis/container_v1beta1/service.rb +394 -0
- data/generated/google/apis/content_v2.rb +35 -0
- data/generated/google/apis/content_v2/classes.rb +3780 -0
- data/generated/google/apis/content_v2/representations.rb +1456 -0
- data/generated/google/apis/content_v2/service.rb +1706 -0
- data/generated/google/apis/coordinate_v1.rb +37 -0
- data/generated/google/apis/coordinate_v1/classes.rb +669 -0
- data/generated/google/apis/coordinate_v1/representations.rb +285 -0
- data/generated/google/apis/coordinate_v1/service.rb +687 -0
- data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
- data/generated/google/apis/customsearch_v1/classes.rb +771 -0
- data/generated/google/apis/customsearch_v1/representations.rb +276 -0
- data/generated/google/apis/customsearch_v1/service.rb +208 -0
- data/generated/google/apis/datastore_v1beta2.rb +40 -0
- data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
- data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
- data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
- data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
- data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
- data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
- data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
- data/generated/google/apis/dfareporting_v2_1.rb +37 -0
- data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
- data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
- data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
- data/generated/google/apis/discovery_v1.rb +32 -0
- data/generated/google/apis/discovery_v1/classes.rb +947 -0
- data/generated/google/apis/discovery_v1/representations.rb +355 -0
- data/generated/google/apis/discovery_v1/service.rb +144 -0
- data/generated/google/apis/dns_v1.rb +41 -0
- data/generated/google/apis/dns_v1/classes.rb +406 -0
- data/generated/google/apis/dns_v1/representations.rb +151 -0
- data/generated/google/apis/dns_v1/service.rb +460 -0
- data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
- data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
- data/generated/google/apis/drive_v2.rb +55 -0
- data/generated/google/apis/drive_v2/classes.rb +2519 -0
- data/generated/google/apis/drive_v2/representations.rb +781 -0
- data/generated/google/apis/drive_v2/service.rb +2685 -0
- data/generated/google/apis/fitness_v1.rb +49 -0
- data/generated/google/apis/fitness_v1/classes.rb +809 -0
- data/generated/google/apis/fitness_v1/representations.rb +295 -0
- data/generated/google/apis/fitness_v1/service.rb +684 -0
- data/generated/google/apis/fusiontables_v2.rb +37 -0
- data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
- data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
- data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
- data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
- data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
- data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
- data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
- data/generated/google/apis/games_v1.rb +40 -0
- data/generated/google/apis/games_v1/classes.rb +4578 -0
- data/generated/google/apis/games_v1/representations.rb +1570 -0
- data/generated/google/apis/games_v1/service.rb +2306 -0
- data/generated/google/apis/gan_v1beta1.rb +31 -0
- data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
- data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
- data/generated/google/apis/gan_v1beta1/service.rb +692 -0
- data/generated/google/apis/genomics_v1beta2.rb +46 -0
- data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
- data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
- data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
- data/generated/google/apis/gmail_v1.rb +49 -0
- data/generated/google/apis/gmail_v1/classes.rb +794 -0
- data/generated/google/apis/gmail_v1/representations.rb +339 -0
- data/generated/google/apis/gmail_v1/service.rb +1502 -0
- data/generated/google/apis/groupsmigration_v1.rb +34 -0
- data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
- data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
- data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
- data/generated/google/apis/groupssettings_v1.rb +34 -0
- data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
- data/generated/google/apis/groupssettings_v1/service.rb +179 -0
- data/generated/google/apis/identitytoolkit_v3.rb +31 -0
- data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
- data/generated/google/apis/licensing_v1.rb +34 -0
- data/generated/google/apis/licensing_v1/classes.rb +132 -0
- data/generated/google/apis/licensing_v1/representations.rb +68 -0
- data/generated/google/apis/licensing_v1/service.rb +376 -0
- data/generated/google/apis/logging_v1beta3.rb +35 -0
- data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
- data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
- data/generated/google/apis/logging_v1beta3/service.rb +670 -0
- data/generated/google/apis/manager_v1beta2.rb +50 -0
- data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
- data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
- data/generated/google/apis/manager_v1beta2/service.rb +380 -0
- data/generated/google/apis/mapsengine_v1.rb +38 -0
- data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
- data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
- data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
- data/generated/google/apis/mirror_v1.rb +37 -0
- data/generated/google/apis/mirror_v1/classes.rb +1072 -0
- data/generated/google/apis/mirror_v1/representations.rb +350 -0
- data/generated/google/apis/mirror_v1/service.rb +1001 -0
- data/generated/google/apis/oauth2_v2.rb +43 -0
- data/generated/google/apis/oauth2_v2/classes.rb +245 -0
- data/generated/google/apis/oauth2_v2/representations.rb +94 -0
- data/generated/google/apis/oauth2_v2/service.rb +203 -0
- data/generated/google/apis/pagespeedonline_v2.rb +32 -0
- data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
- data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
- data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
- data/generated/google/apis/plus_domains_v1.rb +61 -0
- data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
- data/generated/google/apis/plus_domains_v1/service.rb +924 -0
- data/generated/google/apis/plus_v1.rb +43 -0
- data/generated/google/apis/plus_v1/classes.rb +2384 -0
- data/generated/google/apis/plus_v1/representations.rb +812 -0
- data/generated/google/apis/plus_v1/service.rb +616 -0
- data/generated/google/apis/prediction_v1_6.rb +44 -0
- data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
- data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
- data/generated/google/apis/prediction_v1_6/service.rb +388 -0
- data/generated/google/apis/pubsub_v1beta2.rb +37 -0
- data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
- data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
- data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
- data/generated/google/apis/qpx_express_v1.rb +31 -0
- data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
- data/generated/google/apis/qpx_express_v1/service.rb +101 -0
- data/generated/google/apis/replicapool_v1beta2.rb +41 -0
- data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
- data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
- data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
- data/generated/google/apis/reseller_v1.rb +37 -0
- data/generated/google/apis/reseller_v1/classes.rb +502 -0
- data/generated/google/apis/reseller_v1/representations.rb +199 -0
- data/generated/google/apis/reseller_v1/service.rb +637 -0
- data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
- data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
- data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
- data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
- data/generated/google/apis/site_verification_v1.rb +37 -0
- data/generated/google/apis/site_verification_v1/classes.rb +185 -0
- data/generated/google/apis/site_verification_v1/representations.rb +101 -0
- data/generated/google/apis/site_verification_v1/service.rb +322 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
- data/generated/google/apis/storage_v1.rb +43 -0
- data/generated/google/apis/storage_v1/classes.rb +1177 -0
- data/generated/google/apis/storage_v1/representations.rb +427 -0
- data/generated/google/apis/storage_v1/service.rb +1920 -0
- data/generated/google/apis/tagmanager_v1.rb +52 -0
- data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
- data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
- data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
- data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
- data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
- data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
- data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
- data/generated/google/apis/tasks_v1.rb +37 -0
- data/generated/google/apis/tasks_v1/classes.rb +296 -0
- data/generated/google/apis/tasks_v1/representations.rb +115 -0
- data/generated/google/apis/tasks_v1/service.rb +657 -0
- data/generated/google/apis/translate_v2.rb +31 -0
- data/generated/google/apis/translate_v2/classes.rb +168 -0
- data/generated/google/apis/translate_v2/representations.rb +109 -0
- data/generated/google/apis/translate_v2/service.rb +185 -0
- data/generated/google/apis/urlshortener_v1.rb +34 -0
- data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
- data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
- data/generated/google/apis/urlshortener_v1/service.rb +179 -0
- data/generated/google/apis/webmasters_v3.rb +37 -0
- data/generated/google/apis/webmasters_v3/classes.rb +563 -0
- data/generated/google/apis/webmasters_v3/representations.rb +250 -0
- data/generated/google/apis/webmasters_v3/service.rb +587 -0
- data/generated/google/apis/youtube_analytics_v1.rb +46 -0
- data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
- data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
- data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
- data/generated/google/apis/youtube_v3.rb +49 -0
- data/generated/google/apis/youtube_v3/classes.rb +7225 -0
- data/generated/google/apis/youtube_v3/representations.rb +2529 -0
- data/generated/google/apis/youtube_v3/service.rb +4051 -0
- data/google-api-client.gemspec +27 -39
- data/lib/google/api_client/auth/storage.rb +3 -2
- data/lib/google/api_client/auth/storages/file_store.rb +1 -3
- data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
- data/lib/google/apis.rb +48 -0
- data/lib/google/apis/core/api_command.rb +128 -0
- data/lib/google/apis/core/base_service.rb +314 -0
- data/lib/google/apis/core/batch.rb +222 -0
- data/lib/google/apis/core/download.rb +94 -0
- data/lib/google/apis/core/hashable.rb +44 -0
- data/lib/google/apis/core/http_command.rb +275 -0
- data/lib/google/apis/core/json_representation.rb +122 -0
- data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
- data/lib/google/apis/core/multipart.rb +173 -0
- data/lib/google/apis/core/upload.rb +275 -0
- data/lib/google/{api_client → apis}/errors.rb +32 -28
- data/lib/google/apis/generator.rb +70 -0
- data/lib/google/apis/generator/annotator.rb +271 -0
- data/lib/google/apis/generator/helpers.rb +74 -0
- data/lib/google/apis/generator/model.rb +130 -0
- data/lib/google/apis/generator/template.rb +124 -0
- data/lib/google/apis/generator/templates/_class.tmpl +40 -0
- data/lib/google/apis/generator/templates/_method.tmpl +90 -0
- data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
- data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
- data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
- data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
- data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
- data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
- data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
- data/lib/google/apis/options.rb +79 -0
- data/lib/google/apis/version.rb +39 -0
- data/rakelib/metrics.rake +22 -0
- data/rakelib/rubocop.rake +10 -0
- data/rakelib/spec.rake +11 -0
- data/rakelib/yard.rake +11 -0
- data/samples/calendar/calendar.rb +43 -0
- data/samples/drive/drive.rb +40 -0
- data/samples/pubsub/pubsub.rb +52 -0
- data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
- data/script/generate +79 -0
- data/script/package +8 -0
- data/script/release +15 -0
- data/spec/fixtures/files/api_names.yaml +3 -0
- data/spec/fixtures/files/auth_stored_credentials.json +8 -0
- data/spec/fixtures/files/client_secrets.json +1 -0
- data/spec/fixtures/files/test.blah +1 -0
- data/spec/fixtures/files/test.txt +1 -0
- data/spec/fixtures/files/test_api.json +440 -0
- data/spec/google/api_client/auth/storage_spec.rb +1 -3
- data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
- data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
- data/spec/google/apis/core/api_command_spec.rb +170 -0
- data/spec/google/apis/core/batch_spec.rb +128 -0
- data/spec/google/apis/core/download_spec.rb +90 -0
- data/spec/google/apis/core/hashable_spec.rb +60 -0
- data/spec/google/apis/core/http_command_spec.rb +238 -0
- data/spec/google/apis/core/json_representation_spec.rb +192 -0
- data/spec/google/apis/core/service_spec.rb +247 -0
- data/spec/google/apis/core/upload_spec.rb +238 -0
- data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
- data/spec/google/apis/generator/generator_spec.rb +272 -0
- data/spec/google/apis/logging_spec.rb +45 -0
- data/spec/google/apis/options_spec.rb +40 -0
- data/spec/integration_tests/drive_spec.rb +35 -0
- data/spec/integration_tests/pubsub_spec.rb +48 -0
- data/spec/integration_tests/url_shortener_spec.rb +31 -0
- data/spec/spec_helper.rb +102 -46
- metadata +433 -178
- data/lib/compat/multi_json.rb +0 -19
- data/lib/google/api_client.rb +0 -750
- data/lib/google/api_client/auth/file_storage.rb +0 -59
- data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
- data/lib/google/api_client/auth/key_utils.rb +0 -93
- data/lib/google/api_client/auth/pkcs12.rb +0 -41
- data/lib/google/api_client/batch.rb +0 -326
- data/lib/google/api_client/charset.rb +0 -33
- data/lib/google/api_client/discovery/api.rb +0 -310
- data/lib/google/api_client/discovery/media.rb +0 -77
- data/lib/google/api_client/discovery/method.rb +0 -363
- data/lib/google/api_client/discovery/resource.rb +0 -156
- data/lib/google/api_client/discovery/schema.rb +0 -117
- data/lib/google/api_client/environment.rb +0 -42
- data/lib/google/api_client/gzip.rb +0 -28
- data/lib/google/api_client/logging.rb +0 -32
- data/lib/google/api_client/media.rb +0 -259
- data/lib/google/api_client/railtie.rb +0 -18
- data/lib/google/api_client/request.rb +0 -350
- data/lib/google/api_client/result.rb +0 -255
- data/lib/google/api_client/service.rb +0 -233
- data/lib/google/api_client/service/batch.rb +0 -110
- data/lib/google/api_client/service/request.rb +0 -144
- data/lib/google/api_client/service/resource.rb +0 -40
- data/lib/google/api_client/service/result.rb +0 -162
- data/lib/google/api_client/service/simple_file_store.rb +0 -151
- data/lib/google/api_client/service/stub_generator.rb +0 -61
- data/spec/google/api_client/batch_spec.rb +0 -248
- data/spec/google/api_client/discovery_spec.rb +0 -708
- data/spec/google/api_client/gzip_spec.rb +0 -98
- data/spec/google/api_client/media_spec.rb +0 -178
- data/spec/google/api_client/result_spec.rb +0 -207
- data/spec/google/api_client/service_account_spec.rb +0 -169
- data/spec/google/api_client/service_spec.rb +0 -618
- data/spec/google/api_client/simple_file_store_spec.rb +0 -133
- data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,1752 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module AdsenseV1_4
|
23
|
+
# AdSense Management API
|
24
|
+
#
|
25
|
+
# Gives AdSense publishers access to their inventory and the ability to generate
|
26
|
+
# reports
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/adsense_v1_4'
|
30
|
+
#
|
31
|
+
# Adsense = Google::Apis::AdsenseV1_4 # Alias the module
|
32
|
+
# service = Adsense::AdSenseService.new
|
33
|
+
#
|
34
|
+
# @see https://developers.google.com/adsense/management/
|
35
|
+
class AdSenseService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
# Overrides userIp if both are provided.
|
45
|
+
attr_accessor :quota_user
|
46
|
+
|
47
|
+
# @return [String]
|
48
|
+
# IP address of the site where the request originates. Use this if you want to
|
49
|
+
# enforce per-user limits.
|
50
|
+
attr_accessor :user_ip
|
51
|
+
|
52
|
+
def initialize
|
53
|
+
super('https://www.googleapis.com/', 'adsense/v1.4/')
|
54
|
+
end
|
55
|
+
|
56
|
+
# Get information about the selected AdSense account.
|
57
|
+
# @param [String] account_id
|
58
|
+
# Account to get information about.
|
59
|
+
# @param [Boolean] tree
|
60
|
+
# Whether the tree of sub accounts should be returned.
|
61
|
+
# @param [String] fields
|
62
|
+
# Selector specifying which fields to include in a partial response.
|
63
|
+
# @param [String] quota_user
|
64
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
65
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
66
|
+
# Overrides userIp if both are provided.
|
67
|
+
# @param [String] user_ip
|
68
|
+
# IP address of the site where the request originates. Use this if you want to
|
69
|
+
# enforce per-user limits.
|
70
|
+
# @param [Google::Apis::RequestOptions] options
|
71
|
+
# Request-specific options
|
72
|
+
#
|
73
|
+
# @yield [result, err] Result & error if block supplied
|
74
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Account] parsed result object
|
75
|
+
# @yieldparam err [StandardError] error object if request failed
|
76
|
+
#
|
77
|
+
# @return [Google::Apis::AdsenseV1_4::Account]
|
78
|
+
#
|
79
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
80
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
81
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
82
|
+
def get_account(account_id, tree: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
83
|
+
path = 'accounts/{accountId}'
|
84
|
+
command = make_simple_command(:get, path, options)
|
85
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Account::Representation
|
86
|
+
command.response_class = Google::Apis::AdsenseV1_4::Account
|
87
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
88
|
+
command.query['tree'] = tree unless tree.nil?
|
89
|
+
command.query['fields'] = fields unless fields.nil?
|
90
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
91
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
92
|
+
execute_or_queue_command(command, &block)
|
93
|
+
end
|
94
|
+
|
95
|
+
# List all accounts available to this AdSense account.
|
96
|
+
# @param [Fixnum] max_results
|
97
|
+
# The maximum number of accounts to include in the response, used for paging.
|
98
|
+
# @param [String] page_token
|
99
|
+
# A continuation token, used to page through accounts. To retrieve the next page,
|
100
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
101
|
+
# @param [String] fields
|
102
|
+
# Selector specifying which fields to include in a partial response.
|
103
|
+
# @param [String] quota_user
|
104
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
105
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
106
|
+
# Overrides userIp if both are provided.
|
107
|
+
# @param [String] user_ip
|
108
|
+
# IP address of the site where the request originates. Use this if you want to
|
109
|
+
# enforce per-user limits.
|
110
|
+
# @param [Google::Apis::RequestOptions] options
|
111
|
+
# Request-specific options
|
112
|
+
#
|
113
|
+
# @yield [result, err] Result & error if block supplied
|
114
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Accounts] parsed result object
|
115
|
+
# @yieldparam err [StandardError] error object if request failed
|
116
|
+
#
|
117
|
+
# @return [Google::Apis::AdsenseV1_4::Accounts]
|
118
|
+
#
|
119
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
120
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
121
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
122
|
+
def list_accounts(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
123
|
+
path = 'accounts'
|
124
|
+
command = make_simple_command(:get, path, options)
|
125
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Accounts::Representation
|
126
|
+
command.response_class = Google::Apis::AdsenseV1_4::Accounts
|
127
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
128
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
129
|
+
command.query['fields'] = fields unless fields.nil?
|
130
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
131
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
132
|
+
execute_or_queue_command(command, &block)
|
133
|
+
end
|
134
|
+
|
135
|
+
# List all ad clients in the specified account.
|
136
|
+
# @param [String] account_id
|
137
|
+
# Account for which to list ad clients.
|
138
|
+
# @param [Fixnum] max_results
|
139
|
+
# The maximum number of ad clients to include in the response, used for paging.
|
140
|
+
# @param [String] page_token
|
141
|
+
# A continuation token, used to page through ad clients. To retrieve the next
|
142
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
143
|
+
# response.
|
144
|
+
# @param [String] fields
|
145
|
+
# Selector specifying which fields to include in a partial response.
|
146
|
+
# @param [String] quota_user
|
147
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
148
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
149
|
+
# Overrides userIp if both are provided.
|
150
|
+
# @param [String] user_ip
|
151
|
+
# IP address of the site where the request originates. Use this if you want to
|
152
|
+
# enforce per-user limits.
|
153
|
+
# @param [Google::Apis::RequestOptions] options
|
154
|
+
# Request-specific options
|
155
|
+
#
|
156
|
+
# @yield [result, err] Result & error if block supplied
|
157
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdClients] parsed result object
|
158
|
+
# @yieldparam err [StandardError] error object if request failed
|
159
|
+
#
|
160
|
+
# @return [Google::Apis::AdsenseV1_4::AdClients]
|
161
|
+
#
|
162
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
163
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
164
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
165
|
+
def list_account_ad_clients(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
166
|
+
path = 'accounts/{accountId}/adclients'
|
167
|
+
command = make_simple_command(:get, path, options)
|
168
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdClients::Representation
|
169
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdClients
|
170
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
171
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
172
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
173
|
+
command.query['fields'] = fields unless fields.nil?
|
174
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
175
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
176
|
+
execute_or_queue_command(command, &block)
|
177
|
+
end
|
178
|
+
|
179
|
+
# Gets the specified ad unit in the specified ad client for the specified
|
180
|
+
# account.
|
181
|
+
# @param [String] account_id
|
182
|
+
# Account to which the ad client belongs.
|
183
|
+
# @param [String] ad_client_id
|
184
|
+
# Ad client for which to get the ad unit.
|
185
|
+
# @param [String] ad_unit_id
|
186
|
+
# Ad unit to retrieve.
|
187
|
+
# @param [String] fields
|
188
|
+
# Selector specifying which fields to include in a partial response.
|
189
|
+
# @param [String] quota_user
|
190
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
191
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
192
|
+
# Overrides userIp if both are provided.
|
193
|
+
# @param [String] user_ip
|
194
|
+
# IP address of the site where the request originates. Use this if you want to
|
195
|
+
# enforce per-user limits.
|
196
|
+
# @param [Google::Apis::RequestOptions] options
|
197
|
+
# Request-specific options
|
198
|
+
#
|
199
|
+
# @yield [result, err] Result & error if block supplied
|
200
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnit] parsed result object
|
201
|
+
# @yieldparam err [StandardError] error object if request failed
|
202
|
+
#
|
203
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnit]
|
204
|
+
#
|
205
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
206
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
207
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
208
|
+
def get_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
209
|
+
path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}'
|
210
|
+
command = make_simple_command(:get, path, options)
|
211
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnit::Representation
|
212
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnit
|
213
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
214
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
215
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
216
|
+
command.query['fields'] = fields unless fields.nil?
|
217
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
218
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
219
|
+
execute_or_queue_command(command, &block)
|
220
|
+
end
|
221
|
+
|
222
|
+
# Get ad code for the specified ad unit.
|
223
|
+
# @param [String] account_id
|
224
|
+
# Account which contains the ad client.
|
225
|
+
# @param [String] ad_client_id
|
226
|
+
# Ad client with contains the ad unit.
|
227
|
+
# @param [String] ad_unit_id
|
228
|
+
# Ad unit to get the code for.
|
229
|
+
# @param [String] fields
|
230
|
+
# Selector specifying which fields to include in a partial response.
|
231
|
+
# @param [String] quota_user
|
232
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
233
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
234
|
+
# Overrides userIp if both are provided.
|
235
|
+
# @param [String] user_ip
|
236
|
+
# IP address of the site where the request originates. Use this if you want to
|
237
|
+
# enforce per-user limits.
|
238
|
+
# @param [Google::Apis::RequestOptions] options
|
239
|
+
# Request-specific options
|
240
|
+
#
|
241
|
+
# @yield [result, err] Result & error if block supplied
|
242
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdCode] parsed result object
|
243
|
+
# @yieldparam err [StandardError] error object if request failed
|
244
|
+
#
|
245
|
+
# @return [Google::Apis::AdsenseV1_4::AdCode]
|
246
|
+
#
|
247
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
248
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
249
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
250
|
+
def get_account_ad_unit_ad_code(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
251
|
+
path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode'
|
252
|
+
command = make_simple_command(:get, path, options)
|
253
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdCode::Representation
|
254
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdCode
|
255
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
256
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
257
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
258
|
+
command.query['fields'] = fields unless fields.nil?
|
259
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
260
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
261
|
+
execute_or_queue_command(command, &block)
|
262
|
+
end
|
263
|
+
|
264
|
+
# List all ad units in the specified ad client for the specified account.
|
265
|
+
# @param [String] account_id
|
266
|
+
# Account to which the ad client belongs.
|
267
|
+
# @param [String] ad_client_id
|
268
|
+
# Ad client for which to list ad units.
|
269
|
+
# @param [Boolean] include_inactive
|
270
|
+
# Whether to include inactive ad units. Default: true.
|
271
|
+
# @param [Fixnum] max_results
|
272
|
+
# The maximum number of ad units to include in the response, used for paging.
|
273
|
+
# @param [String] page_token
|
274
|
+
# A continuation token, used to page through ad units. To retrieve the next page,
|
275
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
276
|
+
# @param [String] fields
|
277
|
+
# Selector specifying which fields to include in a partial response.
|
278
|
+
# @param [String] quota_user
|
279
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
280
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
281
|
+
# Overrides userIp if both are provided.
|
282
|
+
# @param [String] user_ip
|
283
|
+
# IP address of the site where the request originates. Use this if you want to
|
284
|
+
# enforce per-user limits.
|
285
|
+
# @param [Google::Apis::RequestOptions] options
|
286
|
+
# Request-specific options
|
287
|
+
#
|
288
|
+
# @yield [result, err] Result & error if block supplied
|
289
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
|
290
|
+
# @yieldparam err [StandardError] error object if request failed
|
291
|
+
#
|
292
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnits]
|
293
|
+
#
|
294
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
295
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
296
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
297
|
+
def list_account_ad_units(account_id, ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
298
|
+
path = 'accounts/{accountId}/adclients/{adClientId}/adunits'
|
299
|
+
command = make_simple_command(:get, path, options)
|
300
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
|
301
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnits
|
302
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
303
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
304
|
+
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
305
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
306
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
307
|
+
command.query['fields'] = fields unless fields.nil?
|
308
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
309
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
310
|
+
execute_or_queue_command(command, &block)
|
311
|
+
end
|
312
|
+
|
313
|
+
# List all custom channels which the specified ad unit belongs to.
|
314
|
+
# @param [String] account_id
|
315
|
+
# Account to which the ad client belongs.
|
316
|
+
# @param [String] ad_client_id
|
317
|
+
# Ad client which contains the ad unit.
|
318
|
+
# @param [String] ad_unit_id
|
319
|
+
# Ad unit for which to list custom channels.
|
320
|
+
# @param [Fixnum] max_results
|
321
|
+
# The maximum number of custom channels to include in the response, used for
|
322
|
+
# paging.
|
323
|
+
# @param [String] page_token
|
324
|
+
# A continuation token, used to page through custom channels. To retrieve the
|
325
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
326
|
+
# previous response.
|
327
|
+
# @param [String] fields
|
328
|
+
# Selector specifying which fields to include in a partial response.
|
329
|
+
# @param [String] quota_user
|
330
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
331
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
332
|
+
# Overrides userIp if both are provided.
|
333
|
+
# @param [String] user_ip
|
334
|
+
# IP address of the site where the request originates. Use this if you want to
|
335
|
+
# enforce per-user limits.
|
336
|
+
# @param [Google::Apis::RequestOptions] options
|
337
|
+
# Request-specific options
|
338
|
+
#
|
339
|
+
# @yield [result, err] Result & error if block supplied
|
340
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
|
341
|
+
# @yieldparam err [StandardError] error object if request failed
|
342
|
+
#
|
343
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannels]
|
344
|
+
#
|
345
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
346
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
347
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
348
|
+
def list_account_ad_unit_custom_channels(account_id, ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
349
|
+
path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/customchannels'
|
350
|
+
command = make_simple_command(:get, path, options)
|
351
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
|
352
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
|
353
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
354
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
355
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
356
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
357
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
358
|
+
command.query['fields'] = fields unless fields.nil?
|
359
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
360
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
361
|
+
execute_or_queue_command(command, &block)
|
362
|
+
end
|
363
|
+
|
364
|
+
# Dismiss (delete) the specified alert from the specified publisher AdSense
|
365
|
+
# account.
|
366
|
+
# @param [String] account_id
|
367
|
+
# Account which contains the ad unit.
|
368
|
+
# @param [String] alert_id
|
369
|
+
# Alert to delete.
|
370
|
+
# @param [String] fields
|
371
|
+
# Selector specifying which fields to include in a partial response.
|
372
|
+
# @param [String] quota_user
|
373
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
374
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
375
|
+
# Overrides userIp if both are provided.
|
376
|
+
# @param [String] user_ip
|
377
|
+
# IP address of the site where the request originates. Use this if you want to
|
378
|
+
# enforce per-user limits.
|
379
|
+
# @param [Google::Apis::RequestOptions] options
|
380
|
+
# Request-specific options
|
381
|
+
#
|
382
|
+
# @yield [result, err] Result & error if block supplied
|
383
|
+
# @yieldparam result [NilClass] No result returned for this method
|
384
|
+
# @yieldparam err [StandardError] error object if request failed
|
385
|
+
#
|
386
|
+
# @return [void]
|
387
|
+
#
|
388
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
389
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
390
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
391
|
+
def delete_account_alert(account_id, alert_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
392
|
+
path = 'accounts/{accountId}/alerts/{alertId}'
|
393
|
+
command = make_simple_command(:delete, path, options)
|
394
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
395
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
396
|
+
command.query['fields'] = fields unless fields.nil?
|
397
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
398
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
399
|
+
execute_or_queue_command(command, &block)
|
400
|
+
end
|
401
|
+
|
402
|
+
# List the alerts for the specified AdSense account.
|
403
|
+
# @param [String] account_id
|
404
|
+
# Account for which to retrieve the alerts.
|
405
|
+
# @param [String] locale
|
406
|
+
# The locale to use for translating alert messages. The account locale will be
|
407
|
+
# used if this is not supplied. The AdSense default (English) will be used if
|
408
|
+
# the supplied locale is invalid or unsupported.
|
409
|
+
# @param [String] fields
|
410
|
+
# Selector specifying which fields to include in a partial response.
|
411
|
+
# @param [String] quota_user
|
412
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
413
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
414
|
+
# Overrides userIp if both are provided.
|
415
|
+
# @param [String] user_ip
|
416
|
+
# IP address of the site where the request originates. Use this if you want to
|
417
|
+
# enforce per-user limits.
|
418
|
+
# @param [Google::Apis::RequestOptions] options
|
419
|
+
# Request-specific options
|
420
|
+
#
|
421
|
+
# @yield [result, err] Result & error if block supplied
|
422
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Alerts] parsed result object
|
423
|
+
# @yieldparam err [StandardError] error object if request failed
|
424
|
+
#
|
425
|
+
# @return [Google::Apis::AdsenseV1_4::Alerts]
|
426
|
+
#
|
427
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
428
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
429
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
430
|
+
def list_account_alerts(account_id, locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
431
|
+
path = 'accounts/{accountId}/alerts'
|
432
|
+
command = make_simple_command(:get, path, options)
|
433
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Alerts::Representation
|
434
|
+
command.response_class = Google::Apis::AdsenseV1_4::Alerts
|
435
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
436
|
+
command.query['locale'] = locale unless locale.nil?
|
437
|
+
command.query['fields'] = fields unless fields.nil?
|
438
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
439
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
440
|
+
execute_or_queue_command(command, &block)
|
441
|
+
end
|
442
|
+
|
443
|
+
# Get the specified custom channel from the specified ad client for the
|
444
|
+
# specified account.
|
445
|
+
# @param [String] account_id
|
446
|
+
# Account to which the ad client belongs.
|
447
|
+
# @param [String] ad_client_id
|
448
|
+
# Ad client which contains the custom channel.
|
449
|
+
# @param [String] custom_channel_id
|
450
|
+
# Custom channel to retrieve.
|
451
|
+
# @param [String] fields
|
452
|
+
# Selector specifying which fields to include in a partial response.
|
453
|
+
# @param [String] quota_user
|
454
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
455
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
456
|
+
# Overrides userIp if both are provided.
|
457
|
+
# @param [String] user_ip
|
458
|
+
# IP address of the site where the request originates. Use this if you want to
|
459
|
+
# enforce per-user limits.
|
460
|
+
# @param [Google::Apis::RequestOptions] options
|
461
|
+
# Request-specific options
|
462
|
+
#
|
463
|
+
# @yield [result, err] Result & error if block supplied
|
464
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannel] parsed result object
|
465
|
+
# @yieldparam err [StandardError] error object if request failed
|
466
|
+
#
|
467
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannel]
|
468
|
+
#
|
469
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
470
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
471
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
472
|
+
def get_account_custom_channel(account_id, ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
473
|
+
path = 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}'
|
474
|
+
command = make_simple_command(:get, path, options)
|
475
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannel::Representation
|
476
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannel
|
477
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
478
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
479
|
+
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
480
|
+
command.query['fields'] = fields unless fields.nil?
|
481
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
482
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
483
|
+
execute_or_queue_command(command, &block)
|
484
|
+
end
|
485
|
+
|
486
|
+
# List all custom channels in the specified ad client for the specified account.
|
487
|
+
# @param [String] account_id
|
488
|
+
# Account to which the ad client belongs.
|
489
|
+
# @param [String] ad_client_id
|
490
|
+
# Ad client for which to list custom channels.
|
491
|
+
# @param [Fixnum] max_results
|
492
|
+
# The maximum number of custom channels to include in the response, used for
|
493
|
+
# paging.
|
494
|
+
# @param [String] page_token
|
495
|
+
# A continuation token, used to page through custom channels. To retrieve the
|
496
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
497
|
+
# previous response.
|
498
|
+
# @param [String] fields
|
499
|
+
# Selector specifying which fields to include in a partial response.
|
500
|
+
# @param [String] quota_user
|
501
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
502
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
503
|
+
# Overrides userIp if both are provided.
|
504
|
+
# @param [String] user_ip
|
505
|
+
# IP address of the site where the request originates. Use this if you want to
|
506
|
+
# enforce per-user limits.
|
507
|
+
# @param [Google::Apis::RequestOptions] options
|
508
|
+
# Request-specific options
|
509
|
+
#
|
510
|
+
# @yield [result, err] Result & error if block supplied
|
511
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
|
512
|
+
# @yieldparam err [StandardError] error object if request failed
|
513
|
+
#
|
514
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannels]
|
515
|
+
#
|
516
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
517
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
518
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
519
|
+
def list_account_custom_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
520
|
+
path = 'accounts/{accountId}/adclients/{adClientId}/customchannels'
|
521
|
+
command = make_simple_command(:get, path, options)
|
522
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
|
523
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
|
524
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
525
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
526
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
527
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
528
|
+
command.query['fields'] = fields unless fields.nil?
|
529
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
530
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
531
|
+
execute_or_queue_command(command, &block)
|
532
|
+
end
|
533
|
+
|
534
|
+
# List all ad units in the specified custom channel.
|
535
|
+
# @param [String] account_id
|
536
|
+
# Account to which the ad client belongs.
|
537
|
+
# @param [String] ad_client_id
|
538
|
+
# Ad client which contains the custom channel.
|
539
|
+
# @param [String] custom_channel_id
|
540
|
+
# Custom channel for which to list ad units.
|
541
|
+
# @param [Boolean] include_inactive
|
542
|
+
# Whether to include inactive ad units. Default: true.
|
543
|
+
# @param [Fixnum] max_results
|
544
|
+
# The maximum number of ad units to include in the response, used for paging.
|
545
|
+
# @param [String] page_token
|
546
|
+
# A continuation token, used to page through ad units. To retrieve the next page,
|
547
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
548
|
+
# @param [String] fields
|
549
|
+
# Selector specifying which fields to include in a partial response.
|
550
|
+
# @param [String] quota_user
|
551
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
552
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
553
|
+
# Overrides userIp if both are provided.
|
554
|
+
# @param [String] user_ip
|
555
|
+
# IP address of the site where the request originates. Use this if you want to
|
556
|
+
# enforce per-user limits.
|
557
|
+
# @param [Google::Apis::RequestOptions] options
|
558
|
+
# Request-specific options
|
559
|
+
#
|
560
|
+
# @yield [result, err] Result & error if block supplied
|
561
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
|
562
|
+
# @yieldparam err [StandardError] error object if request failed
|
563
|
+
#
|
564
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnits]
|
565
|
+
#
|
566
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
567
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
568
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
569
|
+
def list_account_custom_channel_ad_units(account_id, ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
570
|
+
path = 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}/adunits'
|
571
|
+
command = make_simple_command(:get, path, options)
|
572
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
|
573
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnits
|
574
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
575
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
576
|
+
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
577
|
+
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
578
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
579
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
580
|
+
command.query['fields'] = fields unless fields.nil?
|
581
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
582
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
583
|
+
execute_or_queue_command(command, &block)
|
584
|
+
end
|
585
|
+
|
586
|
+
# List the payments for the specified AdSense account.
|
587
|
+
# @param [String] account_id
|
588
|
+
# Account for which to retrieve the payments.
|
589
|
+
# @param [String] fields
|
590
|
+
# Selector specifying which fields to include in a partial response.
|
591
|
+
# @param [String] quota_user
|
592
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
593
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
594
|
+
# Overrides userIp if both are provided.
|
595
|
+
# @param [String] user_ip
|
596
|
+
# IP address of the site where the request originates. Use this if you want to
|
597
|
+
# enforce per-user limits.
|
598
|
+
# @param [Google::Apis::RequestOptions] options
|
599
|
+
# Request-specific options
|
600
|
+
#
|
601
|
+
# @yield [result, err] Result & error if block supplied
|
602
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Payments] parsed result object
|
603
|
+
# @yieldparam err [StandardError] error object if request failed
|
604
|
+
#
|
605
|
+
# @return [Google::Apis::AdsenseV1_4::Payments]
|
606
|
+
#
|
607
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
608
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
609
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
610
|
+
def list_account_payments(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
611
|
+
path = 'accounts/{accountId}/payments'
|
612
|
+
command = make_simple_command(:get, path, options)
|
613
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Payments::Representation
|
614
|
+
command.response_class = Google::Apis::AdsenseV1_4::Payments
|
615
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
616
|
+
command.query['fields'] = fields unless fields.nil?
|
617
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
618
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
619
|
+
execute_or_queue_command(command, &block)
|
620
|
+
end
|
621
|
+
|
622
|
+
# Generate an AdSense report based on the report request sent in the query
|
623
|
+
# parameters. Returns the result as JSON; to retrieve output in CSV format
|
624
|
+
# specify "alt=csv" as a query parameter.
|
625
|
+
# @param [String] account_id
|
626
|
+
# Account upon which to report.
|
627
|
+
# @param [String] currency
|
628
|
+
# Optional currency to use when reporting on monetary metrics. Defaults to the
|
629
|
+
# account's currency if not set.
|
630
|
+
# @param [Array<String>, String] dimension
|
631
|
+
# Dimensions to base the report on.
|
632
|
+
# @param [String] end_date
|
633
|
+
# End of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
634
|
+
# @param [Array<String>, String] filter
|
635
|
+
# Filters to be run on the report.
|
636
|
+
# @param [String] locale
|
637
|
+
# Optional locale to use for translating report output to a local language.
|
638
|
+
# Defaults to "en_US" if not specified.
|
639
|
+
# @param [Fixnum] max_results
|
640
|
+
# The maximum number of rows of report data to return.
|
641
|
+
# @param [Array<String>, String] metric
|
642
|
+
# Numeric columns to include in the report.
|
643
|
+
# @param [Array<String>, String] sort
|
644
|
+
# The name of a dimension or metric to sort the resulting report on, optionally
|
645
|
+
# prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
|
646
|
+
# specified, the column is sorted ascending.
|
647
|
+
# @param [String] start_date
|
648
|
+
# Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
649
|
+
# @param [Fixnum] start_index
|
650
|
+
# Index of the first row of report data to return.
|
651
|
+
# @param [Boolean] use_timezone_reporting
|
652
|
+
# Whether the report should be generated in the AdSense account's local timezone.
|
653
|
+
# If false default PST/PDT timezone will be used.
|
654
|
+
# @param [String] fields
|
655
|
+
# Selector specifying which fields to include in a partial response.
|
656
|
+
# @param [String] quota_user
|
657
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
658
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
659
|
+
# Overrides userIp if both are provided.
|
660
|
+
# @param [String] user_ip
|
661
|
+
# IP address of the site where the request originates. Use this if you want to
|
662
|
+
# enforce per-user limits.
|
663
|
+
# @param [IO, String] download_dest
|
664
|
+
# IO stream or filename to receive content download
|
665
|
+
# @param [Google::Apis::RequestOptions] options
|
666
|
+
# Request-specific options
|
667
|
+
#
|
668
|
+
# @yield [result, err] Result & error if block supplied
|
669
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
|
670
|
+
# @yieldparam err [StandardError] error object if request failed
|
671
|
+
#
|
672
|
+
# @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
|
673
|
+
#
|
674
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
675
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
676
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
677
|
+
def generate_account_report(account_id, currency: nil, dimension: nil, end_date: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_date: nil, start_index: nil, use_timezone_reporting: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
678
|
+
path = 'accounts/{accountId}/reports'
|
679
|
+
if download_dest.nil?
|
680
|
+
command = make_simple_command(:get, path, options)
|
681
|
+
else
|
682
|
+
command = make_download_command(:get, path, options)
|
683
|
+
command.download_dest = download_dest
|
684
|
+
end
|
685
|
+
command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
|
686
|
+
command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
|
687
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
688
|
+
command.query['currency'] = currency unless currency.nil?
|
689
|
+
command.query['dimension'] = dimension unless dimension.nil?
|
690
|
+
command.query['endDate'] = end_date unless end_date.nil?
|
691
|
+
command.query['filter'] = filter unless filter.nil?
|
692
|
+
command.query['locale'] = locale unless locale.nil?
|
693
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
694
|
+
command.query['metric'] = metric unless metric.nil?
|
695
|
+
command.query['sort'] = sort unless sort.nil?
|
696
|
+
command.query['startDate'] = start_date unless start_date.nil?
|
697
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
698
|
+
command.query['useTimezoneReporting'] = use_timezone_reporting unless use_timezone_reporting.nil?
|
699
|
+
command.query['fields'] = fields unless fields.nil?
|
700
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
701
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
702
|
+
execute_or_queue_command(command, &block)
|
703
|
+
end
|
704
|
+
|
705
|
+
# Generate an AdSense report based on the saved report ID sent in the query
|
706
|
+
# parameters.
|
707
|
+
# @param [String] account_id
|
708
|
+
# Account to which the saved reports belong.
|
709
|
+
# @param [String] saved_report_id
|
710
|
+
# The saved report to retrieve.
|
711
|
+
# @param [String] locale
|
712
|
+
# Optional locale to use for translating report output to a local language.
|
713
|
+
# Defaults to "en_US" if not specified.
|
714
|
+
# @param [Fixnum] max_results
|
715
|
+
# The maximum number of rows of report data to return.
|
716
|
+
# @param [Fixnum] start_index
|
717
|
+
# Index of the first row of report data to return.
|
718
|
+
# @param [String] fields
|
719
|
+
# Selector specifying which fields to include in a partial response.
|
720
|
+
# @param [String] quota_user
|
721
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
722
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
723
|
+
# Overrides userIp if both are provided.
|
724
|
+
# @param [String] user_ip
|
725
|
+
# IP address of the site where the request originates. Use this if you want to
|
726
|
+
# enforce per-user limits.
|
727
|
+
# @param [Google::Apis::RequestOptions] options
|
728
|
+
# Request-specific options
|
729
|
+
#
|
730
|
+
# @yield [result, err] Result & error if block supplied
|
731
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
|
732
|
+
# @yieldparam err [StandardError] error object if request failed
|
733
|
+
#
|
734
|
+
# @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
|
735
|
+
#
|
736
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
737
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
738
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
739
|
+
def generate_account_saved_report(account_id, saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
740
|
+
path = 'accounts/{accountId}/reports/{savedReportId}'
|
741
|
+
command = make_simple_command(:get, path, options)
|
742
|
+
command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
|
743
|
+
command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
|
744
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
745
|
+
command.params['savedReportId'] = saved_report_id unless saved_report_id.nil?
|
746
|
+
command.query['locale'] = locale unless locale.nil?
|
747
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
748
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
749
|
+
command.query['fields'] = fields unless fields.nil?
|
750
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
751
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
752
|
+
execute_or_queue_command(command, &block)
|
753
|
+
end
|
754
|
+
|
755
|
+
# List all saved reports in the specified AdSense account.
|
756
|
+
# @param [String] account_id
|
757
|
+
# Account to which the saved reports belong.
|
758
|
+
# @param [Fixnum] max_results
|
759
|
+
# The maximum number of saved reports to include in the response, used for
|
760
|
+
# paging.
|
761
|
+
# @param [String] page_token
|
762
|
+
# A continuation token, used to page through saved reports. To retrieve the next
|
763
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
764
|
+
# response.
|
765
|
+
# @param [String] fields
|
766
|
+
# Selector specifying which fields to include in a partial response.
|
767
|
+
# @param [String] quota_user
|
768
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
769
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
770
|
+
# Overrides userIp if both are provided.
|
771
|
+
# @param [String] user_ip
|
772
|
+
# IP address of the site where the request originates. Use this if you want to
|
773
|
+
# enforce per-user limits.
|
774
|
+
# @param [Google::Apis::RequestOptions] options
|
775
|
+
# Request-specific options
|
776
|
+
#
|
777
|
+
# @yield [result, err] Result & error if block supplied
|
778
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedReports] parsed result object
|
779
|
+
# @yieldparam err [StandardError] error object if request failed
|
780
|
+
#
|
781
|
+
# @return [Google::Apis::AdsenseV1_4::SavedReports]
|
782
|
+
#
|
783
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
784
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
785
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
786
|
+
def list_account_saved_reports(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
787
|
+
path = 'accounts/{accountId}/reports/saved'
|
788
|
+
command = make_simple_command(:get, path, options)
|
789
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedReports::Representation
|
790
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedReports
|
791
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
792
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
793
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
794
|
+
command.query['fields'] = fields unless fields.nil?
|
795
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
796
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
797
|
+
execute_or_queue_command(command, &block)
|
798
|
+
end
|
799
|
+
|
800
|
+
# List a specific saved ad style for the specified account.
|
801
|
+
# @param [String] account_id
|
802
|
+
# Account for which to get the saved ad style.
|
803
|
+
# @param [String] saved_ad_style_id
|
804
|
+
# Saved ad style to retrieve.
|
805
|
+
# @param [String] fields
|
806
|
+
# Selector specifying which fields to include in a partial response.
|
807
|
+
# @param [String] quota_user
|
808
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
809
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
810
|
+
# Overrides userIp if both are provided.
|
811
|
+
# @param [String] user_ip
|
812
|
+
# IP address of the site where the request originates. Use this if you want to
|
813
|
+
# enforce per-user limits.
|
814
|
+
# @param [Google::Apis::RequestOptions] options
|
815
|
+
# Request-specific options
|
816
|
+
#
|
817
|
+
# @yield [result, err] Result & error if block supplied
|
818
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyle] parsed result object
|
819
|
+
# @yieldparam err [StandardError] error object if request failed
|
820
|
+
#
|
821
|
+
# @return [Google::Apis::AdsenseV1_4::SavedAdStyle]
|
822
|
+
#
|
823
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
824
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
825
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
826
|
+
def get_account_saved_ad_style(account_id, saved_ad_style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
827
|
+
path = 'accounts/{accountId}/savedadstyles/{savedAdStyleId}'
|
828
|
+
command = make_simple_command(:get, path, options)
|
829
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyle::Representation
|
830
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyle
|
831
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
832
|
+
command.params['savedAdStyleId'] = saved_ad_style_id unless saved_ad_style_id.nil?
|
833
|
+
command.query['fields'] = fields unless fields.nil?
|
834
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
835
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
836
|
+
execute_or_queue_command(command, &block)
|
837
|
+
end
|
838
|
+
|
839
|
+
# List all saved ad styles in the specified account.
|
840
|
+
# @param [String] account_id
|
841
|
+
# Account for which to list saved ad styles.
|
842
|
+
# @param [Fixnum] max_results
|
843
|
+
# The maximum number of saved ad styles to include in the response, used for
|
844
|
+
# paging.
|
845
|
+
# @param [String] page_token
|
846
|
+
# A continuation token, used to page through saved ad styles. To retrieve the
|
847
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
848
|
+
# previous response.
|
849
|
+
# @param [String] fields
|
850
|
+
# Selector specifying which fields to include in a partial response.
|
851
|
+
# @param [String] quota_user
|
852
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
853
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
854
|
+
# Overrides userIp if both are provided.
|
855
|
+
# @param [String] user_ip
|
856
|
+
# IP address of the site where the request originates. Use this if you want to
|
857
|
+
# enforce per-user limits.
|
858
|
+
# @param [Google::Apis::RequestOptions] options
|
859
|
+
# Request-specific options
|
860
|
+
#
|
861
|
+
# @yield [result, err] Result & error if block supplied
|
862
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyles] parsed result object
|
863
|
+
# @yieldparam err [StandardError] error object if request failed
|
864
|
+
#
|
865
|
+
# @return [Google::Apis::AdsenseV1_4::SavedAdStyles]
|
866
|
+
#
|
867
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
868
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
869
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
870
|
+
def list_account_saved_ad_styles(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
871
|
+
path = 'accounts/{accountId}/savedadstyles'
|
872
|
+
command = make_simple_command(:get, path, options)
|
873
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyles::Representation
|
874
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyles
|
875
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
876
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
877
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
878
|
+
command.query['fields'] = fields unless fields.nil?
|
879
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
880
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
881
|
+
execute_or_queue_command(command, &block)
|
882
|
+
end
|
883
|
+
|
884
|
+
# List all URL channels in the specified ad client for the specified account.
|
885
|
+
# @param [String] account_id
|
886
|
+
# Account to which the ad client belongs.
|
887
|
+
# @param [String] ad_client_id
|
888
|
+
# Ad client for which to list URL channels.
|
889
|
+
# @param [Fixnum] max_results
|
890
|
+
# The maximum number of URL channels to include in the response, used for paging.
|
891
|
+
# @param [String] page_token
|
892
|
+
# A continuation token, used to page through URL channels. To retrieve the next
|
893
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
894
|
+
# response.
|
895
|
+
# @param [String] fields
|
896
|
+
# Selector specifying which fields to include in a partial response.
|
897
|
+
# @param [String] quota_user
|
898
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
899
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
900
|
+
# Overrides userIp if both are provided.
|
901
|
+
# @param [String] user_ip
|
902
|
+
# IP address of the site where the request originates. Use this if you want to
|
903
|
+
# enforce per-user limits.
|
904
|
+
# @param [Google::Apis::RequestOptions] options
|
905
|
+
# Request-specific options
|
906
|
+
#
|
907
|
+
# @yield [result, err] Result & error if block supplied
|
908
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::UrlChannels] parsed result object
|
909
|
+
# @yieldparam err [StandardError] error object if request failed
|
910
|
+
#
|
911
|
+
# @return [Google::Apis::AdsenseV1_4::UrlChannels]
|
912
|
+
#
|
913
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
914
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
915
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
916
|
+
def list_account_url_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
917
|
+
path = 'accounts/{accountId}/adclients/{adClientId}/urlchannels'
|
918
|
+
command = make_simple_command(:get, path, options)
|
919
|
+
command.response_representation = Google::Apis::AdsenseV1_4::UrlChannels::Representation
|
920
|
+
command.response_class = Google::Apis::AdsenseV1_4::UrlChannels
|
921
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
922
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
923
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
924
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
925
|
+
command.query['fields'] = fields unless fields.nil?
|
926
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
927
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
928
|
+
execute_or_queue_command(command, &block)
|
929
|
+
end
|
930
|
+
|
931
|
+
# List all ad clients in this AdSense account.
|
932
|
+
# @param [Fixnum] max_results
|
933
|
+
# The maximum number of ad clients to include in the response, used for paging.
|
934
|
+
# @param [String] page_token
|
935
|
+
# A continuation token, used to page through ad clients. To retrieve the next
|
936
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
937
|
+
# response.
|
938
|
+
# @param [String] fields
|
939
|
+
# Selector specifying which fields to include in a partial response.
|
940
|
+
# @param [String] quota_user
|
941
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
942
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
943
|
+
# Overrides userIp if both are provided.
|
944
|
+
# @param [String] user_ip
|
945
|
+
# IP address of the site where the request originates. Use this if you want to
|
946
|
+
# enforce per-user limits.
|
947
|
+
# @param [Google::Apis::RequestOptions] options
|
948
|
+
# Request-specific options
|
949
|
+
#
|
950
|
+
# @yield [result, err] Result & error if block supplied
|
951
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdClients] parsed result object
|
952
|
+
# @yieldparam err [StandardError] error object if request failed
|
953
|
+
#
|
954
|
+
# @return [Google::Apis::AdsenseV1_4::AdClients]
|
955
|
+
#
|
956
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
957
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
958
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
959
|
+
def list_ad_clients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
960
|
+
path = 'adclients'
|
961
|
+
command = make_simple_command(:get, path, options)
|
962
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdClients::Representation
|
963
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdClients
|
964
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
965
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
966
|
+
command.query['fields'] = fields unless fields.nil?
|
967
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
968
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
969
|
+
execute_or_queue_command(command, &block)
|
970
|
+
end
|
971
|
+
|
972
|
+
# Gets the specified ad unit in the specified ad client.
|
973
|
+
# @param [String] ad_client_id
|
974
|
+
# Ad client for which to get the ad unit.
|
975
|
+
# @param [String] ad_unit_id
|
976
|
+
# Ad unit to retrieve.
|
977
|
+
# @param [String] fields
|
978
|
+
# Selector specifying which fields to include in a partial response.
|
979
|
+
# @param [String] quota_user
|
980
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
981
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
982
|
+
# Overrides userIp if both are provided.
|
983
|
+
# @param [String] user_ip
|
984
|
+
# IP address of the site where the request originates. Use this if you want to
|
985
|
+
# enforce per-user limits.
|
986
|
+
# @param [Google::Apis::RequestOptions] options
|
987
|
+
# Request-specific options
|
988
|
+
#
|
989
|
+
# @yield [result, err] Result & error if block supplied
|
990
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnit] parsed result object
|
991
|
+
# @yieldparam err [StandardError] error object if request failed
|
992
|
+
#
|
993
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnit]
|
994
|
+
#
|
995
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
996
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
997
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
998
|
+
def get_ad_unit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
999
|
+
path = 'adclients/{adClientId}/adunits/{adUnitId}'
|
1000
|
+
command = make_simple_command(:get, path, options)
|
1001
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnit::Representation
|
1002
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnit
|
1003
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1004
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
1005
|
+
command.query['fields'] = fields unless fields.nil?
|
1006
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1007
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1008
|
+
execute_or_queue_command(command, &block)
|
1009
|
+
end
|
1010
|
+
|
1011
|
+
# Get ad code for the specified ad unit.
|
1012
|
+
# @param [String] ad_client_id
|
1013
|
+
# Ad client with contains the ad unit.
|
1014
|
+
# @param [String] ad_unit_id
|
1015
|
+
# Ad unit to get the code for.
|
1016
|
+
# @param [String] fields
|
1017
|
+
# Selector specifying which fields to include in a partial response.
|
1018
|
+
# @param [String] quota_user
|
1019
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1020
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1021
|
+
# Overrides userIp if both are provided.
|
1022
|
+
# @param [String] user_ip
|
1023
|
+
# IP address of the site where the request originates. Use this if you want to
|
1024
|
+
# enforce per-user limits.
|
1025
|
+
# @param [Google::Apis::RequestOptions] options
|
1026
|
+
# Request-specific options
|
1027
|
+
#
|
1028
|
+
# @yield [result, err] Result & error if block supplied
|
1029
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdCode] parsed result object
|
1030
|
+
# @yieldparam err [StandardError] error object if request failed
|
1031
|
+
#
|
1032
|
+
# @return [Google::Apis::AdsenseV1_4::AdCode]
|
1033
|
+
#
|
1034
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1035
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1036
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1037
|
+
def get_ad_code_ad_unit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1038
|
+
path = 'adclients/{adClientId}/adunits/{adUnitId}/adcode'
|
1039
|
+
command = make_simple_command(:get, path, options)
|
1040
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdCode::Representation
|
1041
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdCode
|
1042
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1043
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
1044
|
+
command.query['fields'] = fields unless fields.nil?
|
1045
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1046
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1047
|
+
execute_or_queue_command(command, &block)
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
# List all ad units in the specified ad client for this AdSense account.
|
1051
|
+
# @param [String] ad_client_id
|
1052
|
+
# Ad client for which to list ad units.
|
1053
|
+
# @param [Boolean] include_inactive
|
1054
|
+
# Whether to include inactive ad units. Default: true.
|
1055
|
+
# @param [Fixnum] max_results
|
1056
|
+
# The maximum number of ad units to include in the response, used for paging.
|
1057
|
+
# @param [String] page_token
|
1058
|
+
# A continuation token, used to page through ad units. To retrieve the next page,
|
1059
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
1060
|
+
# @param [String] fields
|
1061
|
+
# Selector specifying which fields to include in a partial response.
|
1062
|
+
# @param [String] quota_user
|
1063
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1064
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1065
|
+
# Overrides userIp if both are provided.
|
1066
|
+
# @param [String] user_ip
|
1067
|
+
# IP address of the site where the request originates. Use this if you want to
|
1068
|
+
# enforce per-user limits.
|
1069
|
+
# @param [Google::Apis::RequestOptions] options
|
1070
|
+
# Request-specific options
|
1071
|
+
#
|
1072
|
+
# @yield [result, err] Result & error if block supplied
|
1073
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
|
1074
|
+
# @yieldparam err [StandardError] error object if request failed
|
1075
|
+
#
|
1076
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnits]
|
1077
|
+
#
|
1078
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1079
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1080
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1081
|
+
def list_ad_units(ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1082
|
+
path = 'adclients/{adClientId}/adunits'
|
1083
|
+
command = make_simple_command(:get, path, options)
|
1084
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
|
1085
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnits
|
1086
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1087
|
+
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
1088
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1089
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1090
|
+
command.query['fields'] = fields unless fields.nil?
|
1091
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1092
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1093
|
+
execute_or_queue_command(command, &block)
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
# List all custom channels which the specified ad unit belongs to.
|
1097
|
+
# @param [String] ad_client_id
|
1098
|
+
# Ad client which contains the ad unit.
|
1099
|
+
# @param [String] ad_unit_id
|
1100
|
+
# Ad unit for which to list custom channels.
|
1101
|
+
# @param [Fixnum] max_results
|
1102
|
+
# The maximum number of custom channels to include in the response, used for
|
1103
|
+
# paging.
|
1104
|
+
# @param [String] page_token
|
1105
|
+
# A continuation token, used to page through custom channels. To retrieve the
|
1106
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
1107
|
+
# previous response.
|
1108
|
+
# @param [String] fields
|
1109
|
+
# Selector specifying which fields to include in a partial response.
|
1110
|
+
# @param [String] quota_user
|
1111
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1112
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1113
|
+
# Overrides userIp if both are provided.
|
1114
|
+
# @param [String] user_ip
|
1115
|
+
# IP address of the site where the request originates. Use this if you want to
|
1116
|
+
# enforce per-user limits.
|
1117
|
+
# @param [Google::Apis::RequestOptions] options
|
1118
|
+
# Request-specific options
|
1119
|
+
#
|
1120
|
+
# @yield [result, err] Result & error if block supplied
|
1121
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
|
1122
|
+
# @yieldparam err [StandardError] error object if request failed
|
1123
|
+
#
|
1124
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannels]
|
1125
|
+
#
|
1126
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1127
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1128
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1129
|
+
def list_ad_unit_custom_channels(ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1130
|
+
path = 'adclients/{adClientId}/adunits/{adUnitId}/customchannels'
|
1131
|
+
command = make_simple_command(:get, path, options)
|
1132
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
|
1133
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
|
1134
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1135
|
+
command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
|
1136
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1137
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1138
|
+
command.query['fields'] = fields unless fields.nil?
|
1139
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1140
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1141
|
+
execute_or_queue_command(command, &block)
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
# Dismiss (delete) the specified alert from the publisher's AdSense account.
|
1145
|
+
# @param [String] alert_id
|
1146
|
+
# Alert to delete.
|
1147
|
+
# @param [String] fields
|
1148
|
+
# Selector specifying which fields to include in a partial response.
|
1149
|
+
# @param [String] quota_user
|
1150
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1151
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1152
|
+
# Overrides userIp if both are provided.
|
1153
|
+
# @param [String] user_ip
|
1154
|
+
# IP address of the site where the request originates. Use this if you want to
|
1155
|
+
# enforce per-user limits.
|
1156
|
+
# @param [Google::Apis::RequestOptions] options
|
1157
|
+
# Request-specific options
|
1158
|
+
#
|
1159
|
+
# @yield [result, err] Result & error if block supplied
|
1160
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1161
|
+
# @yieldparam err [StandardError] error object if request failed
|
1162
|
+
#
|
1163
|
+
# @return [void]
|
1164
|
+
#
|
1165
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1166
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1167
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1168
|
+
def delete_alert(alert_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1169
|
+
path = 'alerts/{alertId}'
|
1170
|
+
command = make_simple_command(:delete, path, options)
|
1171
|
+
command.params['alertId'] = alert_id unless alert_id.nil?
|
1172
|
+
command.query['fields'] = fields unless fields.nil?
|
1173
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1174
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1175
|
+
execute_or_queue_command(command, &block)
|
1176
|
+
end
|
1177
|
+
|
1178
|
+
# List the alerts for this AdSense account.
|
1179
|
+
# @param [String] locale
|
1180
|
+
# The locale to use for translating alert messages. The account locale will be
|
1181
|
+
# used if this is not supplied. The AdSense default (English) will be used if
|
1182
|
+
# the supplied locale is invalid or unsupported.
|
1183
|
+
# @param [String] fields
|
1184
|
+
# Selector specifying which fields to include in a partial response.
|
1185
|
+
# @param [String] quota_user
|
1186
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1187
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1188
|
+
# Overrides userIp if both are provided.
|
1189
|
+
# @param [String] user_ip
|
1190
|
+
# IP address of the site where the request originates. Use this if you want to
|
1191
|
+
# enforce per-user limits.
|
1192
|
+
# @param [Google::Apis::RequestOptions] options
|
1193
|
+
# Request-specific options
|
1194
|
+
#
|
1195
|
+
# @yield [result, err] Result & error if block supplied
|
1196
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Alerts] parsed result object
|
1197
|
+
# @yieldparam err [StandardError] error object if request failed
|
1198
|
+
#
|
1199
|
+
# @return [Google::Apis::AdsenseV1_4::Alerts]
|
1200
|
+
#
|
1201
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1202
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1203
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1204
|
+
def list_alerts(locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1205
|
+
path = 'alerts'
|
1206
|
+
command = make_simple_command(:get, path, options)
|
1207
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Alerts::Representation
|
1208
|
+
command.response_class = Google::Apis::AdsenseV1_4::Alerts
|
1209
|
+
command.query['locale'] = locale unless locale.nil?
|
1210
|
+
command.query['fields'] = fields unless fields.nil?
|
1211
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1212
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1213
|
+
execute_or_queue_command(command, &block)
|
1214
|
+
end
|
1215
|
+
|
1216
|
+
# Get the specified custom channel from the specified ad client.
|
1217
|
+
# @param [String] ad_client_id
|
1218
|
+
# Ad client which contains the custom channel.
|
1219
|
+
# @param [String] custom_channel_id
|
1220
|
+
# Custom channel to retrieve.
|
1221
|
+
# @param [String] fields
|
1222
|
+
# Selector specifying which fields to include in a partial response.
|
1223
|
+
# @param [String] quota_user
|
1224
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1225
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1226
|
+
# Overrides userIp if both are provided.
|
1227
|
+
# @param [String] user_ip
|
1228
|
+
# IP address of the site where the request originates. Use this if you want to
|
1229
|
+
# enforce per-user limits.
|
1230
|
+
# @param [Google::Apis::RequestOptions] options
|
1231
|
+
# Request-specific options
|
1232
|
+
#
|
1233
|
+
# @yield [result, err] Result & error if block supplied
|
1234
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannel] parsed result object
|
1235
|
+
# @yieldparam err [StandardError] error object if request failed
|
1236
|
+
#
|
1237
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannel]
|
1238
|
+
#
|
1239
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1240
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1241
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1242
|
+
def get_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1243
|
+
path = 'adclients/{adClientId}/customchannels/{customChannelId}'
|
1244
|
+
command = make_simple_command(:get, path, options)
|
1245
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannel::Representation
|
1246
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannel
|
1247
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1248
|
+
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
1249
|
+
command.query['fields'] = fields unless fields.nil?
|
1250
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1251
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1252
|
+
execute_or_queue_command(command, &block)
|
1253
|
+
end
|
1254
|
+
|
1255
|
+
# List all custom channels in the specified ad client for this AdSense account.
|
1256
|
+
# @param [String] ad_client_id
|
1257
|
+
# Ad client for which to list custom channels.
|
1258
|
+
# @param [Fixnum] max_results
|
1259
|
+
# The maximum number of custom channels to include in the response, used for
|
1260
|
+
# paging.
|
1261
|
+
# @param [String] page_token
|
1262
|
+
# A continuation token, used to page through custom channels. To retrieve the
|
1263
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
1264
|
+
# previous response.
|
1265
|
+
# @param [String] fields
|
1266
|
+
# Selector specifying which fields to include in a partial response.
|
1267
|
+
# @param [String] quota_user
|
1268
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1269
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1270
|
+
# Overrides userIp if both are provided.
|
1271
|
+
# @param [String] user_ip
|
1272
|
+
# IP address of the site where the request originates. Use this if you want to
|
1273
|
+
# enforce per-user limits.
|
1274
|
+
# @param [Google::Apis::RequestOptions] options
|
1275
|
+
# Request-specific options
|
1276
|
+
#
|
1277
|
+
# @yield [result, err] Result & error if block supplied
|
1278
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
|
1279
|
+
# @yieldparam err [StandardError] error object if request failed
|
1280
|
+
#
|
1281
|
+
# @return [Google::Apis::AdsenseV1_4::CustomChannels]
|
1282
|
+
#
|
1283
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1284
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1285
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1286
|
+
def list_custom_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1287
|
+
path = 'adclients/{adClientId}/customchannels'
|
1288
|
+
command = make_simple_command(:get, path, options)
|
1289
|
+
command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
|
1290
|
+
command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
|
1291
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1292
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1293
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1294
|
+
command.query['fields'] = fields unless fields.nil?
|
1295
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1296
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1297
|
+
execute_or_queue_command(command, &block)
|
1298
|
+
end
|
1299
|
+
|
1300
|
+
# List all ad units in the specified custom channel.
|
1301
|
+
# @param [String] ad_client_id
|
1302
|
+
# Ad client which contains the custom channel.
|
1303
|
+
# @param [String] custom_channel_id
|
1304
|
+
# Custom channel for which to list ad units.
|
1305
|
+
# @param [Boolean] include_inactive
|
1306
|
+
# Whether to include inactive ad units. Default: true.
|
1307
|
+
# @param [Fixnum] max_results
|
1308
|
+
# The maximum number of ad units to include in the response, used for paging.
|
1309
|
+
# @param [String] page_token
|
1310
|
+
# A continuation token, used to page through ad units. To retrieve the next page,
|
1311
|
+
# set this parameter to the value of "nextPageToken" from the previous response.
|
1312
|
+
# @param [String] fields
|
1313
|
+
# Selector specifying which fields to include in a partial response.
|
1314
|
+
# @param [String] quota_user
|
1315
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1316
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1317
|
+
# Overrides userIp if both are provided.
|
1318
|
+
# @param [String] user_ip
|
1319
|
+
# IP address of the site where the request originates. Use this if you want to
|
1320
|
+
# enforce per-user limits.
|
1321
|
+
# @param [Google::Apis::RequestOptions] options
|
1322
|
+
# Request-specific options
|
1323
|
+
#
|
1324
|
+
# @yield [result, err] Result & error if block supplied
|
1325
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
|
1326
|
+
# @yieldparam err [StandardError] error object if request failed
|
1327
|
+
#
|
1328
|
+
# @return [Google::Apis::AdsenseV1_4::AdUnits]
|
1329
|
+
#
|
1330
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1331
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1332
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1333
|
+
def list_custom_channel_ad_units(ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1334
|
+
path = 'adclients/{adClientId}/customchannels/{customChannelId}/adunits'
|
1335
|
+
command = make_simple_command(:get, path, options)
|
1336
|
+
command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
|
1337
|
+
command.response_class = Google::Apis::AdsenseV1_4::AdUnits
|
1338
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1339
|
+
command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
|
1340
|
+
command.query['includeInactive'] = include_inactive unless include_inactive.nil?
|
1341
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1342
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1343
|
+
command.query['fields'] = fields unless fields.nil?
|
1344
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1345
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1346
|
+
execute_or_queue_command(command, &block)
|
1347
|
+
end
|
1348
|
+
|
1349
|
+
# List the metadata for the dimensions available to this AdSense account.
|
1350
|
+
# @param [String] fields
|
1351
|
+
# Selector specifying which fields to include in a partial response.
|
1352
|
+
# @param [String] quota_user
|
1353
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1354
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1355
|
+
# Overrides userIp if both are provided.
|
1356
|
+
# @param [String] user_ip
|
1357
|
+
# IP address of the site where the request originates. Use this if you want to
|
1358
|
+
# enforce per-user limits.
|
1359
|
+
# @param [Google::Apis::RequestOptions] options
|
1360
|
+
# Request-specific options
|
1361
|
+
#
|
1362
|
+
# @yield [result, err] Result & error if block supplied
|
1363
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Metadata] parsed result object
|
1364
|
+
# @yieldparam err [StandardError] error object if request failed
|
1365
|
+
#
|
1366
|
+
# @return [Google::Apis::AdsenseV1_4::Metadata]
|
1367
|
+
#
|
1368
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1369
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1370
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1371
|
+
def list_metadata_dimensions(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1372
|
+
path = 'metadata/dimensions'
|
1373
|
+
command = make_simple_command(:get, path, options)
|
1374
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Metadata::Representation
|
1375
|
+
command.response_class = Google::Apis::AdsenseV1_4::Metadata
|
1376
|
+
command.query['fields'] = fields unless fields.nil?
|
1377
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1378
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1379
|
+
execute_or_queue_command(command, &block)
|
1380
|
+
end
|
1381
|
+
|
1382
|
+
# List the metadata for the metrics available to this AdSense account.
|
1383
|
+
# @param [String] fields
|
1384
|
+
# Selector specifying which fields to include in a partial response.
|
1385
|
+
# @param [String] quota_user
|
1386
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1387
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1388
|
+
# Overrides userIp if both are provided.
|
1389
|
+
# @param [String] user_ip
|
1390
|
+
# IP address of the site where the request originates. Use this if you want to
|
1391
|
+
# enforce per-user limits.
|
1392
|
+
# @param [Google::Apis::RequestOptions] options
|
1393
|
+
# Request-specific options
|
1394
|
+
#
|
1395
|
+
# @yield [result, err] Result & error if block supplied
|
1396
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Metadata] parsed result object
|
1397
|
+
# @yieldparam err [StandardError] error object if request failed
|
1398
|
+
#
|
1399
|
+
# @return [Google::Apis::AdsenseV1_4::Metadata]
|
1400
|
+
#
|
1401
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1402
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1403
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1404
|
+
def list_metadata_metrics(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1405
|
+
path = 'metadata/metrics'
|
1406
|
+
command = make_simple_command(:get, path, options)
|
1407
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Metadata::Representation
|
1408
|
+
command.response_class = Google::Apis::AdsenseV1_4::Metadata
|
1409
|
+
command.query['fields'] = fields unless fields.nil?
|
1410
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1411
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1412
|
+
execute_or_queue_command(command, &block)
|
1413
|
+
end
|
1414
|
+
|
1415
|
+
# List the payments for this AdSense account.
|
1416
|
+
# @param [String] fields
|
1417
|
+
# Selector specifying which fields to include in a partial response.
|
1418
|
+
# @param [String] quota_user
|
1419
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1420
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1421
|
+
# Overrides userIp if both are provided.
|
1422
|
+
# @param [String] user_ip
|
1423
|
+
# IP address of the site where the request originates. Use this if you want to
|
1424
|
+
# enforce per-user limits.
|
1425
|
+
# @param [Google::Apis::RequestOptions] options
|
1426
|
+
# Request-specific options
|
1427
|
+
#
|
1428
|
+
# @yield [result, err] Result & error if block supplied
|
1429
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::Payments] parsed result object
|
1430
|
+
# @yieldparam err [StandardError] error object if request failed
|
1431
|
+
#
|
1432
|
+
# @return [Google::Apis::AdsenseV1_4::Payments]
|
1433
|
+
#
|
1434
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1435
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1436
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1437
|
+
def list_payments(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1438
|
+
path = 'payments'
|
1439
|
+
command = make_simple_command(:get, path, options)
|
1440
|
+
command.response_representation = Google::Apis::AdsenseV1_4::Payments::Representation
|
1441
|
+
command.response_class = Google::Apis::AdsenseV1_4::Payments
|
1442
|
+
command.query['fields'] = fields unless fields.nil?
|
1443
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1444
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1445
|
+
execute_or_queue_command(command, &block)
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
# Generate an AdSense report based on the report request sent in the query
|
1449
|
+
# parameters. Returns the result as JSON; to retrieve output in CSV format
|
1450
|
+
# specify "alt=csv" as a query parameter.
|
1451
|
+
# @param [Array<String>, String] account_id
|
1452
|
+
# Accounts upon which to report.
|
1453
|
+
# @param [String] currency
|
1454
|
+
# Optional currency to use when reporting on monetary metrics. Defaults to the
|
1455
|
+
# account's currency if not set.
|
1456
|
+
# @param [Array<String>, String] dimension
|
1457
|
+
# Dimensions to base the report on.
|
1458
|
+
# @param [String] end_date
|
1459
|
+
# End of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
1460
|
+
# @param [Array<String>, String] filter
|
1461
|
+
# Filters to be run on the report.
|
1462
|
+
# @param [String] locale
|
1463
|
+
# Optional locale to use for translating report output to a local language.
|
1464
|
+
# Defaults to "en_US" if not specified.
|
1465
|
+
# @param [Fixnum] max_results
|
1466
|
+
# The maximum number of rows of report data to return.
|
1467
|
+
# @param [Array<String>, String] metric
|
1468
|
+
# Numeric columns to include in the report.
|
1469
|
+
# @param [Array<String>, String] sort
|
1470
|
+
# The name of a dimension or metric to sort the resulting report on, optionally
|
1471
|
+
# prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
|
1472
|
+
# specified, the column is sorted ascending.
|
1473
|
+
# @param [String] start_date
|
1474
|
+
# Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
|
1475
|
+
# @param [Fixnum] start_index
|
1476
|
+
# Index of the first row of report data to return.
|
1477
|
+
# @param [Boolean] use_timezone_reporting
|
1478
|
+
# Whether the report should be generated in the AdSense account's local timezone.
|
1479
|
+
# If false default PST/PDT timezone will be used.
|
1480
|
+
# @param [String] fields
|
1481
|
+
# Selector specifying which fields to include in a partial response.
|
1482
|
+
# @param [String] quota_user
|
1483
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1484
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1485
|
+
# Overrides userIp if both are provided.
|
1486
|
+
# @param [String] user_ip
|
1487
|
+
# IP address of the site where the request originates. Use this if you want to
|
1488
|
+
# enforce per-user limits.
|
1489
|
+
# @param [IO, String] download_dest
|
1490
|
+
# IO stream or filename to receive content download
|
1491
|
+
# @param [Google::Apis::RequestOptions] options
|
1492
|
+
# Request-specific options
|
1493
|
+
#
|
1494
|
+
# @yield [result, err] Result & error if block supplied
|
1495
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
|
1496
|
+
# @yieldparam err [StandardError] error object if request failed
|
1497
|
+
#
|
1498
|
+
# @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
|
1499
|
+
#
|
1500
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1501
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1502
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1503
|
+
def generate_report(account_id: nil, currency: nil, dimension: nil, end_date: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_date: nil, start_index: nil, use_timezone_reporting: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
1504
|
+
path = 'reports'
|
1505
|
+
if download_dest.nil?
|
1506
|
+
command = make_simple_command(:get, path, options)
|
1507
|
+
else
|
1508
|
+
command = make_download_command(:get, path, options)
|
1509
|
+
command.download_dest = download_dest
|
1510
|
+
end
|
1511
|
+
command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
|
1512
|
+
command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
|
1513
|
+
command.query['accountId'] = account_id unless account_id.nil?
|
1514
|
+
command.query['currency'] = currency unless currency.nil?
|
1515
|
+
command.query['dimension'] = dimension unless dimension.nil?
|
1516
|
+
command.query['endDate'] = end_date unless end_date.nil?
|
1517
|
+
command.query['filter'] = filter unless filter.nil?
|
1518
|
+
command.query['locale'] = locale unless locale.nil?
|
1519
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1520
|
+
command.query['metric'] = metric unless metric.nil?
|
1521
|
+
command.query['sort'] = sort unless sort.nil?
|
1522
|
+
command.query['startDate'] = start_date unless start_date.nil?
|
1523
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
1524
|
+
command.query['useTimezoneReporting'] = use_timezone_reporting unless use_timezone_reporting.nil?
|
1525
|
+
command.query['fields'] = fields unless fields.nil?
|
1526
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1527
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1528
|
+
execute_or_queue_command(command, &block)
|
1529
|
+
end
|
1530
|
+
|
1531
|
+
# Generate an AdSense report based on the saved report ID sent in the query
|
1532
|
+
# parameters.
|
1533
|
+
# @param [String] saved_report_id
|
1534
|
+
# The saved report to retrieve.
|
1535
|
+
# @param [String] locale
|
1536
|
+
# Optional locale to use for translating report output to a local language.
|
1537
|
+
# Defaults to "en_US" if not specified.
|
1538
|
+
# @param [Fixnum] max_results
|
1539
|
+
# The maximum number of rows of report data to return.
|
1540
|
+
# @param [Fixnum] start_index
|
1541
|
+
# Index of the first row of report data to return.
|
1542
|
+
# @param [String] fields
|
1543
|
+
# Selector specifying which fields to include in a partial response.
|
1544
|
+
# @param [String] quota_user
|
1545
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1546
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1547
|
+
# Overrides userIp if both are provided.
|
1548
|
+
# @param [String] user_ip
|
1549
|
+
# IP address of the site where the request originates. Use this if you want to
|
1550
|
+
# enforce per-user limits.
|
1551
|
+
# @param [Google::Apis::RequestOptions] options
|
1552
|
+
# Request-specific options
|
1553
|
+
#
|
1554
|
+
# @yield [result, err] Result & error if block supplied
|
1555
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
|
1556
|
+
# @yieldparam err [StandardError] error object if request failed
|
1557
|
+
#
|
1558
|
+
# @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
|
1559
|
+
#
|
1560
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1561
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1562
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1563
|
+
def generate_saved_report(saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1564
|
+
path = 'reports/{savedReportId}'
|
1565
|
+
command = make_simple_command(:get, path, options)
|
1566
|
+
command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
|
1567
|
+
command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
|
1568
|
+
command.params['savedReportId'] = saved_report_id unless saved_report_id.nil?
|
1569
|
+
command.query['locale'] = locale unless locale.nil?
|
1570
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1571
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
1572
|
+
command.query['fields'] = fields unless fields.nil?
|
1573
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1574
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1575
|
+
execute_or_queue_command(command, &block)
|
1576
|
+
end
|
1577
|
+
|
1578
|
+
# List all saved reports in this AdSense account.
|
1579
|
+
# @param [Fixnum] max_results
|
1580
|
+
# The maximum number of saved reports to include in the response, used for
|
1581
|
+
# paging.
|
1582
|
+
# @param [String] page_token
|
1583
|
+
# A continuation token, used to page through saved reports. To retrieve the next
|
1584
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
1585
|
+
# response.
|
1586
|
+
# @param [String] fields
|
1587
|
+
# Selector specifying which fields to include in a partial response.
|
1588
|
+
# @param [String] quota_user
|
1589
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1590
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1591
|
+
# Overrides userIp if both are provided.
|
1592
|
+
# @param [String] user_ip
|
1593
|
+
# IP address of the site where the request originates. Use this if you want to
|
1594
|
+
# enforce per-user limits.
|
1595
|
+
# @param [Google::Apis::RequestOptions] options
|
1596
|
+
# Request-specific options
|
1597
|
+
#
|
1598
|
+
# @yield [result, err] Result & error if block supplied
|
1599
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedReports] parsed result object
|
1600
|
+
# @yieldparam err [StandardError] error object if request failed
|
1601
|
+
#
|
1602
|
+
# @return [Google::Apis::AdsenseV1_4::SavedReports]
|
1603
|
+
#
|
1604
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1605
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1606
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1607
|
+
def list_saved_reports(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1608
|
+
path = 'reports/saved'
|
1609
|
+
command = make_simple_command(:get, path, options)
|
1610
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedReports::Representation
|
1611
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedReports
|
1612
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1613
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1614
|
+
command.query['fields'] = fields unless fields.nil?
|
1615
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1616
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1617
|
+
execute_or_queue_command(command, &block)
|
1618
|
+
end
|
1619
|
+
|
1620
|
+
# Get a specific saved ad style from the user's account.
|
1621
|
+
# @param [String] saved_ad_style_id
|
1622
|
+
# Saved ad style to retrieve.
|
1623
|
+
# @param [String] fields
|
1624
|
+
# Selector specifying which fields to include in a partial response.
|
1625
|
+
# @param [String] quota_user
|
1626
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1627
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1628
|
+
# Overrides userIp if both are provided.
|
1629
|
+
# @param [String] user_ip
|
1630
|
+
# IP address of the site where the request originates. Use this if you want to
|
1631
|
+
# enforce per-user limits.
|
1632
|
+
# @param [Google::Apis::RequestOptions] options
|
1633
|
+
# Request-specific options
|
1634
|
+
#
|
1635
|
+
# @yield [result, err] Result & error if block supplied
|
1636
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyle] parsed result object
|
1637
|
+
# @yieldparam err [StandardError] error object if request failed
|
1638
|
+
#
|
1639
|
+
# @return [Google::Apis::AdsenseV1_4::SavedAdStyle]
|
1640
|
+
#
|
1641
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1642
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1643
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1644
|
+
def get_saved_ad_style(saved_ad_style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1645
|
+
path = 'savedadstyles/{savedAdStyleId}'
|
1646
|
+
command = make_simple_command(:get, path, options)
|
1647
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyle::Representation
|
1648
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyle
|
1649
|
+
command.params['savedAdStyleId'] = saved_ad_style_id unless saved_ad_style_id.nil?
|
1650
|
+
command.query['fields'] = fields unless fields.nil?
|
1651
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1652
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1653
|
+
execute_or_queue_command(command, &block)
|
1654
|
+
end
|
1655
|
+
|
1656
|
+
# List all saved ad styles in the user's account.
|
1657
|
+
# @param [Fixnum] max_results
|
1658
|
+
# The maximum number of saved ad styles to include in the response, used for
|
1659
|
+
# paging.
|
1660
|
+
# @param [String] page_token
|
1661
|
+
# A continuation token, used to page through saved ad styles. To retrieve the
|
1662
|
+
# next page, set this parameter to the value of "nextPageToken" from the
|
1663
|
+
# previous response.
|
1664
|
+
# @param [String] fields
|
1665
|
+
# Selector specifying which fields to include in a partial response.
|
1666
|
+
# @param [String] quota_user
|
1667
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1668
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1669
|
+
# Overrides userIp if both are provided.
|
1670
|
+
# @param [String] user_ip
|
1671
|
+
# IP address of the site where the request originates. Use this if you want to
|
1672
|
+
# enforce per-user limits.
|
1673
|
+
# @param [Google::Apis::RequestOptions] options
|
1674
|
+
# Request-specific options
|
1675
|
+
#
|
1676
|
+
# @yield [result, err] Result & error if block supplied
|
1677
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyles] parsed result object
|
1678
|
+
# @yieldparam err [StandardError] error object if request failed
|
1679
|
+
#
|
1680
|
+
# @return [Google::Apis::AdsenseV1_4::SavedAdStyles]
|
1681
|
+
#
|
1682
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1683
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1684
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1685
|
+
def list_saved_ad_styles(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1686
|
+
path = 'savedadstyles'
|
1687
|
+
command = make_simple_command(:get, path, options)
|
1688
|
+
command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyles::Representation
|
1689
|
+
command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyles
|
1690
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1691
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1692
|
+
command.query['fields'] = fields unless fields.nil?
|
1693
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1694
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1695
|
+
execute_or_queue_command(command, &block)
|
1696
|
+
end
|
1697
|
+
|
1698
|
+
# List all URL channels in the specified ad client for this AdSense account.
|
1699
|
+
# @param [String] ad_client_id
|
1700
|
+
# Ad client for which to list URL channels.
|
1701
|
+
# @param [Fixnum] max_results
|
1702
|
+
# The maximum number of URL channels to include in the response, used for paging.
|
1703
|
+
# @param [String] page_token
|
1704
|
+
# A continuation token, used to page through URL channels. To retrieve the next
|
1705
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
1706
|
+
# response.
|
1707
|
+
# @param [String] fields
|
1708
|
+
# Selector specifying which fields to include in a partial response.
|
1709
|
+
# @param [String] quota_user
|
1710
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1711
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1712
|
+
# Overrides userIp if both are provided.
|
1713
|
+
# @param [String] user_ip
|
1714
|
+
# IP address of the site where the request originates. Use this if you want to
|
1715
|
+
# enforce per-user limits.
|
1716
|
+
# @param [Google::Apis::RequestOptions] options
|
1717
|
+
# Request-specific options
|
1718
|
+
#
|
1719
|
+
# @yield [result, err] Result & error if block supplied
|
1720
|
+
# @yieldparam result [Google::Apis::AdsenseV1_4::UrlChannels] parsed result object
|
1721
|
+
# @yieldparam err [StandardError] error object if request failed
|
1722
|
+
#
|
1723
|
+
# @return [Google::Apis::AdsenseV1_4::UrlChannels]
|
1724
|
+
#
|
1725
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1726
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1727
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1728
|
+
def list_url_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1729
|
+
path = 'adclients/{adClientId}/urlchannels'
|
1730
|
+
command = make_simple_command(:get, path, options)
|
1731
|
+
command.response_representation = Google::Apis::AdsenseV1_4::UrlChannels::Representation
|
1732
|
+
command.response_class = Google::Apis::AdsenseV1_4::UrlChannels
|
1733
|
+
command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
|
1734
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1735
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1736
|
+
command.query['fields'] = fields unless fields.nil?
|
1737
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1738
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1739
|
+
execute_or_queue_command(command, &block)
|
1740
|
+
end
|
1741
|
+
|
1742
|
+
protected
|
1743
|
+
|
1744
|
+
def apply_command_defaults(command)
|
1745
|
+
command.query['key'] = key unless key.nil?
|
1746
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1747
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1748
|
+
end
|
1749
|
+
end
|
1750
|
+
end
|
1751
|
+
end
|
1752
|
+
end
|