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,428 @@
|
|
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 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module GanV1beta1
|
24
|
+
|
25
|
+
class Advertiser
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
end
|
28
|
+
|
29
|
+
class Advertisers
|
30
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
31
|
+
end
|
32
|
+
|
33
|
+
class CcOffer
|
34
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
35
|
+
|
36
|
+
class BonusReward
|
37
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
38
|
+
end
|
39
|
+
|
40
|
+
class DefaultFee
|
41
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
42
|
+
end
|
43
|
+
|
44
|
+
class Reward
|
45
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
class CcOffers
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
end
|
52
|
+
|
53
|
+
class Event
|
54
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
55
|
+
|
56
|
+
class Product
|
57
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class Events
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
end
|
64
|
+
|
65
|
+
class Link
|
66
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
67
|
+
|
68
|
+
class SpecialOffers
|
69
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
class Links
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
end
|
76
|
+
|
77
|
+
class Money
|
78
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
79
|
+
end
|
80
|
+
|
81
|
+
class Publisher
|
82
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
83
|
+
end
|
84
|
+
|
85
|
+
class Publishers
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
end
|
88
|
+
|
89
|
+
class Report
|
90
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
91
|
+
end
|
92
|
+
|
93
|
+
class Advertiser
|
94
|
+
# @private
|
95
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
96
|
+
property :allow_publisher_created_links, as: 'allowPublisherCreatedLinks'
|
97
|
+
property :category, as: 'category'
|
98
|
+
property :commission_duration, as: 'commissionDuration'
|
99
|
+
property :contact_email, as: 'contactEmail'
|
100
|
+
property :contact_phone, as: 'contactPhone'
|
101
|
+
property :default_link_id, as: 'defaultLinkId'
|
102
|
+
property :description, as: 'description'
|
103
|
+
property :epc_ninety_day_average, as: 'epcNinetyDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
104
|
+
|
105
|
+
property :epc_seven_day_average, as: 'epcSevenDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
106
|
+
|
107
|
+
property :id, as: 'id'
|
108
|
+
property :item, as: 'item', class: Google::Apis::GanV1beta1::Advertiser, decorator: Google::Apis::GanV1beta1::Advertiser::Representation
|
109
|
+
|
110
|
+
property :join_date, as: 'joinDate', type: DateTime
|
111
|
+
|
112
|
+
property :kind, as: 'kind'
|
113
|
+
property :logo_url, as: 'logoUrl'
|
114
|
+
collection :merchant_center_ids, as: 'merchantCenterIds'
|
115
|
+
property :name, as: 'name'
|
116
|
+
property :payout_rank, as: 'payoutRank'
|
117
|
+
property :product_feeds_enabled, as: 'productFeedsEnabled'
|
118
|
+
collection :redirect_domains, as: 'redirectDomains'
|
119
|
+
property :site_url, as: 'siteUrl'
|
120
|
+
property :status, as: 'status'
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
class Advertisers
|
125
|
+
# @private
|
126
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
127
|
+
collection :items, as: 'items', class: Google::Apis::GanV1beta1::Advertiser, decorator: Google::Apis::GanV1beta1::Advertiser::Representation
|
128
|
+
|
129
|
+
property :kind, as: 'kind'
|
130
|
+
property :next_page_token, as: 'nextPageToken'
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
class CcOffer
|
135
|
+
# @private
|
136
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
137
|
+
collection :additional_card_benefits, as: 'additionalCardBenefits'
|
138
|
+
property :additional_card_holder_fee, as: 'additionalCardHolderFee'
|
139
|
+
property :age_minimum, as: 'ageMinimum'
|
140
|
+
property :age_minimum_details, as: 'ageMinimumDetails'
|
141
|
+
property :annual_fee, as: 'annualFee'
|
142
|
+
property :annual_fee_display, as: 'annualFeeDisplay'
|
143
|
+
property :annual_reward_maximum, as: 'annualRewardMaximum'
|
144
|
+
collection :approved_categories, as: 'approvedCategories'
|
145
|
+
property :apr_display, as: 'aprDisplay'
|
146
|
+
property :balance_computation_method, as: 'balanceComputationMethod'
|
147
|
+
property :balance_transfer_terms, as: 'balanceTransferTerms'
|
148
|
+
collection :bonus_rewards, as: 'bonusRewards', class: Google::Apis::GanV1beta1::CcOffer::BonusReward, decorator: Google::Apis::GanV1beta1::CcOffer::BonusReward::Representation
|
149
|
+
|
150
|
+
property :car_rental_insurance, as: 'carRentalInsurance'
|
151
|
+
collection :card_benefits, as: 'cardBenefits'
|
152
|
+
property :card_name, as: 'cardName'
|
153
|
+
property :card_type, as: 'cardType'
|
154
|
+
property :cash_advance_terms, as: 'cashAdvanceTerms'
|
155
|
+
property :credit_limit_max, as: 'creditLimitMax'
|
156
|
+
property :credit_limit_min, as: 'creditLimitMin'
|
157
|
+
property :credit_rating_display, as: 'creditRatingDisplay'
|
158
|
+
collection :default_fees, as: 'defaultFees', class: Google::Apis::GanV1beta1::CcOffer::DefaultFee, decorator: Google::Apis::GanV1beta1::CcOffer::DefaultFee::Representation
|
159
|
+
|
160
|
+
property :disclaimer, as: 'disclaimer'
|
161
|
+
property :emergency_insurance, as: 'emergencyInsurance'
|
162
|
+
property :existing_customer_only, as: 'existingCustomerOnly'
|
163
|
+
property :extended_warranty, as: 'extendedWarranty'
|
164
|
+
property :first_year_annual_fee, as: 'firstYearAnnualFee'
|
165
|
+
property :flight_accident_insurance, as: 'flightAccidentInsurance'
|
166
|
+
property :foreign_currency_transaction_fee, as: 'foreignCurrencyTransactionFee'
|
167
|
+
property :fraud_liability, as: 'fraudLiability'
|
168
|
+
property :grace_period_display, as: 'gracePeriodDisplay'
|
169
|
+
property :image_url, as: 'imageUrl'
|
170
|
+
property :initial_setup_and_processing_fee, as: 'initialSetupAndProcessingFee'
|
171
|
+
property :intro_balance_transfer_terms, as: 'introBalanceTransferTerms'
|
172
|
+
property :intro_cash_advance_terms, as: 'introCashAdvanceTerms'
|
173
|
+
property :intro_purchase_terms, as: 'introPurchaseTerms'
|
174
|
+
property :issuer, as: 'issuer'
|
175
|
+
property :issuer_id, as: 'issuerId'
|
176
|
+
property :issuer_website, as: 'issuerWebsite'
|
177
|
+
property :kind, as: 'kind'
|
178
|
+
property :landing_page_url, as: 'landingPageUrl'
|
179
|
+
property :late_payment_fee, as: 'latePaymentFee'
|
180
|
+
property :luggage_insurance, as: 'luggageInsurance'
|
181
|
+
property :max_purchase_rate, as: 'maxPurchaseRate'
|
182
|
+
property :min_purchase_rate, as: 'minPurchaseRate'
|
183
|
+
property :minimum_finance_charge, as: 'minimumFinanceCharge'
|
184
|
+
property :network, as: 'network'
|
185
|
+
property :offer_id, as: 'offerId'
|
186
|
+
property :offers_immediate_cash_reward, as: 'offersImmediateCashReward'
|
187
|
+
property :over_limit_fee, as: 'overLimitFee'
|
188
|
+
collection :prohibited_categories, as: 'prohibitedCategories'
|
189
|
+
property :purchase_rate_additional_details, as: 'purchaseRateAdditionalDetails'
|
190
|
+
property :purchase_rate_type, as: 'purchaseRateType'
|
191
|
+
property :returned_payment_fee, as: 'returnedPaymentFee'
|
192
|
+
property :reward_partner, as: 'rewardPartner'
|
193
|
+
property :reward_unit, as: 'rewardUnit'
|
194
|
+
collection :rewards, as: 'rewards', class: Google::Apis::GanV1beta1::CcOffer::Reward, decorator: Google::Apis::GanV1beta1::CcOffer::Reward::Representation
|
195
|
+
|
196
|
+
property :rewards_expire, as: 'rewardsExpire'
|
197
|
+
property :rewards_have_blackout_dates, as: 'rewardsHaveBlackoutDates'
|
198
|
+
property :statement_copy_fee, as: 'statementCopyFee'
|
199
|
+
property :tracking_url, as: 'trackingUrl'
|
200
|
+
property :travel_insurance, as: 'travelInsurance'
|
201
|
+
property :variable_rates_last_updated, as: 'variableRatesLastUpdated'
|
202
|
+
property :variable_rates_update_frequency, as: 'variableRatesUpdateFrequency'
|
203
|
+
end
|
204
|
+
|
205
|
+
class BonusReward
|
206
|
+
# @private
|
207
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
208
|
+
property :amount, as: 'amount'
|
209
|
+
property :details, as: 'details'
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
class DefaultFee
|
214
|
+
# @private
|
215
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
216
|
+
property :category, as: 'category'
|
217
|
+
property :max_rate, as: 'maxRate'
|
218
|
+
property :min_rate, as: 'minRate'
|
219
|
+
property :rate_type, as: 'rateType'
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
class Reward
|
224
|
+
# @private
|
225
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
226
|
+
property :additional_details, as: 'additionalDetails'
|
227
|
+
property :amount, as: 'amount'
|
228
|
+
property :category, as: 'category'
|
229
|
+
property :expiration_months, as: 'expirationMonths'
|
230
|
+
property :max_reward_tier, as: 'maxRewardTier'
|
231
|
+
property :min_reward_tier, as: 'minRewardTier'
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
class CcOffers
|
237
|
+
# @private
|
238
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
239
|
+
collection :items, as: 'items', class: Google::Apis::GanV1beta1::CcOffer, decorator: Google::Apis::GanV1beta1::CcOffer::Representation
|
240
|
+
|
241
|
+
property :kind, as: 'kind'
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
class Event
|
246
|
+
# @private
|
247
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
248
|
+
property :advertiser_id, as: 'advertiserId'
|
249
|
+
property :advertiser_name, as: 'advertiserName'
|
250
|
+
property :charge_id, as: 'chargeId'
|
251
|
+
property :charge_type, as: 'chargeType'
|
252
|
+
property :commissionable_sales, as: 'commissionableSales', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
253
|
+
|
254
|
+
property :earnings, as: 'earnings', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
255
|
+
|
256
|
+
property :event_date, as: 'eventDate', type: DateTime
|
257
|
+
|
258
|
+
property :kind, as: 'kind'
|
259
|
+
property :member_id, as: 'memberId'
|
260
|
+
property :modify_date, as: 'modifyDate', type: DateTime
|
261
|
+
|
262
|
+
property :network_fee, as: 'networkFee', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
263
|
+
|
264
|
+
property :order_id, as: 'orderId'
|
265
|
+
collection :products, as: 'products', class: Google::Apis::GanV1beta1::Event::Product, decorator: Google::Apis::GanV1beta1::Event::Product::Representation
|
266
|
+
|
267
|
+
property :publisher_fee, as: 'publisherFee', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
268
|
+
|
269
|
+
property :publisher_id, as: 'publisherId'
|
270
|
+
property :publisher_name, as: 'publisherName'
|
271
|
+
property :status, as: 'status'
|
272
|
+
property :type, as: 'type'
|
273
|
+
end
|
274
|
+
|
275
|
+
class Product
|
276
|
+
# @private
|
277
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
278
|
+
property :category_id, as: 'categoryId'
|
279
|
+
property :category_name, as: 'categoryName'
|
280
|
+
property :earnings, as: 'earnings', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
281
|
+
|
282
|
+
property :network_fee, as: 'networkFee', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
283
|
+
|
284
|
+
property :publisher_fee, as: 'publisherFee', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
285
|
+
|
286
|
+
property :quantity, as: 'quantity'
|
287
|
+
property :sku, as: 'sku'
|
288
|
+
property :sku_name, as: 'skuName'
|
289
|
+
property :unit_price, as: 'unitPrice', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
290
|
+
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
class Events
|
296
|
+
# @private
|
297
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
298
|
+
collection :items, as: 'items', class: Google::Apis::GanV1beta1::Event, decorator: Google::Apis::GanV1beta1::Event::Representation
|
299
|
+
|
300
|
+
property :kind, as: 'kind'
|
301
|
+
property :next_page_token, as: 'nextPageToken'
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
class Link
|
306
|
+
# @private
|
307
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
308
|
+
property :advertiser_id, as: 'advertiserId'
|
309
|
+
property :authorship, as: 'authorship'
|
310
|
+
property :availability, as: 'availability'
|
311
|
+
property :click_tracking_url, as: 'clickTrackingUrl'
|
312
|
+
property :create_date, as: 'createDate', type: DateTime
|
313
|
+
|
314
|
+
property :description, as: 'description'
|
315
|
+
property :destination_url, as: 'destinationUrl'
|
316
|
+
property :duration, as: 'duration'
|
317
|
+
property :end_date, as: 'endDate', type: DateTime
|
318
|
+
|
319
|
+
property :epc_ninety_day_average, as: 'epcNinetyDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
320
|
+
|
321
|
+
property :epc_seven_day_average, as: 'epcSevenDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
322
|
+
|
323
|
+
property :id, as: 'id'
|
324
|
+
property :image_alt_text, as: 'imageAltText'
|
325
|
+
property :impression_tracking_url, as: 'impressionTrackingUrl'
|
326
|
+
property :is_active, as: 'isActive'
|
327
|
+
property :kind, as: 'kind'
|
328
|
+
property :link_type, as: 'linkType'
|
329
|
+
property :name, as: 'name'
|
330
|
+
property :promotion_type, as: 'promotionType'
|
331
|
+
property :special_offers, as: 'specialOffers', class: Google::Apis::GanV1beta1::Link::SpecialOffers, decorator: Google::Apis::GanV1beta1::Link::SpecialOffers::Representation
|
332
|
+
|
333
|
+
property :start_date, as: 'startDate', type: DateTime
|
334
|
+
|
335
|
+
end
|
336
|
+
|
337
|
+
class SpecialOffers
|
338
|
+
# @private
|
339
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
340
|
+
property :free_gift, as: 'freeGift'
|
341
|
+
property :free_shipping, as: 'freeShipping'
|
342
|
+
property :free_shipping_min, as: 'freeShippingMin', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
343
|
+
|
344
|
+
property :percent_off, as: 'percentOff'
|
345
|
+
property :percent_off_min, as: 'percentOffMin', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
346
|
+
|
347
|
+
property :price_cut, as: 'priceCut', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
348
|
+
|
349
|
+
property :price_cut_min, as: 'priceCutMin', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
350
|
+
|
351
|
+
collection :promotion_codes, as: 'promotionCodes'
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
class Links
|
357
|
+
# @private
|
358
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
359
|
+
collection :items, as: 'items', class: Google::Apis::GanV1beta1::Link, decorator: Google::Apis::GanV1beta1::Link::Representation
|
360
|
+
|
361
|
+
property :kind, as: 'kind'
|
362
|
+
property :next_page_token, as: 'nextPageToken'
|
363
|
+
end
|
364
|
+
end
|
365
|
+
|
366
|
+
class Money
|
367
|
+
# @private
|
368
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
369
|
+
property :amount, as: 'amount'
|
370
|
+
property :currency_code, as: 'currencyCode'
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
class Publisher
|
375
|
+
# @private
|
376
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
377
|
+
property :classification, as: 'classification'
|
378
|
+
property :epc_ninety_day_average, as: 'epcNinetyDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
379
|
+
|
380
|
+
property :epc_seven_day_average, as: 'epcSevenDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation
|
381
|
+
|
382
|
+
property :id, as: 'id'
|
383
|
+
property :item, as: 'item', class: Google::Apis::GanV1beta1::Publisher, decorator: Google::Apis::GanV1beta1::Publisher::Representation
|
384
|
+
|
385
|
+
property :join_date, as: 'joinDate', type: DateTime
|
386
|
+
|
387
|
+
property :kind, as: 'kind'
|
388
|
+
property :name, as: 'name'
|
389
|
+
property :payout_rank, as: 'payoutRank'
|
390
|
+
collection :sites, as: 'sites'
|
391
|
+
property :status, as: 'status'
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
class Publishers
|
396
|
+
# @private
|
397
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
398
|
+
collection :items, as: 'items', class: Google::Apis::GanV1beta1::Publisher, decorator: Google::Apis::GanV1beta1::Publisher::Representation
|
399
|
+
|
400
|
+
property :kind, as: 'kind'
|
401
|
+
property :next_page_token, as: 'nextPageToken'
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
405
|
+
class Report
|
406
|
+
# @private
|
407
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
408
|
+
collection :column_names, as: 'column_names'
|
409
|
+
property :end_date, as: 'end_date'
|
410
|
+
property :kind, as: 'kind'
|
411
|
+
property :matching_row_count, as: 'matching_row_count'
|
412
|
+
collection :rows, as: 'rows', :class => Array do
|
413
|
+
include Representable::JSON::Collection
|
414
|
+
items
|
415
|
+
end
|
416
|
+
|
417
|
+
property :start_date, as: 'start_date'
|
418
|
+
collection :totals_rows, as: 'totals_rows', :class => Array do
|
419
|
+
include Representable::JSON::Collection
|
420
|
+
items
|
421
|
+
end
|
422
|
+
|
423
|
+
property :type, as: 'type'
|
424
|
+
end
|
425
|
+
end
|
426
|
+
end
|
427
|
+
end
|
428
|
+
end
|
@@ -0,0 +1,692 @@
|
|
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 GanV1beta1
|
23
|
+
# Google Affiliate Network API
|
24
|
+
#
|
25
|
+
# Lets you have programmatic access to your Google Affiliate Network data.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/gan_v1beta1'
|
29
|
+
#
|
30
|
+
# Gan = Google::Apis::GanV1beta1 # Alias the module
|
31
|
+
# service = Gan::GanService.new
|
32
|
+
#
|
33
|
+
# @see https://developers.google.com/affiliate-network/
|
34
|
+
class GanService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
# Overrides userIp if both are provided.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
# @return [String]
|
47
|
+
# IP address of the site where the request originates. Use this if you want to
|
48
|
+
# enforce per-user limits.
|
49
|
+
attr_accessor :user_ip
|
50
|
+
|
51
|
+
def initialize
|
52
|
+
super('https://www.googleapis.com/', 'gan/v1beta1/')
|
53
|
+
end
|
54
|
+
|
55
|
+
# Retrieves data about a single advertiser if that the requesting advertiser/
|
56
|
+
# publisher has access to it. Only publishers can lookup advertisers.
|
57
|
+
# Advertisers can request information about themselves by omitting the
|
58
|
+
# advertiserId query parameter.
|
59
|
+
# @param [String] role
|
60
|
+
# The role of the requester. Valid values: 'advertisers' or 'publishers'.
|
61
|
+
# @param [String] role_id
|
62
|
+
# The ID of the requesting advertiser or publisher.
|
63
|
+
# @param [String] advertiser_id
|
64
|
+
# The ID of the advertiser to look up. Optional.
|
65
|
+
# @param [String] fields
|
66
|
+
# Selector specifying which fields to include in a partial response.
|
67
|
+
# @param [String] quota_user
|
68
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
69
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
70
|
+
# Overrides userIp if both are provided.
|
71
|
+
# @param [String] user_ip
|
72
|
+
# IP address of the site where the request originates. Use this if you want to
|
73
|
+
# enforce per-user limits.
|
74
|
+
# @param [Google::Apis::RequestOptions] options
|
75
|
+
# Request-specific options
|
76
|
+
#
|
77
|
+
# @yield [result, err] Result & error if block supplied
|
78
|
+
# @yieldparam result [Google::Apis::GanV1beta1::Advertiser] parsed result object
|
79
|
+
# @yieldparam err [StandardError] error object if request failed
|
80
|
+
#
|
81
|
+
# @return [Google::Apis::GanV1beta1::Advertiser]
|
82
|
+
#
|
83
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
84
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
85
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
86
|
+
def get_advertiser(role, role_id, advertiser_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
87
|
+
path = '{role}/{roleId}/advertiser'
|
88
|
+
command = make_simple_command(:get, path, options)
|
89
|
+
command.response_representation = Google::Apis::GanV1beta1::Advertiser::Representation
|
90
|
+
command.response_class = Google::Apis::GanV1beta1::Advertiser
|
91
|
+
command.params['role'] = role unless role.nil?
|
92
|
+
command.params['roleId'] = role_id unless role_id.nil?
|
93
|
+
command.query['advertiserId'] = advertiser_id unless advertiser_id.nil?
|
94
|
+
command.query['fields'] = fields unless fields.nil?
|
95
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
96
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
97
|
+
execute_or_queue_command(command, &block)
|
98
|
+
end
|
99
|
+
|
100
|
+
# Retrieves data about all advertisers that the requesting advertiser/publisher
|
101
|
+
# has access to.
|
102
|
+
# @param [String] role
|
103
|
+
# The role of the requester. Valid values: 'advertisers' or 'publishers'.
|
104
|
+
# @param [String] role_id
|
105
|
+
# The ID of the requesting advertiser or publisher.
|
106
|
+
# @param [String] advertiser_category
|
107
|
+
# Caret(^) delimted list of advertiser categories. Valid categories are defined
|
108
|
+
# here: http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?
|
109
|
+
# hl=en&answer=107581. Filters out all advertisers not in one of the given
|
110
|
+
# advertiser categories. Optional.
|
111
|
+
# @param [Fixnum] max_results
|
112
|
+
# Max number of items to return in this page. Optional. Defaults to 20.
|
113
|
+
# @param [Float] min_ninety_day_epc
|
114
|
+
# Filters out all advertisers that have a ninety day EPC average lower than the
|
115
|
+
# given value (inclusive). Min value: 0.0. Optional.
|
116
|
+
# @param [Fixnum] min_payout_rank
|
117
|
+
# A value between 1 and 4, where 1 represents the quartile of advertisers with
|
118
|
+
# the lowest ranks and 4 represents the quartile of advertisers with the highest
|
119
|
+
# ranks. Filters out all advertisers with a lower rank than the given quartile.
|
120
|
+
# For example if a 2 was given only advertisers with a payout rank of 25 or
|
121
|
+
# higher would be included. Optional.
|
122
|
+
# @param [Float] min_seven_day_epc
|
123
|
+
# Filters out all advertisers that have a seven day EPC average lower than the
|
124
|
+
# given value (inclusive). Min value: 0.0. Optional.
|
125
|
+
# @param [String] page_token
|
126
|
+
# The value of 'nextPageToken' from the previous page. Optional.
|
127
|
+
# @param [String] relationship_status
|
128
|
+
# Filters out all advertisers for which do not have the given relationship
|
129
|
+
# status with the requesting publisher.
|
130
|
+
# @param [String] fields
|
131
|
+
# Selector specifying which fields to include in a partial response.
|
132
|
+
# @param [String] quota_user
|
133
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
134
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
135
|
+
# Overrides userIp if both are provided.
|
136
|
+
# @param [String] user_ip
|
137
|
+
# IP address of the site where the request originates. Use this if you want to
|
138
|
+
# enforce per-user limits.
|
139
|
+
# @param [Google::Apis::RequestOptions] options
|
140
|
+
# Request-specific options
|
141
|
+
#
|
142
|
+
# @yield [result, err] Result & error if block supplied
|
143
|
+
# @yieldparam result [Google::Apis::GanV1beta1::Advertisers] parsed result object
|
144
|
+
# @yieldparam err [StandardError] error object if request failed
|
145
|
+
#
|
146
|
+
# @return [Google::Apis::GanV1beta1::Advertisers]
|
147
|
+
#
|
148
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
149
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
150
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
151
|
+
def list_advertisers(role, role_id, advertiser_category: nil, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
152
|
+
path = '{role}/{roleId}/advertisers'
|
153
|
+
command = make_simple_command(:get, path, options)
|
154
|
+
command.response_representation = Google::Apis::GanV1beta1::Advertisers::Representation
|
155
|
+
command.response_class = Google::Apis::GanV1beta1::Advertisers
|
156
|
+
command.params['role'] = role unless role.nil?
|
157
|
+
command.params['roleId'] = role_id unless role_id.nil?
|
158
|
+
command.query['advertiserCategory'] = advertiser_category unless advertiser_category.nil?
|
159
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
160
|
+
command.query['minNinetyDayEpc'] = min_ninety_day_epc unless min_ninety_day_epc.nil?
|
161
|
+
command.query['minPayoutRank'] = min_payout_rank unless min_payout_rank.nil?
|
162
|
+
command.query['minSevenDayEpc'] = min_seven_day_epc unless min_seven_day_epc.nil?
|
163
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
164
|
+
command.query['relationshipStatus'] = relationship_status unless relationship_status.nil?
|
165
|
+
command.query['fields'] = fields unless fields.nil?
|
166
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
167
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
168
|
+
execute_or_queue_command(command, &block)
|
169
|
+
end
|
170
|
+
|
171
|
+
# Retrieves credit card offers for the given publisher.
|
172
|
+
# @param [String] publisher
|
173
|
+
# The ID of the publisher in question.
|
174
|
+
# @param [Array<String>, String] advertiser
|
175
|
+
# The advertiser ID of a card issuer whose offers to include. Optional, may be
|
176
|
+
# repeated.
|
177
|
+
# @param [String] projection
|
178
|
+
# The set of fields to return.
|
179
|
+
# @param [String] fields
|
180
|
+
# Selector specifying which fields to include in a partial response.
|
181
|
+
# @param [String] quota_user
|
182
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
183
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
184
|
+
# Overrides userIp if both are provided.
|
185
|
+
# @param [String] user_ip
|
186
|
+
# IP address of the site where the request originates. Use this if you want to
|
187
|
+
# enforce per-user limits.
|
188
|
+
# @param [Google::Apis::RequestOptions] options
|
189
|
+
# Request-specific options
|
190
|
+
#
|
191
|
+
# @yield [result, err] Result & error if block supplied
|
192
|
+
# @yieldparam result [Google::Apis::GanV1beta1::CcOffers] parsed result object
|
193
|
+
# @yieldparam err [StandardError] error object if request failed
|
194
|
+
#
|
195
|
+
# @return [Google::Apis::GanV1beta1::CcOffers]
|
196
|
+
#
|
197
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
198
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
199
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
200
|
+
def list_cc_offers(publisher, advertiser: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
201
|
+
path = 'publishers/{publisher}/ccOffers'
|
202
|
+
command = make_simple_command(:get, path, options)
|
203
|
+
command.response_representation = Google::Apis::GanV1beta1::CcOffers::Representation
|
204
|
+
command.response_class = Google::Apis::GanV1beta1::CcOffers
|
205
|
+
command.params['publisher'] = publisher unless publisher.nil?
|
206
|
+
command.query['advertiser'] = advertiser unless advertiser.nil?
|
207
|
+
command.query['projection'] = projection unless projection.nil?
|
208
|
+
command.query['fields'] = fields unless fields.nil?
|
209
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
210
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
211
|
+
execute_or_queue_command(command, &block)
|
212
|
+
end
|
213
|
+
|
214
|
+
# Retrieves event data for a given advertiser/publisher.
|
215
|
+
# @param [String] role
|
216
|
+
# The role of the requester. Valid values: 'advertisers' or 'publishers'.
|
217
|
+
# @param [String] role_id
|
218
|
+
# The ID of the requesting advertiser or publisher.
|
219
|
+
# @param [String] advertiser_id
|
220
|
+
# Caret(^) delimited list of advertiser IDs. Filters out all events that do not
|
221
|
+
# reference one of the given advertiser IDs. Only used when under publishers
|
222
|
+
# role. Optional.
|
223
|
+
# @param [String] charge_type
|
224
|
+
# Filters out all charge events that are not of the given charge type. Valid
|
225
|
+
# values: 'other', 'slotting_fee', 'monthly_minimum', 'tier_bonus', 'credit', '
|
226
|
+
# debit'. Optional.
|
227
|
+
# @param [String] event_date_max
|
228
|
+
# Filters out all events later than given date. Optional. Defaults to 24 hours
|
229
|
+
# after eventMin.
|
230
|
+
# @param [String] event_date_min
|
231
|
+
# Filters out all events earlier than given date. Optional. Defaults to 24 hours
|
232
|
+
# from current date/time.
|
233
|
+
# @param [String] link_id
|
234
|
+
# Caret(^) delimited list of link IDs. Filters out all events that do not
|
235
|
+
# reference one of the given link IDs. Optional.
|
236
|
+
# @param [Fixnum] max_results
|
237
|
+
# Max number of offers to return in this page. Optional. Defaults to 20.
|
238
|
+
# @param [String] member_id
|
239
|
+
# Caret(^) delimited list of member IDs. Filters out all events that do not
|
240
|
+
# reference one of the given member IDs. Optional.
|
241
|
+
# @param [String] modify_date_max
|
242
|
+
# Filters out all events modified later than given date. Optional. Defaults to
|
243
|
+
# 24 hours after modifyDateMin, if modifyDateMin is explicitly set.
|
244
|
+
# @param [String] modify_date_min
|
245
|
+
# Filters out all events modified earlier than given date. Optional. Defaults to
|
246
|
+
# 24 hours before the current modifyDateMax, if modifyDateMax is explicitly set.
|
247
|
+
# @param [String] order_id
|
248
|
+
# Caret(^) delimited list of order IDs. Filters out all events that do not
|
249
|
+
# reference one of the given order IDs. Optional.
|
250
|
+
# @param [String] page_token
|
251
|
+
# The value of 'nextPageToken' from the previous page. Optional.
|
252
|
+
# @param [String] product_category
|
253
|
+
# Caret(^) delimited list of product categories. Filters out all events that do
|
254
|
+
# not reference a product in one of the given product categories. Optional.
|
255
|
+
# @param [String] publisher_id
|
256
|
+
# Caret(^) delimited list of publisher IDs. Filters out all events that do not
|
257
|
+
# reference one of the given publishers IDs. Only used when under advertiser
|
258
|
+
# role. Optional.
|
259
|
+
# @param [String] sku
|
260
|
+
# Caret(^) delimited list of SKUs. Filters out all events that do not reference
|
261
|
+
# one of the given SKU. Optional.
|
262
|
+
# @param [String] status
|
263
|
+
# Filters out all events that do not have the given status. Valid values: '
|
264
|
+
# active', 'canceled'. Optional.
|
265
|
+
# @param [String] type
|
266
|
+
# Filters out all events that are not of the given type. Valid values: 'action',
|
267
|
+
# 'transaction', 'charge'. Optional.
|
268
|
+
# @param [String] fields
|
269
|
+
# Selector specifying which fields to include in a partial response.
|
270
|
+
# @param [String] quota_user
|
271
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
272
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
273
|
+
# Overrides userIp if both are provided.
|
274
|
+
# @param [String] user_ip
|
275
|
+
# IP address of the site where the request originates. Use this if you want to
|
276
|
+
# enforce per-user limits.
|
277
|
+
# @param [Google::Apis::RequestOptions] options
|
278
|
+
# Request-specific options
|
279
|
+
#
|
280
|
+
# @yield [result, err] Result & error if block supplied
|
281
|
+
# @yieldparam result [Google::Apis::GanV1beta1::Events] parsed result object
|
282
|
+
# @yieldparam err [StandardError] error object if request failed
|
283
|
+
#
|
284
|
+
# @return [Google::Apis::GanV1beta1::Events]
|
285
|
+
#
|
286
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
287
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
288
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
289
|
+
def list_events(role, role_id, advertiser_id: nil, charge_type: nil, event_date_max: nil, event_date_min: nil, link_id: nil, max_results: nil, member_id: nil, modify_date_max: nil, modify_date_min: nil, order_id: nil, page_token: nil, product_category: nil, publisher_id: nil, sku: nil, status: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
290
|
+
path = '{role}/{roleId}/events'
|
291
|
+
command = make_simple_command(:get, path, options)
|
292
|
+
command.response_representation = Google::Apis::GanV1beta1::Events::Representation
|
293
|
+
command.response_class = Google::Apis::GanV1beta1::Events
|
294
|
+
command.params['role'] = role unless role.nil?
|
295
|
+
command.params['roleId'] = role_id unless role_id.nil?
|
296
|
+
command.query['advertiserId'] = advertiser_id unless advertiser_id.nil?
|
297
|
+
command.query['chargeType'] = charge_type unless charge_type.nil?
|
298
|
+
command.query['eventDateMax'] = event_date_max unless event_date_max.nil?
|
299
|
+
command.query['eventDateMin'] = event_date_min unless event_date_min.nil?
|
300
|
+
command.query['linkId'] = link_id unless link_id.nil?
|
301
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
302
|
+
command.query['memberId'] = member_id unless member_id.nil?
|
303
|
+
command.query['modifyDateMax'] = modify_date_max unless modify_date_max.nil?
|
304
|
+
command.query['modifyDateMin'] = modify_date_min unless modify_date_min.nil?
|
305
|
+
command.query['orderId'] = order_id unless order_id.nil?
|
306
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
307
|
+
command.query['productCategory'] = product_category unless product_category.nil?
|
308
|
+
command.query['publisherId'] = publisher_id unless publisher_id.nil?
|
309
|
+
command.query['sku'] = sku unless sku.nil?
|
310
|
+
command.query['status'] = status unless status.nil?
|
311
|
+
command.query['type'] = type unless type.nil?
|
312
|
+
command.query['fields'] = fields unless fields.nil?
|
313
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
314
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
315
|
+
execute_or_queue_command(command, &block)
|
316
|
+
end
|
317
|
+
|
318
|
+
# Retrieves data about a single link if the requesting advertiser/publisher has
|
319
|
+
# access to it. Advertisers can look up their own links. Publishers can look up
|
320
|
+
# visible links or links belonging to advertisers they are in a relationship
|
321
|
+
# with.
|
322
|
+
# @param [String] role
|
323
|
+
# The role of the requester. Valid values: 'advertisers' or 'publishers'.
|
324
|
+
# @param [String] role_id
|
325
|
+
# The ID of the requesting advertiser or publisher.
|
326
|
+
# @param [String] link_id
|
327
|
+
# The ID of the link to look up.
|
328
|
+
# @param [String] fields
|
329
|
+
# Selector specifying which fields to include in a partial response.
|
330
|
+
# @param [String] quota_user
|
331
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
332
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
333
|
+
# Overrides userIp if both are provided.
|
334
|
+
# @param [String] user_ip
|
335
|
+
# IP address of the site where the request originates. Use this if you want to
|
336
|
+
# enforce per-user limits.
|
337
|
+
# @param [Google::Apis::RequestOptions] options
|
338
|
+
# Request-specific options
|
339
|
+
#
|
340
|
+
# @yield [result, err] Result & error if block supplied
|
341
|
+
# @yieldparam result [Google::Apis::GanV1beta1::Link] parsed result object
|
342
|
+
# @yieldparam err [StandardError] error object if request failed
|
343
|
+
#
|
344
|
+
# @return [Google::Apis::GanV1beta1::Link]
|
345
|
+
#
|
346
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
347
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
348
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
349
|
+
def get_link(role, role_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
350
|
+
path = '{role}/{roleId}/link/{linkId}'
|
351
|
+
command = make_simple_command(:get, path, options)
|
352
|
+
command.response_representation = Google::Apis::GanV1beta1::Link::Representation
|
353
|
+
command.response_class = Google::Apis::GanV1beta1::Link
|
354
|
+
command.params['role'] = role unless role.nil?
|
355
|
+
command.params['roleId'] = role_id unless role_id.nil?
|
356
|
+
command.params['linkId'] = link_id unless link_id.nil?
|
357
|
+
command.query['fields'] = fields unless fields.nil?
|
358
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
359
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
360
|
+
execute_or_queue_command(command, &block)
|
361
|
+
end
|
362
|
+
|
363
|
+
# Inserts a new link.
|
364
|
+
# @param [String] role
|
365
|
+
# The role of the requester. Valid values: 'advertisers' or 'publishers'.
|
366
|
+
# @param [String] role_id
|
367
|
+
# The ID of the requesting advertiser or publisher.
|
368
|
+
# @param [Google::Apis::GanV1beta1::Link] link_object
|
369
|
+
# @param [String] fields
|
370
|
+
# Selector specifying which fields to include in a partial response.
|
371
|
+
# @param [String] quota_user
|
372
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
373
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
374
|
+
# Overrides userIp if both are provided.
|
375
|
+
# @param [String] user_ip
|
376
|
+
# IP address of the site where the request originates. Use this if you want to
|
377
|
+
# enforce per-user limits.
|
378
|
+
# @param [Google::Apis::RequestOptions] options
|
379
|
+
# Request-specific options
|
380
|
+
#
|
381
|
+
# @yield [result, err] Result & error if block supplied
|
382
|
+
# @yieldparam result [Google::Apis::GanV1beta1::Link] parsed result object
|
383
|
+
# @yieldparam err [StandardError] error object if request failed
|
384
|
+
#
|
385
|
+
# @return [Google::Apis::GanV1beta1::Link]
|
386
|
+
#
|
387
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
388
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
389
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
390
|
+
def insert_link(role, role_id, link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
391
|
+
path = '{role}/{roleId}/link'
|
392
|
+
command = make_simple_command(:post, path, options)
|
393
|
+
command.request_representation = Google::Apis::GanV1beta1::Link::Representation
|
394
|
+
command.request_object = link_object
|
395
|
+
command.response_representation = Google::Apis::GanV1beta1::Link::Representation
|
396
|
+
command.response_class = Google::Apis::GanV1beta1::Link
|
397
|
+
command.params['role'] = role unless role.nil?
|
398
|
+
command.params['roleId'] = role_id unless role_id.nil?
|
399
|
+
command.query['fields'] = fields unless fields.nil?
|
400
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
401
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
402
|
+
execute_or_queue_command(command, &block)
|
403
|
+
end
|
404
|
+
|
405
|
+
# Retrieves all links that match the query parameters.
|
406
|
+
# @param [String] role
|
407
|
+
# The role of the requester. Valid values: 'advertisers' or 'publishers'.
|
408
|
+
# @param [String] role_id
|
409
|
+
# The ID of the requesting advertiser or publisher.
|
410
|
+
# @param [Array<String>, String] advertiser_id
|
411
|
+
# Limits the resulting links to the ones belonging to the listed advertisers.
|
412
|
+
# @param [Array<String>, String] asset_size
|
413
|
+
# The size of the given asset.
|
414
|
+
# @param [String] authorship
|
415
|
+
# The role of the author of the link.
|
416
|
+
# @param [String] create_date_max
|
417
|
+
# The end of the create date range.
|
418
|
+
# @param [String] create_date_min
|
419
|
+
# The beginning of the create date range.
|
420
|
+
# @param [String] link_type
|
421
|
+
# The type of the link.
|
422
|
+
# @param [Fixnum] max_results
|
423
|
+
# Max number of items to return in this page. Optional. Defaults to 20.
|
424
|
+
# @param [String] page_token
|
425
|
+
# The value of 'nextPageToken' from the previous page. Optional.
|
426
|
+
# @param [Array<String>, String] promotion_type
|
427
|
+
# The promotion type.
|
428
|
+
# @param [String] relationship_status
|
429
|
+
# The status of the relationship.
|
430
|
+
# @param [String] search_text
|
431
|
+
# Field for full text search across title and merchandising text, supports link
|
432
|
+
# id search.
|
433
|
+
# @param [String] start_date_max
|
434
|
+
# The end of the start date range.
|
435
|
+
# @param [String] start_date_min
|
436
|
+
# The beginning of the start date range.
|
437
|
+
# @param [String] fields
|
438
|
+
# Selector specifying which fields to include in a partial response.
|
439
|
+
# @param [String] quota_user
|
440
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
441
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
442
|
+
# Overrides userIp if both are provided.
|
443
|
+
# @param [String] user_ip
|
444
|
+
# IP address of the site where the request originates. Use this if you want to
|
445
|
+
# enforce per-user limits.
|
446
|
+
# @param [Google::Apis::RequestOptions] options
|
447
|
+
# Request-specific options
|
448
|
+
#
|
449
|
+
# @yield [result, err] Result & error if block supplied
|
450
|
+
# @yieldparam result [Google::Apis::GanV1beta1::Links] parsed result object
|
451
|
+
# @yieldparam err [StandardError] error object if request failed
|
452
|
+
#
|
453
|
+
# @return [Google::Apis::GanV1beta1::Links]
|
454
|
+
#
|
455
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
456
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
457
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
458
|
+
def list_links(role, role_id, advertiser_id: nil, asset_size: nil, authorship: nil, create_date_max: nil, create_date_min: nil, link_type: nil, max_results: nil, page_token: nil, promotion_type: nil, relationship_status: nil, search_text: nil, start_date_max: nil, start_date_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
459
|
+
path = '{role}/{roleId}/links'
|
460
|
+
command = make_simple_command(:get, path, options)
|
461
|
+
command.response_representation = Google::Apis::GanV1beta1::Links::Representation
|
462
|
+
command.response_class = Google::Apis::GanV1beta1::Links
|
463
|
+
command.params['role'] = role unless role.nil?
|
464
|
+
command.params['roleId'] = role_id unless role_id.nil?
|
465
|
+
command.query['advertiserId'] = advertiser_id unless advertiser_id.nil?
|
466
|
+
command.query['assetSize'] = asset_size unless asset_size.nil?
|
467
|
+
command.query['authorship'] = authorship unless authorship.nil?
|
468
|
+
command.query['createDateMax'] = create_date_max unless create_date_max.nil?
|
469
|
+
command.query['createDateMin'] = create_date_min unless create_date_min.nil?
|
470
|
+
command.query['linkType'] = link_type unless link_type.nil?
|
471
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
472
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
473
|
+
command.query['promotionType'] = promotion_type unless promotion_type.nil?
|
474
|
+
command.query['relationshipStatus'] = relationship_status unless relationship_status.nil?
|
475
|
+
command.query['searchText'] = search_text unless search_text.nil?
|
476
|
+
command.query['startDateMax'] = start_date_max unless start_date_max.nil?
|
477
|
+
command.query['startDateMin'] = start_date_min unless start_date_min.nil?
|
478
|
+
command.query['fields'] = fields unless fields.nil?
|
479
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
480
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
481
|
+
execute_or_queue_command(command, &block)
|
482
|
+
end
|
483
|
+
|
484
|
+
# Retrieves data about a single advertiser if that the requesting advertiser/
|
485
|
+
# publisher has access to it. Only advertisers can look up publishers.
|
486
|
+
# Publishers can request information about themselves by omitting the
|
487
|
+
# publisherId query parameter.
|
488
|
+
# @param [String] role
|
489
|
+
# The role of the requester. Valid values: 'advertisers' or 'publishers'.
|
490
|
+
# @param [String] role_id
|
491
|
+
# The ID of the requesting advertiser or publisher.
|
492
|
+
# @param [String] publisher_id
|
493
|
+
# The ID of the publisher to look up. Optional.
|
494
|
+
# @param [String] fields
|
495
|
+
# Selector specifying which fields to include in a partial response.
|
496
|
+
# @param [String] quota_user
|
497
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
498
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
499
|
+
# Overrides userIp if both are provided.
|
500
|
+
# @param [String] user_ip
|
501
|
+
# IP address of the site where the request originates. Use this if you want to
|
502
|
+
# enforce per-user limits.
|
503
|
+
# @param [Google::Apis::RequestOptions] options
|
504
|
+
# Request-specific options
|
505
|
+
#
|
506
|
+
# @yield [result, err] Result & error if block supplied
|
507
|
+
# @yieldparam result [Google::Apis::GanV1beta1::Publisher] parsed result object
|
508
|
+
# @yieldparam err [StandardError] error object if request failed
|
509
|
+
#
|
510
|
+
# @return [Google::Apis::GanV1beta1::Publisher]
|
511
|
+
#
|
512
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
513
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
514
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
515
|
+
def get_publisher(role, role_id, publisher_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
516
|
+
path = '{role}/{roleId}/publisher'
|
517
|
+
command = make_simple_command(:get, path, options)
|
518
|
+
command.response_representation = Google::Apis::GanV1beta1::Publisher::Representation
|
519
|
+
command.response_class = Google::Apis::GanV1beta1::Publisher
|
520
|
+
command.params['role'] = role unless role.nil?
|
521
|
+
command.params['roleId'] = role_id unless role_id.nil?
|
522
|
+
command.query['publisherId'] = publisher_id unless publisher_id.nil?
|
523
|
+
command.query['fields'] = fields unless fields.nil?
|
524
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
525
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
526
|
+
execute_or_queue_command(command, &block)
|
527
|
+
end
|
528
|
+
|
529
|
+
# Retrieves data about all publishers that the requesting advertiser/publisher
|
530
|
+
# has access to.
|
531
|
+
# @param [String] role
|
532
|
+
# The role of the requester. Valid values: 'advertisers' or 'publishers'.
|
533
|
+
# @param [String] role_id
|
534
|
+
# The ID of the requesting advertiser or publisher.
|
535
|
+
# @param [Fixnum] max_results
|
536
|
+
# Max number of items to return in this page. Optional. Defaults to 20.
|
537
|
+
# @param [Float] min_ninety_day_epc
|
538
|
+
# Filters out all publishers that have a ninety day EPC average lower than the
|
539
|
+
# given value (inclusive). Min value: 0.0. Optional.
|
540
|
+
# @param [Fixnum] min_payout_rank
|
541
|
+
# A value between 1 and 4, where 1 represents the quartile of publishers with
|
542
|
+
# the lowest ranks and 4 represents the quartile of publishers with the highest
|
543
|
+
# ranks. Filters out all publishers with a lower rank than the given quartile.
|
544
|
+
# For example if a 2 was given only publishers with a payout rank of 25 or
|
545
|
+
# higher would be included. Optional.
|
546
|
+
# @param [Float] min_seven_day_epc
|
547
|
+
# Filters out all publishers that have a seven day EPC average lower than the
|
548
|
+
# given value (inclusive). Min value 0.0. Optional.
|
549
|
+
# @param [String] page_token
|
550
|
+
# The value of 'nextPageToken' from the previous page. Optional.
|
551
|
+
# @param [String] publisher_category
|
552
|
+
# Caret(^) delimted list of publisher categories. Valid categories: (
|
553
|
+
# unclassified|community_and_content|shopping_and_promotion|loyalty_and_rewards|
|
554
|
+
# network|search_specialist|comparison_shopping|email). Filters out all
|
555
|
+
# publishers not in one of the given advertiser categories. Optional.
|
556
|
+
# @param [String] relationship_status
|
557
|
+
# Filters out all publishers for which do not have the given relationship status
|
558
|
+
# with the requesting publisher.
|
559
|
+
# @param [String] fields
|
560
|
+
# Selector specifying which fields to include in a partial response.
|
561
|
+
# @param [String] quota_user
|
562
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
563
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
564
|
+
# Overrides userIp if both are provided.
|
565
|
+
# @param [String] user_ip
|
566
|
+
# IP address of the site where the request originates. Use this if you want to
|
567
|
+
# enforce per-user limits.
|
568
|
+
# @param [Google::Apis::RequestOptions] options
|
569
|
+
# Request-specific options
|
570
|
+
#
|
571
|
+
# @yield [result, err] Result & error if block supplied
|
572
|
+
# @yieldparam result [Google::Apis::GanV1beta1::Publishers] parsed result object
|
573
|
+
# @yieldparam err [StandardError] error object if request failed
|
574
|
+
#
|
575
|
+
# @return [Google::Apis::GanV1beta1::Publishers]
|
576
|
+
#
|
577
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
578
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
579
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
580
|
+
def list_publishers(role, role_id, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, publisher_category: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
581
|
+
path = '{role}/{roleId}/publishers'
|
582
|
+
command = make_simple_command(:get, path, options)
|
583
|
+
command.response_representation = Google::Apis::GanV1beta1::Publishers::Representation
|
584
|
+
command.response_class = Google::Apis::GanV1beta1::Publishers
|
585
|
+
command.params['role'] = role unless role.nil?
|
586
|
+
command.params['roleId'] = role_id unless role_id.nil?
|
587
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
588
|
+
command.query['minNinetyDayEpc'] = min_ninety_day_epc unless min_ninety_day_epc.nil?
|
589
|
+
command.query['minPayoutRank'] = min_payout_rank unless min_payout_rank.nil?
|
590
|
+
command.query['minSevenDayEpc'] = min_seven_day_epc unless min_seven_day_epc.nil?
|
591
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
592
|
+
command.query['publisherCategory'] = publisher_category unless publisher_category.nil?
|
593
|
+
command.query['relationshipStatus'] = relationship_status unless relationship_status.nil?
|
594
|
+
command.query['fields'] = fields unless fields.nil?
|
595
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
596
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
597
|
+
execute_or_queue_command(command, &block)
|
598
|
+
end
|
599
|
+
|
600
|
+
# Retrieves a report of the specified type.
|
601
|
+
# @param [String] role
|
602
|
+
# The role of the requester. Valid values: 'advertisers' or 'publishers'.
|
603
|
+
# @param [String] role_id
|
604
|
+
# The ID of the requesting advertiser or publisher.
|
605
|
+
# @param [String] report_type
|
606
|
+
# The type of report being requested. Valid values: 'order_delta'. Required.
|
607
|
+
# @param [Array<String>, String] advertiser_id
|
608
|
+
# The IDs of the advertisers to look up, if applicable.
|
609
|
+
# @param [Boolean] calculate_totals
|
610
|
+
# Whether or not to calculate totals rows. Optional.
|
611
|
+
# @param [String] end_date
|
612
|
+
# The end date (exclusive), in RFC 3339 format, for the report data to be
|
613
|
+
# returned. Defaults to one day after startDate, if that is given, or today.
|
614
|
+
# Optional.
|
615
|
+
# @param [String] event_type
|
616
|
+
# Filters out all events that are not of the given type. Valid values: 'action',
|
617
|
+
# 'transaction', or 'charge'. Optional.
|
618
|
+
# @param [Array<String>, String] link_id
|
619
|
+
# Filters to capture one of given link IDs. Optional.
|
620
|
+
# @param [Fixnum] max_results
|
621
|
+
# Max number of items to return in this page. Optional. Defaults to return all
|
622
|
+
# results.
|
623
|
+
# @param [Array<String>, String] order_id
|
624
|
+
# Filters to capture one of the given order IDs. Optional.
|
625
|
+
# @param [Array<String>, String] publisher_id
|
626
|
+
# The IDs of the publishers to look up, if applicable.
|
627
|
+
# @param [String] start_date
|
628
|
+
# The start date (inclusive), in RFC 3339 format, for the report data to be
|
629
|
+
# returned. Defaults to one day before endDate, if that is given, or yesterday.
|
630
|
+
# Optional.
|
631
|
+
# @param [Fixnum] start_index
|
632
|
+
# Offset on which to return results when paging. Optional.
|
633
|
+
# @param [String] status
|
634
|
+
# Filters out all events that do not have the given status. Valid values: '
|
635
|
+
# active', 'canceled', or 'invalid'. Optional.
|
636
|
+
# @param [String] fields
|
637
|
+
# Selector specifying which fields to include in a partial response.
|
638
|
+
# @param [String] quota_user
|
639
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
640
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
641
|
+
# Overrides userIp if both are provided.
|
642
|
+
# @param [String] user_ip
|
643
|
+
# IP address of the site where the request originates. Use this if you want to
|
644
|
+
# enforce per-user limits.
|
645
|
+
# @param [Google::Apis::RequestOptions] options
|
646
|
+
# Request-specific options
|
647
|
+
#
|
648
|
+
# @yield [result, err] Result & error if block supplied
|
649
|
+
# @yieldparam result [Google::Apis::GanV1beta1::Report] parsed result object
|
650
|
+
# @yieldparam err [StandardError] error object if request failed
|
651
|
+
#
|
652
|
+
# @return [Google::Apis::GanV1beta1::Report]
|
653
|
+
#
|
654
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
655
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
656
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
657
|
+
def get_report(role, role_id, report_type, advertiser_id: nil, calculate_totals: nil, end_date: nil, event_type: nil, link_id: nil, max_results: nil, order_id: nil, publisher_id: nil, start_date: nil, start_index: nil, status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
658
|
+
path = '{role}/{roleId}/report/{reportType}'
|
659
|
+
command = make_simple_command(:get, path, options)
|
660
|
+
command.response_representation = Google::Apis::GanV1beta1::Report::Representation
|
661
|
+
command.response_class = Google::Apis::GanV1beta1::Report
|
662
|
+
command.params['role'] = role unless role.nil?
|
663
|
+
command.params['roleId'] = role_id unless role_id.nil?
|
664
|
+
command.params['reportType'] = report_type unless report_type.nil?
|
665
|
+
command.query['advertiserId'] = advertiser_id unless advertiser_id.nil?
|
666
|
+
command.query['calculateTotals'] = calculate_totals unless calculate_totals.nil?
|
667
|
+
command.query['endDate'] = end_date unless end_date.nil?
|
668
|
+
command.query['eventType'] = event_type unless event_type.nil?
|
669
|
+
command.query['linkId'] = link_id unless link_id.nil?
|
670
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
671
|
+
command.query['orderId'] = order_id unless order_id.nil?
|
672
|
+
command.query['publisherId'] = publisher_id unless publisher_id.nil?
|
673
|
+
command.query['startDate'] = start_date unless start_date.nil?
|
674
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
675
|
+
command.query['status'] = status unless status.nil?
|
676
|
+
command.query['fields'] = fields unless fields.nil?
|
677
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
678
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
679
|
+
execute_or_queue_command(command, &block)
|
680
|
+
end
|
681
|
+
|
682
|
+
protected
|
683
|
+
|
684
|
+
def apply_command_defaults(command)
|
685
|
+
command.query['key'] = key unless key.nil?
|
686
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
687
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
688
|
+
end
|
689
|
+
end
|
690
|
+
end
|
691
|
+
end
|
692
|
+
end
|