google-api-client 0.9.pre3 → 0.9.pre4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +14 -2
- data/Gemfile +4 -0
- data/MIGRATING.md +1 -1
- data/README.md +17 -3
- data/api_names.yaml +127 -14
- data/api_names_out.yaml +5442 -710
- data/bin/generate-api +16 -14
- data/generated/google/apis/adexchangebuyer_v1_3.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +213 -2
- data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +71 -0
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +21 -42
- data/generated/google/apis/adexchangeseller_v2_0.rb +1 -1
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +15 -29
- data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
- data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
- data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
- data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
- data/generated/google/apis/admin_directory_v1.rb +25 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +718 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +244 -0
- data/generated/google/apis/admin_directory_v1/service.rb +1522 -509
- data/generated/google/apis/admin_reports_v1.rb +1 -1
- data/generated/google/apis/admin_reports_v1/service.rb +5 -10
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsense_v1_4/classes.rb +6 -0
- data/generated/google/apis/adsense_v1_4/representations.rb +1 -0
- data/generated/google/apis/adsense_v1_4/service.rb +40 -78
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/service.rb +26 -52
- data/generated/google/apis/analytics_v3.rb +1 -1
- data/generated/google/apis/analytics_v3/classes.rb +11 -13
- data/generated/google/apis/analytics_v3/service.rb +84 -158
- data/generated/google/apis/androidenterprise_v1.rb +2 -2
- data/generated/google/apis/androidenterprise_v1/classes.rb +276 -8
- data/generated/google/apis/androidenterprise_v1/representations.rb +106 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +715 -97
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +2 -2
- data/generated/google/apis/androidpublisher_v2/service.rb +55 -107
- data/generated/google/apis/appengine_v1beta4.rb +35 -0
- data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
- data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
- data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
- data/generated/google/apis/appsactivity_v1.rb +1 -1
- data/generated/google/apis/appsactivity_v1/service.rb +1 -2
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/appstate_v1/service.rb +6 -11
- data/generated/google/apis/autoscaler_v1beta2/service.rb +10 -20
- data/generated/google/apis/bigquery_v2.rb +4 -1
- data/generated/google/apis/bigquery_v2/classes.rb +231 -16
- data/generated/google/apis/bigquery_v2/representations.rb +62 -0
- data/generated/google/apis/bigquery_v2/service.rb +24 -45
- data/generated/google/apis/blogger_v3/service.rb +33 -66
- data/generated/google/apis/books_v1.rb +1 -1
- data/generated/google/apis/books_v1/classes.rb +441 -0
- data/generated/google/apis/books_v1/representations.rb +177 -0
- data/generated/google/apis/books_v1/service.rb +210 -90
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/calendar_v3/classes.rb +34 -18
- data/generated/google/apis/calendar_v3/service.rb +118 -103
- data/generated/google/apis/civicinfo_v2.rb +1 -1
- data/generated/google/apis/civicinfo_v2/classes.rb +12 -3
- data/generated/google/apis/civicinfo_v2/representations.rb +1 -0
- data/generated/google/apis/civicinfo_v2/service.rb +5 -10
- data/generated/google/apis/classroom_v1.rb +49 -0
- data/generated/google/apis/classroom_v1/classes.rb +512 -0
- data/generated/google/apis/classroom_v1/representations.rb +217 -0
- data/generated/google/apis/classroom_v1/service.rb +970 -0
- data/generated/google/apis/cloudbilling_v1.rb +35 -0
- data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
- data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
- data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
- data/generated/google/apis/clouddebugger_v2.rb +41 -0
- data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
- data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
- data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +6 -12
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +5 -2
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +173 -249
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +36 -68
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +293 -80
- data/generated/google/apis/cloudtrace_v1.rb +35 -0
- data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
- data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
- data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
- data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
- data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
- data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
- data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
- data/generated/google/apis/compute_beta.rb +49 -0
- data/generated/google/apis/compute_beta/classes.rb +9128 -0
- data/generated/google/apis/compute_beta/representations.rb +3048 -0
- data/generated/google/apis/compute_beta/service.rb +10154 -0
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +1305 -520
- data/generated/google/apis/compute_v1/representations.rb +122 -15
- data/generated/google/apis/compute_v1/service.rb +2202 -1085
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +56 -31
- data/generated/google/apis/container_v1/representations.rb +12 -0
- data/generated/google/apis/container_v1/service.rb +62 -41
- data/generated/google/apis/content_v2.rb +2 -2
- data/generated/google/apis/content_v2/classes.rb +2252 -56
- data/generated/google/apis/content_v2/representations.rb +917 -87
- data/generated/google/apis/content_v2/service.rb +680 -85
- data/generated/google/apis/coordinate_v1.rb +1 -1
- data/generated/google/apis/coordinate_v1/service.rb +16 -25
- data/generated/google/apis/customsearch_v1/service.rb +1 -2
- data/generated/google/apis/datastore_v1beta2.rb +1 -1
- data/generated/google/apis/datastore_v1beta2/service.rb +12 -18
- data/generated/google/apis/deploymentmanager_v2.rb +44 -0
- data/generated/google/apis/deploymentmanager_v2/classes.rb +1089 -0
- data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
- data/generated/google/apis/deploymentmanager_v2beta2.rb +5 -2
- data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +22 -3
- data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +3 -0
- data/generated/google/apis/deploymentmanager_v2beta2/service.rb +14 -27
- data/generated/google/apis/dfareporting_v2_1.rb +1 -1
- data/generated/google/apis/dfareporting_v2_1/classes.rb +29 -14
- data/generated/google/apis/dfareporting_v2_1/service.rb +196 -389
- data/generated/google/apis/discovery_v1/classes.rb +7 -0
- data/generated/google/apis/discovery_v1/representations.rb +1 -0
- data/generated/google/apis/discovery_v1/service.rb +2 -4
- data/generated/google/apis/dns_v1.rb +4 -1
- data/generated/google/apis/dns_v1/service.rb +9 -18
- data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +9 -2
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +1 -0
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +8 -16
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +15 -6
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +1 -0
- data/generated/google/apis/doubleclicksearch_v2/service.rb +13 -23
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +73 -30
- data/generated/google/apis/drive_v2/representations.rb +14 -0
- data/generated/google/apis/drive_v2/service.rb +139 -135
- data/generated/google/apis/drive_v3.rb +55 -0
- data/generated/google/apis/drive_v3/classes.rb +1534 -0
- data/generated/google/apis/drive_v3/representations.rb +497 -0
- data/generated/google/apis/drive_v3/service.rb +1541 -0
- data/generated/google/apis/fitness_v1.rb +1 -1
- data/generated/google/apis/fitness_v1/service.rb +14 -27
- data/generated/google/apis/fusiontables_v2/service.rb +40 -73
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_configuration_v1configuration/service.rb +14 -27
- data/generated/google/apis/games_management_v1management.rb +37 -0
- data/generated/google/apis/games_management_v1management/classes.rb +524 -0
- data/generated/google/apis/games_management_v1management/representations.rb +231 -0
- data/generated/google/apis/games_management_v1management/service.rb +994 -0
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/games_v1/classes.rb +39 -0
- data/generated/google/apis/games_v1/representations.rb +14 -0
- data/generated/google/apis/games_v1/service.rb +93 -109
- data/generated/google/apis/gan_v1beta1/service.rb +10 -20
- data/generated/google/apis/genomics_v1.rb +5 -3
- data/generated/google/apis/genomics_v1/classes.rb +519 -200
- data/generated/google/apis/genomics_v1/representations.rb +126 -13
- data/generated/google/apis/genomics_v1/service.rb +392 -236
- data/generated/google/apis/gmail_v1.rb +4 -1
- data/generated/google/apis/gmail_v1/service.rb +39 -71
- data/generated/google/apis/groupsmigration_v1/service.rb +2 -3
- data/generated/google/apis/groupssettings_v1/service.rb +3 -6
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +125 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +37 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +44 -24
- data/generated/google/apis/kgsearch_v1.rb +32 -0
- data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
- data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
- data/generated/google/apis/kgsearch_v1/service.rb +111 -0
- data/generated/google/apis/licensing_v1.rb +1 -1
- data/generated/google/apis/licensing_v1/service.rb +7 -14
- data/generated/google/apis/logging_v1beta3.rb +16 -4
- data/generated/google/apis/logging_v1beta3/classes.rb +620 -46
- data/generated/google/apis/logging_v1beta3/representations.rb +144 -0
- data/generated/google/apis/logging_v1beta3/service.rb +435 -104
- data/generated/google/apis/manager_v1beta2.rb +3 -0
- data/generated/google/apis/manager_v1beta2/service.rb +8 -16
- data/generated/google/apis/mapsengine_v1.rb +1 -1
- data/generated/google/apis/mapsengine_v1/service.rb +85 -162
- data/generated/google/apis/mirror_v1.rb +1 -1
- data/generated/google/apis/mirror_v1/service.rb +28 -52
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/oauth2_v2/service.rb +4 -8
- data/generated/google/apis/pagespeedonline_v2/service.rb +1 -2
- data/generated/google/apis/partners_v2.rb +32 -0
- data/generated/google/apis/partners_v2/classes.rb +942 -0
- data/generated/google/apis/partners_v2/representations.rb +402 -0
- data/generated/google/apis/partners_v2/service.rb +400 -0
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_domains_v1/classes.rb +207 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +114 -0
- data/generated/google/apis/plus_domains_v1/service.rb +21 -41
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/plus_v1/classes.rb +207 -0
- data/generated/google/apis/plus_v1/representations.rb +114 -0
- data/generated/google/apis/plus_v1/service.rb +11 -56
- data/generated/google/apis/prediction_v1_6.rb +1 -1
- data/generated/google/apis/prediction_v1_6/service.rb +8 -16
- data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
- data/generated/google/apis/pubsub_v1.rb +37 -0
- data/generated/google/apis/pubsub_v1/classes.rb +614 -0
- data/generated/google/apis/pubsub_v1/representations.rb +281 -0
- data/generated/google/apis/pubsub_v1/service.rb +774 -0
- data/generated/google/apis/pubsub_v1beta2.rb +1 -1
- data/generated/google/apis/pubsub_v1beta2/classes.rb +78 -283
- data/generated/google/apis/pubsub_v1beta2/representations.rb +1 -85
- data/generated/google/apis/pubsub_v1beta2/service.rb +79 -87
- data/generated/google/apis/qpx_express_v1/service.rb +1 -2
- data/generated/google/apis/replicapool_v1beta2.rb +3 -0
- data/generated/google/apis/replicapool_v1beta2/service.rb +12 -24
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -1
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +46 -2
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +16 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +58 -18
- data/generated/google/apis/reseller_v1.rb +1 -1
- data/generated/google/apis/reseller_v1/classes.rb +19 -1
- data/generated/google/apis/reseller_v1/representations.rb +1 -0
- data/generated/google/apis/reseller_v1/service.rb +16 -30
- data/generated/google/apis/resourceviews_v1beta2.rb +3 -0
- data/generated/google/apis/resourceviews_v1beta2/service.rb +16 -27
- data/generated/google/apis/script_v1.rb +61 -0
- data/generated/google/apis/script_v1/classes.rb +259 -0
- data/generated/google/apis/script_v1/representations.rb +106 -0
- data/generated/google/apis/script_v1/service.rb +98 -0
- data/generated/google/apis/site_verification_v1.rb +1 -1
- data/generated/google/apis/site_verification_v1/service.rb +8 -15
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +186 -2
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +70 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +166 -75
- data/generated/google/apis/storage_v1.rb +5 -2
- data/generated/google/apis/storage_v1/classes.rb +47 -4
- data/generated/google/apis/storage_v1/representations.rb +18 -0
- data/generated/google/apis/storage_v1/service.rb +77 -94
- data/generated/google/apis/storagetransfer_v1.rb +35 -0
- data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
- data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
- data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
- data/generated/google/apis/tagmanager_v1.rb +1 -1
- data/generated/google/apis/tagmanager_v1/classes.rb +189 -31
- data/generated/google/apis/tagmanager_v1/representations.rb +69 -15
- data/generated/google/apis/tagmanager_v1/service.rb +114 -275
- data/generated/google/apis/taskqueue_v1beta2/service.rb +8 -16
- data/generated/google/apis/tasks_v1/service.rb +14 -28
- data/generated/google/apis/translate_v2/service.rb +3 -6
- data/generated/google/apis/urlshortener_v1/service.rb +3 -6
- data/generated/google/apis/webmasters_v3.rb +3 -3
- data/generated/google/apis/webmasters_v3/classes.rb +4 -4
- data/generated/google/apis/webmasters_v3/service.rb +16 -30
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1/classes.rb +6 -0
- data/generated/google/apis/youtube_analytics_v1/representations.rb +1 -0
- data/generated/google/apis/youtube_analytics_v1/service.rb +16 -21
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +111 -78
- data/generated/google/apis/youtube_v3/representations.rb +2 -0
- data/generated/google/apis/youtube_v3/service.rb +78 -246
- data/generated/google/apis/youtubereporting_v1.rb +38 -0
- data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
- data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
- data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
- data/google-api-client.gemspec +3 -3
- data/lib/google/api_client/auth/installed_app.rb +2 -2
- data/lib/google/api_client/auth/key_utils.rb +1 -0
- data/lib/google/api_client/auth/storage.rb +1 -0
- data/lib/google/api_client/auth/storages/file_store.rb +1 -0
- data/lib/google/api_client/auth/storages/redis_store.rb +1 -0
- data/lib/google/api_client/client_secrets.rb +4 -5
- data/lib/google/apis/core/api_command.rb +2 -2
- data/lib/google/apis/core/base_service.rb +1 -0
- data/lib/google/apis/core/batch.rb +25 -8
- data/lib/google/apis/core/download.rb +1 -1
- data/lib/google/apis/core/http_command.rb +24 -12
- data/lib/google/apis/core/multipart.rb +20 -6
- data/lib/google/apis/core/upload.rb +11 -4
- data/lib/google/apis/generator/annotator.rb +29 -10
- data/lib/google/apis/generator/helpers.rb +1 -1
- data/lib/google/apis/generator/templates/_method.tmpl +5 -6
- data/lib/google/apis/options.rb +7 -3
- data/lib/google/apis/version.rb +1 -1
- data/samples/calendar/calendar.rb +1 -1
- data/samples/drive/drive.rb +9 -2
- data/samples/pubsub/pubsub.rb +5 -6
- data/samples/translate/translate.rb +1 -5
- data/script/generate +20 -5
- data/spec/fixtures/files/child/.gitignore +0 -0
- data/spec/fixtures/files/invalid.json +1 -0
- data/spec/google/api_client/client_secrets_spec.rb +38 -1
- data/spec/google/apis/core/batch_spec.rb +22 -8
- data/spec/google/apis/core/download_spec.rb +13 -0
- data/spec/google/apis/core/http_command_spec.rb +26 -9
- data/spec/google/apis/core/upload_spec.rb +65 -17
- data/spec/google/apis/options_spec.rb +8 -0
- data/spec/integration_tests/adsense_spec.rb +28 -0
- data/spec/integration_tests/pubsub_spec.rb +3 -3
- data/spec/spec_helper.rb +5 -1
- data/third_party/hurley_patches.rb +103 -0
- metadata +87 -7
@@ -0,0 +1,38 @@
|
|
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/youtubereporting_v1/service.rb'
|
16
|
+
require 'google/apis/youtubereporting_v1/classes.rb'
|
17
|
+
require 'google/apis/youtubereporting_v1/representations.rb'
|
18
|
+
|
19
|
+
module Google
|
20
|
+
module Apis
|
21
|
+
# YouTube Reporting API
|
22
|
+
#
|
23
|
+
# An API to schedule reporting jobs and download the resulting bulk data reports
|
24
|
+
# about YouTube channels, videos etc. in the form of CSV files.
|
25
|
+
#
|
26
|
+
# @see https://developers.google.com/youtube/reporting/v1/reports/
|
27
|
+
module YoutubereportingV1
|
28
|
+
VERSION = 'V1'
|
29
|
+
REVISION = '20151026'
|
30
|
+
|
31
|
+
# View monetary and non-monetary YouTube Analytics reports for your YouTube content
|
32
|
+
AUTH_YT_ANALYTICS_MONETARY_READONLY = 'https://www.googleapis.com/auth/yt-analytics-monetary.readonly'
|
33
|
+
|
34
|
+
# View YouTube Analytics reports for your YouTube content
|
35
|
+
AUTH_YT_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/yt-analytics.readonly'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,258 @@
|
|
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 YoutubereportingV1
|
24
|
+
|
25
|
+
# Media resource.
|
26
|
+
class Media
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Name of the media resource.
|
30
|
+
# Corresponds to the JSON property `resourceName`
|
31
|
+
# @return [String]
|
32
|
+
attr_accessor :resource_name
|
33
|
+
|
34
|
+
def initialize(**args)
|
35
|
+
update!(**args)
|
36
|
+
end
|
37
|
+
|
38
|
+
# Update properties of this object
|
39
|
+
def update!(**args)
|
40
|
+
@resource_name = args[:resource_name] unless args[:resource_name].nil?
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Response message for ReportingService.ListReportTypes.
|
45
|
+
class ListReportTypesResponse
|
46
|
+
include Google::Apis::Core::Hashable
|
47
|
+
|
48
|
+
# The list of report types.
|
49
|
+
# Corresponds to the JSON property `reportTypes`
|
50
|
+
# @return [Array<Google::Apis::YoutubereportingV1::ReportType>]
|
51
|
+
attr_accessor :report_types
|
52
|
+
|
53
|
+
# A token to retrieve next page of results. Pass this value in the
|
54
|
+
# ListReportTypesRequest.page_token field in the subsequent call to `
|
55
|
+
# ListReportTypes` method to retrieve the next page of results.
|
56
|
+
# Corresponds to the JSON property `nextPageToken`
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :next_page_token
|
59
|
+
|
60
|
+
def initialize(**args)
|
61
|
+
update!(**args)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Update properties of this object
|
65
|
+
def update!(**args)
|
66
|
+
@report_types = args[:report_types] unless args[:report_types].nil?
|
67
|
+
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# A report type.
|
72
|
+
class ReportType
|
73
|
+
include Google::Apis::Core::Hashable
|
74
|
+
|
75
|
+
# The ID of the report type (max. 100 characters).
|
76
|
+
# Corresponds to the JSON property `id`
|
77
|
+
# @return [String]
|
78
|
+
attr_accessor :id
|
79
|
+
|
80
|
+
# The name of the report type (max. 100 characters).
|
81
|
+
# Corresponds to the JSON property `name`
|
82
|
+
# @return [String]
|
83
|
+
attr_accessor :name
|
84
|
+
|
85
|
+
def initialize(**args)
|
86
|
+
update!(**args)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Update properties of this object
|
90
|
+
def update!(**args)
|
91
|
+
@id = args[:id] unless args[:id].nil?
|
92
|
+
@name = args[:name] unless args[:name].nil?
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# A job creating reports of a specific type.
|
97
|
+
class Job
|
98
|
+
include Google::Apis::Core::Hashable
|
99
|
+
|
100
|
+
# The server-generated ID of the job (max. 40 characters).
|
101
|
+
# Corresponds to the JSON property `id`
|
102
|
+
# @return [String]
|
103
|
+
attr_accessor :id
|
104
|
+
|
105
|
+
# The type of reports this job creates. Corresponds to the ID of a ReportType.
|
106
|
+
# Corresponds to the JSON property `reportTypeId`
|
107
|
+
# @return [String]
|
108
|
+
attr_accessor :report_type_id
|
109
|
+
|
110
|
+
# The name of the job (max. 100 characters). TODO(lanthaler) Clarify what this
|
111
|
+
# will actually be used for
|
112
|
+
# Corresponds to the JSON property `name`
|
113
|
+
# @return [String]
|
114
|
+
attr_accessor :name
|
115
|
+
|
116
|
+
# The creation date/time of the job.
|
117
|
+
# Corresponds to the JSON property `createTime`
|
118
|
+
# @return [String]
|
119
|
+
attr_accessor :create_time
|
120
|
+
|
121
|
+
def initialize(**args)
|
122
|
+
update!(**args)
|
123
|
+
end
|
124
|
+
|
125
|
+
# Update properties of this object
|
126
|
+
def update!(**args)
|
127
|
+
@id = args[:id] unless args[:id].nil?
|
128
|
+
@report_type_id = args[:report_type_id] unless args[:report_type_id].nil?
|
129
|
+
@name = args[:name] unless args[:name].nil?
|
130
|
+
@create_time = args[:create_time] unless args[:create_time].nil?
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Response message for ReportingService.ListJobs.
|
135
|
+
class ListJobsResponse
|
136
|
+
include Google::Apis::Core::Hashable
|
137
|
+
|
138
|
+
# The list of jobs.
|
139
|
+
# Corresponds to the JSON property `jobs`
|
140
|
+
# @return [Array<Google::Apis::YoutubereportingV1::Job>]
|
141
|
+
attr_accessor :jobs
|
142
|
+
|
143
|
+
# A token to retrieve next page of results. Pass this value in the
|
144
|
+
# ListJobsRequest.page_token field in the subsequent call to `ListJobs` method
|
145
|
+
# to retrieve the next page of results.
|
146
|
+
# Corresponds to the JSON property `nextPageToken`
|
147
|
+
# @return [String]
|
148
|
+
attr_accessor :next_page_token
|
149
|
+
|
150
|
+
def initialize(**args)
|
151
|
+
update!(**args)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Update properties of this object
|
155
|
+
def update!(**args)
|
156
|
+
@jobs = args[:jobs] unless args[:jobs].nil?
|
157
|
+
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
162
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
163
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
164
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
165
|
+
# `Empty` is empty JSON object ````.
|
166
|
+
class Empty
|
167
|
+
include Google::Apis::Core::Hashable
|
168
|
+
|
169
|
+
def initialize(**args)
|
170
|
+
update!(**args)
|
171
|
+
end
|
172
|
+
|
173
|
+
# Update properties of this object
|
174
|
+
def update!(**args)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Response message for ReportingService.ListReports.
|
179
|
+
class ListReportsResponse
|
180
|
+
include Google::Apis::Core::Hashable
|
181
|
+
|
182
|
+
# The list of report types.
|
183
|
+
# Corresponds to the JSON property `reports`
|
184
|
+
# @return [Array<Google::Apis::YoutubereportingV1::Report>]
|
185
|
+
attr_accessor :reports
|
186
|
+
|
187
|
+
# A token to retrieve next page of results. Pass this value in the
|
188
|
+
# ListReportsRequest.page_token field in the subsequent call to `ListReports`
|
189
|
+
# method to retrieve the next page of results.
|
190
|
+
# Corresponds to the JSON property `nextPageToken`
|
191
|
+
# @return [String]
|
192
|
+
attr_accessor :next_page_token
|
193
|
+
|
194
|
+
def initialize(**args)
|
195
|
+
update!(**args)
|
196
|
+
end
|
197
|
+
|
198
|
+
# Update properties of this object
|
199
|
+
def update!(**args)
|
200
|
+
@reports = args[:reports] unless args[:reports].nil?
|
201
|
+
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# A report's metadata including the URL from which the report itself can be
|
206
|
+
# downloaded.
|
207
|
+
class Report
|
208
|
+
include Google::Apis::Core::Hashable
|
209
|
+
|
210
|
+
# The server-generated ID of the report.
|
211
|
+
# Corresponds to the JSON property `id`
|
212
|
+
# @return [String]
|
213
|
+
attr_accessor :id
|
214
|
+
|
215
|
+
# The ID of the job that created this report.
|
216
|
+
# Corresponds to the JSON property `jobId`
|
217
|
+
# @return [String]
|
218
|
+
attr_accessor :job_id
|
219
|
+
|
220
|
+
# The start of the time period that the report instance covers. The value is
|
221
|
+
# inclusive.
|
222
|
+
# Corresponds to the JSON property `startTime`
|
223
|
+
# @return [String]
|
224
|
+
attr_accessor :start_time
|
225
|
+
|
226
|
+
# The end of the time period that the report instance covers. The value is
|
227
|
+
# exclusive.
|
228
|
+
# Corresponds to the JSON property `endTime`
|
229
|
+
# @return [String]
|
230
|
+
attr_accessor :end_time
|
231
|
+
|
232
|
+
# The date/time when this report was created.
|
233
|
+
# Corresponds to the JSON property `createTime`
|
234
|
+
# @return [String]
|
235
|
+
attr_accessor :create_time
|
236
|
+
|
237
|
+
# The URL from which the report can be downloaded (max. 1000 characters).
|
238
|
+
# Corresponds to the JSON property `downloadUrl`
|
239
|
+
# @return [String]
|
240
|
+
attr_accessor :download_url
|
241
|
+
|
242
|
+
def initialize(**args)
|
243
|
+
update!(**args)
|
244
|
+
end
|
245
|
+
|
246
|
+
# Update properties of this object
|
247
|
+
def update!(**args)
|
248
|
+
@id = args[:id] unless args[:id].nil?
|
249
|
+
@job_id = args[:job_id] unless args[:job_id].nil?
|
250
|
+
@start_time = args[:start_time] unless args[:start_time].nil?
|
251
|
+
@end_time = args[:end_time] unless args[:end_time].nil?
|
252
|
+
@create_time = args[:create_time] unless args[:create_time].nil?
|
253
|
+
@download_url = args[:download_url] unless args[:download_url].nil?
|
254
|
+
end
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
@@ -0,0 +1,128 @@
|
|
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 YoutubereportingV1
|
24
|
+
|
25
|
+
class Media
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
end
|
28
|
+
|
29
|
+
class ListReportTypesResponse
|
30
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
31
|
+
end
|
32
|
+
|
33
|
+
class ReportType
|
34
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
35
|
+
end
|
36
|
+
|
37
|
+
class Job
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
end
|
40
|
+
|
41
|
+
class ListJobsResponse
|
42
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
43
|
+
end
|
44
|
+
|
45
|
+
class Empty
|
46
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
47
|
+
end
|
48
|
+
|
49
|
+
class ListReportsResponse
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
end
|
52
|
+
|
53
|
+
class Report
|
54
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
55
|
+
end
|
56
|
+
|
57
|
+
class Media
|
58
|
+
# @private
|
59
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
60
|
+
property :resource_name, as: 'resourceName'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
class ListReportTypesResponse
|
65
|
+
# @private
|
66
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
67
|
+
collection :report_types, as: 'reportTypes', class: Google::Apis::YoutubereportingV1::ReportType, decorator: Google::Apis::YoutubereportingV1::ReportType::Representation
|
68
|
+
|
69
|
+
property :next_page_token, as: 'nextPageToken'
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
class ReportType
|
74
|
+
# @private
|
75
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
76
|
+
property :id, as: 'id'
|
77
|
+
property :name, as: 'name'
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
class Job
|
82
|
+
# @private
|
83
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
84
|
+
property :id, as: 'id'
|
85
|
+
property :report_type_id, as: 'reportTypeId'
|
86
|
+
property :name, as: 'name'
|
87
|
+
property :create_time, as: 'createTime'
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
class ListJobsResponse
|
92
|
+
# @private
|
93
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
94
|
+
collection :jobs, as: 'jobs', class: Google::Apis::YoutubereportingV1::Job, decorator: Google::Apis::YoutubereportingV1::Job::Representation
|
95
|
+
|
96
|
+
property :next_page_token, as: 'nextPageToken'
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
class Empty
|
101
|
+
# @private
|
102
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
class ListReportsResponse
|
107
|
+
# @private
|
108
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
109
|
+
collection :reports, as: 'reports', class: Google::Apis::YoutubereportingV1::Report, decorator: Google::Apis::YoutubereportingV1::Report::Representation
|
110
|
+
|
111
|
+
property :next_page_token, as: 'nextPageToken'
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
class Report
|
116
|
+
# @private
|
117
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
118
|
+
property :id, as: 'id'
|
119
|
+
property :job_id, as: 'jobId'
|
120
|
+
property :start_time, as: 'startTime'
|
121
|
+
property :end_time, as: 'endTime'
|
122
|
+
property :create_time, as: 'createTime'
|
123
|
+
property :download_url, as: 'downloadUrl'
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
@@ -0,0 +1,364 @@
|
|
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 YoutubereportingV1
|
23
|
+
# YouTube Reporting API
|
24
|
+
#
|
25
|
+
# An API to schedule reporting jobs and download the resulting bulk data reports
|
26
|
+
# about YouTube channels, videos etc. in the form of CSV files.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/youtubereporting_v1'
|
30
|
+
#
|
31
|
+
# Youtubereporting = Google::Apis::YoutubereportingV1 # Alias the module
|
32
|
+
# service = Youtubereporting::YouTubeReportingService.new
|
33
|
+
#
|
34
|
+
# @see https://developers.google.com/youtube/reporting/v1/reports/
|
35
|
+
class YouTubeReportingService < 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
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
super('https://youtubereporting.googleapis.com/', '')
|
48
|
+
end
|
49
|
+
|
50
|
+
# Method for media download. Download is supported on the URI `/v1/media/`+name`?
|
51
|
+
# alt=media`.
|
52
|
+
# @param [String] resource_name
|
53
|
+
# Name of the media that is being downloaded. See [][ByteStream.ReadRequest.
|
54
|
+
# resource_name].
|
55
|
+
# @param [String] fields
|
56
|
+
# Selector specifying which fields to include in a partial response.
|
57
|
+
# @param [String] quota_user
|
58
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
59
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
60
|
+
# @param [IO, String] download_dest
|
61
|
+
# IO stream or filename to receive content download
|
62
|
+
# @param [Google::Apis::RequestOptions] options
|
63
|
+
# Request-specific options
|
64
|
+
#
|
65
|
+
# @yield [result, err] Result & error if block supplied
|
66
|
+
# @yieldparam result [Google::Apis::YoutubereportingV1::Media] parsed result object
|
67
|
+
# @yieldparam err [StandardError] error object if request failed
|
68
|
+
#
|
69
|
+
# @return [Google::Apis::YoutubereportingV1::Media]
|
70
|
+
#
|
71
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
72
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
73
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
74
|
+
def download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
75
|
+
if download_dest.nil?
|
76
|
+
command = make_simple_command(:get, 'v1/media/{+resourceName}', options)
|
77
|
+
else
|
78
|
+
command = make_download_command(:get, 'v1/media/{+resourceName}', options)
|
79
|
+
command.download_dest = download_dest
|
80
|
+
end
|
81
|
+
command.response_representation = Google::Apis::YoutubereportingV1::Media::Representation
|
82
|
+
command.response_class = Google::Apis::YoutubereportingV1::Media
|
83
|
+
command.params['resourceName'] = resource_name unless resource_name.nil?
|
84
|
+
command.query['fields'] = fields unless fields.nil?
|
85
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
86
|
+
execute_or_queue_command(command, &block)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Lists report types.
|
90
|
+
# @param [String] on_behalf_of_content_owner
|
91
|
+
# The content owner's external ID on which behalf the user is acting on. If not
|
92
|
+
# set, the user is acting for himself (his own channel).
|
93
|
+
# @param [Fixnum] page_size
|
94
|
+
# Requested page size. Server may return fewer report types than requested. If
|
95
|
+
# unspecified, server will pick an appropriate default.
|
96
|
+
# @param [String] page_token
|
97
|
+
# A token identifying a page of results the server should return. Typically,
|
98
|
+
# this is the value of ListReportTypesResponse.next_page_token returned in
|
99
|
+
# response to the previous call to the `ListReportTypes` method.
|
100
|
+
# @param [String] fields
|
101
|
+
# Selector specifying which fields to include in a partial response.
|
102
|
+
# @param [String] quota_user
|
103
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
104
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
105
|
+
# @param [Google::Apis::RequestOptions] options
|
106
|
+
# Request-specific options
|
107
|
+
#
|
108
|
+
# @yield [result, err] Result & error if block supplied
|
109
|
+
# @yieldparam result [Google::Apis::YoutubereportingV1::ListReportTypesResponse] parsed result object
|
110
|
+
# @yieldparam err [StandardError] error object if request failed
|
111
|
+
#
|
112
|
+
# @return [Google::Apis::YoutubereportingV1::ListReportTypesResponse]
|
113
|
+
#
|
114
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
115
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
116
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
117
|
+
def list_report_types(on_behalf_of_content_owner: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
118
|
+
command = make_simple_command(:get, 'v1/reportTypes', options)
|
119
|
+
command.response_representation = Google::Apis::YoutubereportingV1::ListReportTypesResponse::Representation
|
120
|
+
command.response_class = Google::Apis::YoutubereportingV1::ListReportTypesResponse
|
121
|
+
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
|
122
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
123
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
124
|
+
command.query['fields'] = fields unless fields.nil?
|
125
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
126
|
+
execute_or_queue_command(command, &block)
|
127
|
+
end
|
128
|
+
|
129
|
+
# Creates a job and returns it.
|
130
|
+
# @param [Google::Apis::YoutubereportingV1::Job] job_object
|
131
|
+
# @param [String] on_behalf_of_content_owner
|
132
|
+
# The content owner's external ID on which behalf the user is acting on. If not
|
133
|
+
# set, the user is acting for himself (his own channel).
|
134
|
+
# @param [String] fields
|
135
|
+
# Selector specifying which fields to include in a partial response.
|
136
|
+
# @param [String] quota_user
|
137
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
138
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
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::YoutubereportingV1::Job] parsed result object
|
144
|
+
# @yieldparam err [StandardError] error object if request failed
|
145
|
+
#
|
146
|
+
# @return [Google::Apis::YoutubereportingV1::Job]
|
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 create_job(job_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
|
152
|
+
command = make_simple_command(:post, 'v1/jobs', options)
|
153
|
+
command.request_representation = Google::Apis::YoutubereportingV1::Job::Representation
|
154
|
+
command.request_object = job_object
|
155
|
+
command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation
|
156
|
+
command.response_class = Google::Apis::YoutubereportingV1::Job
|
157
|
+
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
|
158
|
+
command.query['fields'] = fields unless fields.nil?
|
159
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
160
|
+
execute_or_queue_command(command, &block)
|
161
|
+
end
|
162
|
+
|
163
|
+
# Lists jobs.
|
164
|
+
# @param [String] on_behalf_of_content_owner
|
165
|
+
# The content owner's external ID on which behalf the user is acting on. If not
|
166
|
+
# set, the user is acting for himself (his own channel).
|
167
|
+
# @param [Fixnum] page_size
|
168
|
+
# Requested page size. Server may return fewer jobs than requested. If
|
169
|
+
# unspecified, server will pick an appropriate default.
|
170
|
+
# @param [String] page_token
|
171
|
+
# A token identifying a page of results the server should return. Typically,
|
172
|
+
# this is the value of ListReportTypesResponse.next_page_token returned in
|
173
|
+
# response to the previous call to the `ListJobs` method.
|
174
|
+
# @param [String] fields
|
175
|
+
# Selector specifying which fields to include in a partial response.
|
176
|
+
# @param [String] quota_user
|
177
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
178
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
179
|
+
# @param [Google::Apis::RequestOptions] options
|
180
|
+
# Request-specific options
|
181
|
+
#
|
182
|
+
# @yield [result, err] Result & error if block supplied
|
183
|
+
# @yieldparam result [Google::Apis::YoutubereportingV1::ListJobsResponse] parsed result object
|
184
|
+
# @yieldparam err [StandardError] error object if request failed
|
185
|
+
#
|
186
|
+
# @return [Google::Apis::YoutubereportingV1::ListJobsResponse]
|
187
|
+
#
|
188
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
189
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
190
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
191
|
+
def list_jobs(on_behalf_of_content_owner: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
192
|
+
command = make_simple_command(:get, 'v1/jobs', options)
|
193
|
+
command.response_representation = Google::Apis::YoutubereportingV1::ListJobsResponse::Representation
|
194
|
+
command.response_class = Google::Apis::YoutubereportingV1::ListJobsResponse
|
195
|
+
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
|
196
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
197
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
198
|
+
command.query['fields'] = fields unless fields.nil?
|
199
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
200
|
+
execute_or_queue_command(command, &block)
|
201
|
+
end
|
202
|
+
|
203
|
+
# Gets a job.
|
204
|
+
# @param [String] job_id
|
205
|
+
# The ID of the job to retrieve.
|
206
|
+
# @param [String] on_behalf_of_content_owner
|
207
|
+
# The content owner's external ID on which behalf the user is acting on. If not
|
208
|
+
# set, the user is acting for himself (his own channel).
|
209
|
+
# @param [String] fields
|
210
|
+
# Selector specifying which fields to include in a partial response.
|
211
|
+
# @param [String] quota_user
|
212
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
213
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
214
|
+
# @param [Google::Apis::RequestOptions] options
|
215
|
+
# Request-specific options
|
216
|
+
#
|
217
|
+
# @yield [result, err] Result & error if block supplied
|
218
|
+
# @yieldparam result [Google::Apis::YoutubereportingV1::Job] parsed result object
|
219
|
+
# @yieldparam err [StandardError] error object if request failed
|
220
|
+
#
|
221
|
+
# @return [Google::Apis::YoutubereportingV1::Job]
|
222
|
+
#
|
223
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
224
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
225
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
226
|
+
def get_job(job_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
|
227
|
+
command = make_simple_command(:get, 'v1/jobs/{jobId}', options)
|
228
|
+
command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation
|
229
|
+
command.response_class = Google::Apis::YoutubereportingV1::Job
|
230
|
+
command.params['jobId'] = job_id unless job_id.nil?
|
231
|
+
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
|
232
|
+
command.query['fields'] = fields unless fields.nil?
|
233
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
234
|
+
execute_or_queue_command(command, &block)
|
235
|
+
end
|
236
|
+
|
237
|
+
# Deletes a job.
|
238
|
+
# @param [String] job_id
|
239
|
+
# The ID of the job to delete.
|
240
|
+
# @param [String] on_behalf_of_content_owner
|
241
|
+
# The content owner's external ID on which behalf the user is acting on. If not
|
242
|
+
# set, the user is acting for himself (his own channel).
|
243
|
+
# @param [String] fields
|
244
|
+
# Selector specifying which fields to include in a partial response.
|
245
|
+
# @param [String] quota_user
|
246
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
247
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
248
|
+
# @param [Google::Apis::RequestOptions] options
|
249
|
+
# Request-specific options
|
250
|
+
#
|
251
|
+
# @yield [result, err] Result & error if block supplied
|
252
|
+
# @yieldparam result [Google::Apis::YoutubereportingV1::Empty] parsed result object
|
253
|
+
# @yieldparam err [StandardError] error object if request failed
|
254
|
+
#
|
255
|
+
# @return [Google::Apis::YoutubereportingV1::Empty]
|
256
|
+
#
|
257
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
258
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
259
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
260
|
+
def delete_job(job_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
|
261
|
+
command = make_simple_command(:delete, 'v1/jobs/{jobId}', options)
|
262
|
+
command.response_representation = Google::Apis::YoutubereportingV1::Empty::Representation
|
263
|
+
command.response_class = Google::Apis::YoutubereportingV1::Empty
|
264
|
+
command.params['jobId'] = job_id unless job_id.nil?
|
265
|
+
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
|
266
|
+
command.query['fields'] = fields unless fields.nil?
|
267
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
268
|
+
execute_or_queue_command(command, &block)
|
269
|
+
end
|
270
|
+
|
271
|
+
# Lists reports created by a specific job. Returns NOT_FOUND if the job does not
|
272
|
+
# exist.
|
273
|
+
# @param [String] job_id
|
274
|
+
# The ID of the job.
|
275
|
+
# @param [String] on_behalf_of_content_owner
|
276
|
+
# The content owner's external ID on which behalf the user is acting on. If not
|
277
|
+
# set, the user is acting for himself (his own channel).
|
278
|
+
# @param [Fixnum] page_size
|
279
|
+
# Requested page size. Server may return fewer report types than requested. If
|
280
|
+
# unspecified, server will pick an appropriate default.
|
281
|
+
# @param [String] page_token
|
282
|
+
# A token identifying a page of results the server should return. Typically,
|
283
|
+
# this is the value of ListReportsResponse.next_page_token returned in response
|
284
|
+
# to the previous call to the `ListReports` method.
|
285
|
+
# @param [String] created_after
|
286
|
+
# If set, only reports created after the specified date/time are returned.
|
287
|
+
# @param [String] fields
|
288
|
+
# Selector specifying which fields to include in a partial response.
|
289
|
+
# @param [String] quota_user
|
290
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
291
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
292
|
+
# @param [Google::Apis::RequestOptions] options
|
293
|
+
# Request-specific options
|
294
|
+
#
|
295
|
+
# @yield [result, err] Result & error if block supplied
|
296
|
+
# @yieldparam result [Google::Apis::YoutubereportingV1::ListReportsResponse] parsed result object
|
297
|
+
# @yieldparam err [StandardError] error object if request failed
|
298
|
+
#
|
299
|
+
# @return [Google::Apis::YoutubereportingV1::ListReportsResponse]
|
300
|
+
#
|
301
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
302
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
303
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
304
|
+
def list_job_reports(job_id, on_behalf_of_content_owner: nil, page_size: nil, page_token: nil, created_after: nil, fields: nil, quota_user: nil, options: nil, &block)
|
305
|
+
command = make_simple_command(:get, 'v1/jobs/{jobId}/reports', options)
|
306
|
+
command.response_representation = Google::Apis::YoutubereportingV1::ListReportsResponse::Representation
|
307
|
+
command.response_class = Google::Apis::YoutubereportingV1::ListReportsResponse
|
308
|
+
command.params['jobId'] = job_id unless job_id.nil?
|
309
|
+
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
|
310
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
311
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
312
|
+
command.query['createdAfter'] = created_after unless created_after.nil?
|
313
|
+
command.query['fields'] = fields unless fields.nil?
|
314
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
315
|
+
execute_or_queue_command(command, &block)
|
316
|
+
end
|
317
|
+
|
318
|
+
# Gets the metadata of a specific report.
|
319
|
+
# @param [String] job_id
|
320
|
+
# The ID of the job.
|
321
|
+
# @param [String] report_id
|
322
|
+
# The ID of the report to retrieve.
|
323
|
+
# @param [String] on_behalf_of_content_owner
|
324
|
+
# The content owner's external ID on which behalf the user is acting on. If not
|
325
|
+
# set, the user is acting for himself (his own channel).
|
326
|
+
# @param [String] fields
|
327
|
+
# Selector specifying which fields to include in a partial response.
|
328
|
+
# @param [String] quota_user
|
329
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
330
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
331
|
+
# @param [Google::Apis::RequestOptions] options
|
332
|
+
# Request-specific options
|
333
|
+
#
|
334
|
+
# @yield [result, err] Result & error if block supplied
|
335
|
+
# @yieldparam result [Google::Apis::YoutubereportingV1::Report] parsed result object
|
336
|
+
# @yieldparam err [StandardError] error object if request failed
|
337
|
+
#
|
338
|
+
# @return [Google::Apis::YoutubereportingV1::Report]
|
339
|
+
#
|
340
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
341
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
342
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
343
|
+
def get_job_report(job_id, report_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
|
344
|
+
command = make_simple_command(:get, 'v1/jobs/{jobId}/reports/{reportId}', options)
|
345
|
+
command.response_representation = Google::Apis::YoutubereportingV1::Report::Representation
|
346
|
+
command.response_class = Google::Apis::YoutubereportingV1::Report
|
347
|
+
command.params['jobId'] = job_id unless job_id.nil?
|
348
|
+
command.params['reportId'] = report_id unless report_id.nil?
|
349
|
+
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
|
350
|
+
command.query['fields'] = fields unless fields.nil?
|
351
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
352
|
+
execute_or_queue_command(command, &block)
|
353
|
+
end
|
354
|
+
|
355
|
+
protected
|
356
|
+
|
357
|
+
def apply_command_defaults(command)
|
358
|
+
command.query['key'] = key unless key.nil?
|
359
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
360
|
+
end
|
361
|
+
end
|
362
|
+
end
|
363
|
+
end
|
364
|
+
end
|