google-api-client 0.52.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +0 -14
- data/CHANGELOG.md +6 -0
- data/OVERVIEW.md +36 -27
- data/generated/google/apis/accesscontextmanager_v1.rb +1 -1
- data/generated/google/apis/accesscontextmanager_v1/classes.rb +326 -0
- data/generated/google/apis/accesscontextmanager_v1/representations.rb +139 -0
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/service.rb +2 -2
- data/generated/google/apis/analyticsadmin_v1alpha.rb +2 -2
- data/generated/google/apis/analyticsadmin_v1alpha/classes.rb +8 -0
- data/generated/google/apis/analyticsadmin_v1alpha/representations.rb +1 -0
- data/generated/google/apis/analyticsadmin_v1alpha/service.rb +12 -1
- data/{lib/google/apis/core/logging.rb → generated/google/apis/apigateway_v1.rb} +14 -10
- data/generated/google/apis/apigateway_v1/classes.rb +1116 -0
- data/generated/google/apis/apigateway_v1/representations.rb +442 -0
- data/generated/google/apis/apigateway_v1/service.rb +1172 -0
- data/generated/google/apis/apigateway_v1beta.rb +1 -1
- data/generated/google/apis/apigateway_v1beta/classes.rb +19 -8
- data/generated/google/apis/apigateway_v1beta/representations.rb +1 -0
- data/generated/google/apis/apigee_v1.rb +1 -1
- data/generated/google/apis/apigee_v1/classes.rb +24 -22
- data/generated/google/apis/apigee_v1/service.rb +50 -48
- data/generated/google/apis/artifactregistry_v1.rb +38 -0
- data/generated/google/apis/artifactregistry_v1/classes.rb +242 -0
- data/generated/google/apis/artifactregistry_v1/representations.rb +116 -0
- data/generated/google/apis/artifactregistry_v1/service.rb +210 -0
- data/generated/google/apis/artifactregistry_v1beta1.rb +1 -1
- data/generated/google/apis/artifactregistry_v1beta1/classes.rb +0 -120
- data/generated/google/apis/artifactregistry_v1beta1/representations.rb +0 -62
- data/generated/google/apis/artifactregistry_v1beta2.rb +1 -1
- data/generated/google/apis/artifactregistry_v1beta2/classes.rb +0 -120
- data/generated/google/apis/artifactregistry_v1beta2/representations.rb +0 -62
- data/generated/google/apis/chat_v1.rb +1 -1
- data/generated/google/apis/chat_v1/service.rb +132 -0
- data/generated/google/apis/cloudasset_v1.rb +1 -1
- data/generated/google/apis/cloudasset_v1/classes.rb +326 -0
- data/generated/google/apis/cloudasset_v1/representations.rb +139 -0
- data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
- data/generated/google/apis/cloudasset_v1beta1/classes.rb +326 -0
- data/generated/google/apis/cloudasset_v1beta1/representations.rb +139 -0
- data/generated/google/apis/cloudasset_v1p5beta1.rb +1 -1
- data/generated/google/apis/cloudasset_v1p5beta1/classes.rb +326 -0
- data/generated/google/apis/cloudasset_v1p5beta1/representations.rb +139 -0
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +3 -3
- data/generated/google/apis/cloudbuild_v1alpha1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1alpha1/classes.rb +3 -3
- data/generated/google/apis/cloudbuild_v1alpha2.rb +1 -1
- data/generated/google/apis/cloudbuild_v1alpha2/classes.rb +3 -3
- data/generated/google/apis/cloudidentity_v1beta1.rb +1 -1
- data/generated/google/apis/cloudidentity_v1beta1/classes.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +0 -26
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +0 -24
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +0 -26
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +0 -24
- data/generated/google/apis/cloudresourcemanager_v2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v2/classes.rb +0 -26
- data/generated/google/apis/cloudresourcemanager_v2/representations.rb +0 -24
- data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +0 -26
- data/generated/google/apis/cloudresourcemanager_v2beta1/representations.rb +0 -24
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +7 -7
- data/generated/google/apis/container_v1beta1.rb +1 -1
- data/generated/google/apis/container_v1beta1/classes.rb +7 -7
- data/generated/google/apis/content_v2_1.rb +1 -1
- data/generated/google/apis/content_v2_1/classes.rb +434 -0
- data/generated/google/apis/content_v2_1/representations.rb +187 -0
- data/generated/google/apis/content_v2_1/service.rb +116 -0
- data/generated/google/apis/datacatalog_v1beta1.rb +1 -1
- data/generated/google/apis/datacatalog_v1beta1/classes.rb +6 -0
- data/generated/google/apis/datacatalog_v1beta1/representations.rb +1 -0
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/datalabeling_v1beta1.rb +1 -1
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +29 -1
- data/generated/google/apis/dataproc_v1/representations.rb +14 -0
- data/generated/google/apis/dataproc_v1/service.rb +42 -0
- data/generated/google/apis/dataproc_v1beta2.rb +1 -1
- data/generated/google/apis/dataproc_v1beta2/classes.rb +29 -1
- data/generated/google/apis/dataproc_v1beta2/representations.rb +14 -0
- data/generated/google/apis/dataproc_v1beta2/service.rb +42 -0
- data/generated/google/apis/dialogflow_v2.rb +1 -1
- data/generated/google/apis/dialogflow_v2/classes.rb +4041 -678
- data/generated/google/apis/dialogflow_v2/representations.rb +1851 -298
- data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
- data/generated/google/apis/dialogflow_v2beta1/classes.rb +4047 -684
- data/generated/google/apis/dialogflow_v2beta1/representations.rb +1862 -309
- data/generated/google/apis/dialogflow_v3.rb +1 -1
- data/generated/google/apis/dialogflow_v3/classes.rb +3120 -311
- data/generated/google/apis/dialogflow_v3/representations.rb +2002 -617
- data/generated/google/apis/dialogflow_v3/service.rb +408 -0
- data/generated/google/apis/dialogflow_v3beta1.rb +1 -1
- data/generated/google/apis/dialogflow_v3beta1/classes.rb +5145 -2336
- data/generated/google/apis/dialogflow_v3beta1/representations.rb +1729 -344
- data/generated/google/apis/dialogflow_v3beta1/service.rb +408 -0
- data/generated/google/apis/dlp_v2.rb +1 -1
- data/generated/google/apis/dlp_v2/service.rb +3 -9
- data/generated/google/apis/documentai_v1beta2.rb +1 -1
- data/generated/google/apis/documentai_v1beta2/classes.rb +5 -92
- data/generated/google/apis/documentai_v1beta2/representations.rb +2 -15
- data/generated/google/apis/documentai_v1beta3.rb +1 -1
- data/generated/google/apis/documentai_v1beta3/classes.rb +5 -92
- data/generated/google/apis/documentai_v1beta3/representations.rb +2 -15
- data/generated/google/apis/gameservices_v1.rb +1 -1
- data/generated/google/apis/gameservices_v1/service.rb +14 -14
- data/generated/google/apis/gameservices_v1beta.rb +1 -1
- data/generated/google/apis/gameservices_v1beta/service.rb +14 -14
- data/generated/google/apis/localservices_v1.rb +4 -1
- data/generated/google/apis/manufacturers_v1.rb +1 -1
- data/generated/google/apis/manufacturers_v1/classes.rb +2 -2
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +2 -2
- data/generated/google/apis/notebooks_v1.rb +1 -1
- data/generated/google/apis/notebooks_v1/classes.rb +13 -0
- data/generated/google/apis/notebooks_v1/representations.rb +12 -0
- data/generated/google/apis/notebooks_v1/service.rb +34 -0
- data/generated/google/apis/prod_tt_sasportal_v1alpha1.rb +1 -1
- data/generated/google/apis/prod_tt_sasportal_v1alpha1/classes.rb +0 -37
- data/generated/google/apis/prod_tt_sasportal_v1alpha1/representations.rb +0 -18
- data/generated/google/apis/recommendationengine_v1beta1.rb +1 -1
- data/generated/google/apis/recommendationengine_v1beta1/service.rb +2 -1
- data/generated/google/apis/securitycenter_v1.rb +1 -1
- data/generated/google/apis/securitycenter_v1/classes.rb +18 -10
- data/generated/google/apis/securitycenter_v1/representations.rb +1 -0
- data/generated/google/apis/securitycenter_v1/service.rb +30 -30
- data/generated/google/apis/securitycenter_v1beta1.rb +1 -1
- data/generated/google/apis/securitycenter_v1beta1/classes.rb +7 -0
- data/generated/google/apis/securitycenter_v1beta1/representations.rb +1 -0
- data/generated/google/apis/securitycenter_v1beta2.rb +1 -1
- data/generated/google/apis/securitycenter_v1beta2/classes.rb +7 -0
- data/generated/google/apis/securitycenter_v1beta2/representations.rb +1 -0
- data/generated/google/apis/servicemanagement_v1.rb +1 -1
- data/generated/google/apis/servicemanagement_v1/classes.rb +11 -10
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +7 -7
- data/generated/google/apis/sqladmin_v1beta4/service.rb +4 -1
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +25 -0
- data/generated/google/apis/storagetransfer_v1/representations.rb +3 -0
- data/generated/google/apis/webmasters_v3/classes.rb +8 -0
- data/generated/google/apis/webmasters_v3/representations.rb +1 -0
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +18 -143
- data/generated/google/apis/youtube_v3/representations.rb +0 -57
- data/generated/google/apis/youtube_v3/service.rb +0 -43
- data/lib/google/apis/version.rb +1 -23
- metadata +27 -263
- data/.github/CONTRIBUTING.md +0 -31
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -36
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -21
- data/.github/ISSUE_TEMPLATE/support_request.md +0 -7
- data/.github/workflows/autoapprove.yml +0 -49
- data/.github/workflows/release-please.yml +0 -57
- data/.gitignore +0 -23
- data/.kokoro/build.bat +0 -11
- data/.kokoro/build.sh +0 -4
- data/.kokoro/continuous/common.cfg +0 -25
- data/.kokoro/continuous/linux.cfg +0 -25
- data/.kokoro/continuous/osx.cfg +0 -8
- data/.kokoro/continuous/post.cfg +0 -30
- data/.kokoro/continuous/windows.cfg +0 -29
- data/.kokoro/osx.sh +0 -4
- data/.kokoro/presubmit/common.cfg +0 -24
- data/.kokoro/presubmit/linux.cfg +0 -24
- data/.kokoro/presubmit/osx.cfg +0 -8
- data/.kokoro/presubmit/windows.cfg +0 -29
- data/.kokoro/release.cfg +0 -94
- data/.kokoro/trampoline.bat +0 -10
- data/.kokoro/trampoline.sh +0 -4
- data/.repo-metadata.json +0 -5
- data/.rspec +0 -2
- data/.rubocop.yml +0 -12
- data/.rubocop_todo.yml +0 -63
- data/CODE_OF_CONDUCT.md +0 -43
- data/Gemfile +0 -55
- data/MIGRATING.md +0 -215
- data/README.md +0 -402
- data/Rakefile +0 -131
- data/api_list_config.yaml +0 -9
- data/api_names.yaml +0 -1082
- data/bin/generate-api +0 -194
- data/docs/api-keys.md +0 -20
- data/docs/auth.md +0 -53
- data/docs/client-secrets.md +0 -69
- data/docs/getting-started.md +0 -340
- data/docs/installation.md +0 -0
- data/docs/logging.md +0 -34
- data/docs/media-upload.md +0 -25
- data/docs/oauth-installed.md +0 -191
- data/docs/oauth-server.md +0 -133
- data/docs/oauth-web.md +0 -280
- data/docs/oauth.md +0 -268
- data/docs/pagination.md +0 -29
- data/docs/performance.md +0 -25
- data/google-api-client.gemspec +0 -36
- data/lib/google/api_client/auth/installed_app.rb +0 -143
- data/lib/google/api_client/auth/key_utils.rb +0 -94
- data/lib/google/api_client/auth/storage.rb +0 -104
- data/lib/google/api_client/auth/storages/file_store.rb +0 -57
- data/lib/google/api_client/auth/storages/redis_store.rb +0 -59
- data/lib/google/api_client/client_secrets.rb +0 -176
- data/lib/google/apis.rb +0 -58
- data/lib/google/apis/core/api_command.rb +0 -209
- data/lib/google/apis/core/base_service.rb +0 -447
- data/lib/google/apis/core/batch.rb +0 -236
- data/lib/google/apis/core/composite_io.rb +0 -97
- data/lib/google/apis/core/download.rb +0 -118
- data/lib/google/apis/core/hashable.rb +0 -44
- data/lib/google/apis/core/http_command.rb +0 -447
- data/lib/google/apis/core/json_representation.rb +0 -153
- data/lib/google/apis/core/multipart.rb +0 -135
- data/lib/google/apis/core/upload.rb +0 -273
- data/lib/google/apis/errors.rb +0 -89
- data/lib/google/apis/generator.rb +0 -71
- data/lib/google/apis/generator/annotator.rb +0 -339
- data/lib/google/apis/generator/helpers.rb +0 -76
- data/lib/google/apis/generator/model.rb +0 -187
- data/lib/google/apis/generator/template.rb +0 -124
- data/lib/google/apis/generator/templates/_class.tmpl +0 -43
- data/lib/google/apis/generator/templates/_method.tmpl +0 -92
- data/lib/google/apis/generator/templates/_representation.tmpl +0 -51
- data/lib/google/apis/generator/templates/_representation_stub.tmpl +0 -17
- data/lib/google/apis/generator/templates/_representation_type.tmpl +0 -10
- data/lib/google/apis/generator/templates/classes.rb.tmpl +0 -29
- data/lib/google/apis/generator/templates/module.rb.tmpl +0 -40
- data/lib/google/apis/generator/templates/representations.rb.tmpl +0 -32
- data/lib/google/apis/generator/templates/service.rb.tmpl +0 -61
- data/lib/google/apis/options.rb +0 -116
- data/rakelib/devsite/devsite_builder.rb +0 -126
- data/rakelib/devsite/link_checker.rb +0 -64
- data/rakelib/devsite/repo_metadata.rb +0 -56
- data/rakelib/metrics.rake +0 -22
- data/rakelib/rubocop.rake +0 -10
- data/rakelib/spec.rake +0 -11
- data/rakelib/yard.rake +0 -11
- data/samples/cli/.env +0 -4
- data/samples/cli/Gemfile +0 -7
- data/samples/cli/README.md +0 -51
- data/samples/cli/google-api-samples +0 -32
- data/samples/cli/lib/base_cli.rb +0 -95
- data/samples/cli/lib/samples/adsense.rb +0 -99
- data/samples/cli/lib/samples/analytics.rb +0 -80
- data/samples/cli/lib/samples/androidpublisher.rb +0 -47
- data/samples/cli/lib/samples/bigquery.rb +0 -101
- data/samples/cli/lib/samples/calendar.rb +0 -83
- data/samples/cli/lib/samples/drive.rb +0 -82
- data/samples/cli/lib/samples/gmail.rb +0 -157
- data/samples/cli/lib/samples/pubsub.rb +0 -114
- data/samples/cli/lib/samples/sheets.rb +0 -61
- data/samples/cli/lib/samples/translate.rb +0 -44
- data/samples/cli/lib/samples/vision.rb +0 -69
- data/samples/cli/lib/samples/you_tube.rb +0 -47
- data/samples/web/Gemfile +0 -9
- data/samples/web/README.md +0 -44
- data/samples/web/app.rb +0 -120
- data/samples/web/views/calendar.erb +0 -34
- data/samples/web/views/drive.erb +0 -33
- data/samples/web/views/home.erb +0 -34
- data/samples/web/views/layout.erb +0 -40
- data/synth.py +0 -40
data/.kokoro/release.cfg
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
# Format: //devtools/kokoro/config/proto/build.proto
|
2
|
-
|
3
|
-
# Build logs will be here
|
4
|
-
action {
|
5
|
-
define_artifacts {
|
6
|
-
regex: "**/*sponge_log.xml"
|
7
|
-
}
|
8
|
-
}
|
9
|
-
|
10
|
-
# Fetch the token needed for reporting release status to GitHub
|
11
|
-
before_action {
|
12
|
-
fetch_keystore {
|
13
|
-
keystore_resource {
|
14
|
-
keystore_config_id: 73713
|
15
|
-
keyname: "yoshi-automation-github-key"
|
16
|
-
}
|
17
|
-
}
|
18
|
-
}
|
19
|
-
|
20
|
-
# Fetch magictoken to use with Magic Github Proxy
|
21
|
-
before_action {
|
22
|
-
fetch_keystore {
|
23
|
-
keystore_resource {
|
24
|
-
keystore_config_id: 73713
|
25
|
-
keyname: "releasetool-magictoken"
|
26
|
-
backend_type: FASTCONFIGPUSH
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
30
|
-
|
31
|
-
# Fetch api key to use with Magic Github Proxy
|
32
|
-
before_action {
|
33
|
-
fetch_keystore {
|
34
|
-
keystore_resource {
|
35
|
-
keystore_config_id: 73713
|
36
|
-
keyname: "magic-github-proxy-api-key"
|
37
|
-
backend_type: FASTCONFIGPUSH
|
38
|
-
}
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
before_action {
|
43
|
-
fetch_keystore {
|
44
|
-
keystore_resource {
|
45
|
-
keystore_config_id: 73713
|
46
|
-
keyname: "docuploader_service_account"
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
|
51
|
-
# Download resources for system tests (service account key, etc.)
|
52
|
-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-ruby"
|
53
|
-
|
54
|
-
# Download trampoline resources.
|
55
|
-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
|
56
|
-
|
57
|
-
# Use the trampoline script to run in docker.
|
58
|
-
build_file: "google-api-ruby-client/.kokoro/trampoline.sh"
|
59
|
-
|
60
|
-
# Configure the docker image for kokoro-trampoline.
|
61
|
-
env_vars: {
|
62
|
-
key: "TRAMPOLINE_IMAGE"
|
63
|
-
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/release"
|
64
|
-
}
|
65
|
-
|
66
|
-
env_vars: {
|
67
|
-
key: "TRAMPOLINE_BUILD_FILE"
|
68
|
-
value: "github/google-api-ruby-client/.kokoro/build.sh"
|
69
|
-
}
|
70
|
-
|
71
|
-
env_vars: {
|
72
|
-
key: "TRAMPOLINE_SCRIPT"
|
73
|
-
value: "trampoline_v1.py"
|
74
|
-
}
|
75
|
-
|
76
|
-
env_vars: {
|
77
|
-
key: "JOB_TYPE"
|
78
|
-
value: "release"
|
79
|
-
}
|
80
|
-
|
81
|
-
env_vars: {
|
82
|
-
key: "OS"
|
83
|
-
value: "linux"
|
84
|
-
}
|
85
|
-
|
86
|
-
env_vars: {
|
87
|
-
key: "REPO_DIR"
|
88
|
-
value: "github/google-api-ruby-client"
|
89
|
-
}
|
90
|
-
|
91
|
-
env_vars: {
|
92
|
-
key: "PACKAGE"
|
93
|
-
value: "google-api-client"
|
94
|
-
}
|
data/.kokoro/trampoline.bat
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
|
2
|
-
SET url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/trampoline.bat"
|
3
|
-
|
4
|
-
SET "download=powershell -C Invoke-WebRequest -Uri %url% -OutFile master-trampoline.bat"
|
5
|
-
|
6
|
-
SET EXIT_STATUS=1
|
7
|
-
|
8
|
-
%download% && master-trampoline.bat && SET EXIT_STATUS=0
|
9
|
-
|
10
|
-
EXIT %EXIT_STATUS%
|
data/.kokoro/trampoline.sh
DELETED
data/.repo-metadata.json
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/.rubocop_todo.yml
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2015-03-25 23:30:36 -0700 using RuboCop version 0.29.1.
|
3
|
-
# The point is for the user to remove these configuration records
|
4
|
-
# one by one as the offenses are removed from the code base.
|
5
|
-
# Note that changes in the inspected code, or installation of new
|
6
|
-
# versions of RuboCop, may require this file to be generated again.
|
7
|
-
|
8
|
-
# Offense count: 19
|
9
|
-
Metrics/AbcSize:
|
10
|
-
Max: 79
|
11
|
-
|
12
|
-
# Offense count: 2
|
13
|
-
# Configuration parameters: CountComments.
|
14
|
-
Metrics/ClassLength:
|
15
|
-
Max: 220
|
16
|
-
|
17
|
-
# Offense count: 5
|
18
|
-
Metrics/CyclomaticComplexity:
|
19
|
-
Max: 10
|
20
|
-
|
21
|
-
# Offense count: 99
|
22
|
-
# Configuration parameters: AllowURI, URISchemes.
|
23
|
-
Metrics/LineLength:
|
24
|
-
Max: 127
|
25
|
-
|
26
|
-
# Offense count: 18
|
27
|
-
# Configuration parameters: CountComments.
|
28
|
-
Metrics/MethodLength:
|
29
|
-
Max: 43
|
30
|
-
|
31
|
-
# Offense count: 1
|
32
|
-
# Configuration parameters: CountKeywordArgs.
|
33
|
-
Metrics/ParameterLists:
|
34
|
-
Max: 6
|
35
|
-
|
36
|
-
# Offense count: 4
|
37
|
-
Metrics/PerceivedComplexity:
|
38
|
-
Max: 11
|
39
|
-
|
40
|
-
# Offense count: 14
|
41
|
-
Style/Documentation:
|
42
|
-
Enabled: false
|
43
|
-
|
44
|
-
# Offense count: 1
|
45
|
-
# Cop supports --auto-correct.
|
46
|
-
Style/EmptyLines:
|
47
|
-
Enabled: false
|
48
|
-
|
49
|
-
# Offense count: 3
|
50
|
-
# Cop supports --auto-correct.
|
51
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
52
|
-
Style/EmptyLinesAroundClassBody:
|
53
|
-
Enabled: false
|
54
|
-
|
55
|
-
# Offense count: 2
|
56
|
-
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
|
57
|
-
Style/Next:
|
58
|
-
Enabled: false
|
59
|
-
|
60
|
-
# Offense count: 3
|
61
|
-
# Cop supports --auto-correct.
|
62
|
-
Style/RedundantSelf:
|
63
|
-
Enabled: false
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project,
|
4
|
-
and in the interest of fostering an open and welcoming community,
|
5
|
-
we pledge to respect all people who contribute through reporting issues,
|
6
|
-
posting feature requests, updating documentation,
|
7
|
-
submitting pull requests or patches, and other activities.
|
8
|
-
|
9
|
-
We are committed to making participation in this project
|
10
|
-
a harassment-free experience for everyone,
|
11
|
-
regardless of level of experience, gender, gender identity and expression,
|
12
|
-
sexual orientation, disability, personal appearance,
|
13
|
-
body size, race, ethnicity, age, religion, or nationality.
|
14
|
-
|
15
|
-
Examples of unacceptable behavior by participants include:
|
16
|
-
|
17
|
-
* The use of sexualized language or imagery
|
18
|
-
* Personal attacks
|
19
|
-
* Trolling or insulting/derogatory comments
|
20
|
-
* Public or private harassment
|
21
|
-
* Publishing other's private information,
|
22
|
-
such as physical or electronic
|
23
|
-
addresses, without explicit permission
|
24
|
-
* Other unethical or unprofessional conduct.
|
25
|
-
|
26
|
-
Project maintainers have the right and responsibility to remove, edit, or reject
|
27
|
-
comments, commits, code, wiki edits, issues, and other contributions
|
28
|
-
that are not aligned to this Code of Conduct.
|
29
|
-
By adopting this Code of Conduct,
|
30
|
-
project maintainers commit themselves to fairly and consistently
|
31
|
-
applying these principles to every aspect of managing this project.
|
32
|
-
Project maintainers who do not follow or enforce the Code of Conduct
|
33
|
-
may be permanently removed from the project team.
|
34
|
-
|
35
|
-
This code of conduct applies both within project spaces and in public spaces
|
36
|
-
when an individual is representing the project or its community.
|
37
|
-
|
38
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior
|
39
|
-
may be reported by opening an issue
|
40
|
-
or contacting one or more of the project maintainers.
|
41
|
-
|
42
|
-
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
|
43
|
-
available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
|
data/Gemfile
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in google-apis.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
|
7
|
-
group :development do
|
8
|
-
gem 'bundler', '>= 1.7'
|
9
|
-
gem 'rake', '~> 11.2'
|
10
|
-
gem 'rspec', '~> 3.1'
|
11
|
-
gem 'json_spec', '~> 1.1'
|
12
|
-
gem 'webmock', '~> 2.1'
|
13
|
-
gem 'simplecov', '~> 0.12'
|
14
|
-
gem 'coveralls', '~> 0.8'
|
15
|
-
gem 'rubocop', '~> 0.49.0'
|
16
|
-
gem 'launchy', '~> 2.4'
|
17
|
-
gem 'dotenv', '~> 2.0'
|
18
|
-
gem 'fakefs', '~> 0.6', require: "fakefs/safe"
|
19
|
-
gem 'google-id-token', '~> 1.3'
|
20
|
-
gem 'os', '~> 0.9'
|
21
|
-
gem 'rmail', '~> 1.1'
|
22
|
-
gem 'redis', '~> 3.2'
|
23
|
-
gem 'logging', '~> 2.2'
|
24
|
-
gem 'opencensus', '~> 0.4'
|
25
|
-
gem 'httparty'
|
26
|
-
gem 'gems', '~> 1.2'
|
27
|
-
end
|
28
|
-
|
29
|
-
platforms :jruby do
|
30
|
-
group :development do
|
31
|
-
gem 'jruby-openssl'
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
platforms :ruby do
|
36
|
-
group :development do
|
37
|
-
gem 'yard', '~> 0.9', '>= 0.9.11'
|
38
|
-
gem 'redcarpet', '~> 3.2'
|
39
|
-
gem 'github-markup', '~> 1.3'
|
40
|
-
gem 'pry-doc', '~> 0.8'
|
41
|
-
gem 'pry-byebug', '~> 3.2'
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
platforms :mri_21, :mri_22, :mri_23 do
|
46
|
-
group :development do
|
47
|
-
gem 'derailed_benchmarks'
|
48
|
-
gem 'stackprof'
|
49
|
-
gem 'rack-test'
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
if ENV['RAILS_VERSION']
|
54
|
-
gem 'rails', ENV['RAILS_VERSION']
|
55
|
-
end
|
data/MIGRATING.md
DELETED
@@ -1,215 +0,0 @@
|
|
1
|
-
# Migrating from version`0.10` to `0.11`
|
2
|
-
|
3
|
-
## Unicode normalization
|
4
|
-
|
5
|
-
The client no longer normalizes unicode strings in path parameters. This may affect
|
6
|
-
some applications using multibyte strings that were previously normalized.:
|
7
|
-
To restore the previous behavior, use the `normalize_unicode` request option.
|
8
|
-
|
9
|
-
## Type change for large numbers
|
10
|
-
|
11
|
-
Previously, types declared as 64 bit numbers were mapped to strings. These are now mapped to
|
12
|
-
`Fixednum`/`Bignum`.
|
13
|
-
|
14
|
-
## Timeouts
|
15
|
-
|
16
|
-
Timeout options have been moved from `RequestOptions` to `ClientOptions`.
|
17
|
-
|
18
|
-
Old | New
|
19
|
-
----------------------------------|-----------------
|
20
|
-
`RequestOptions.open_timeout_sec` | `ClientOptions.open_timeout_sec`
|
21
|
-
`RequestOptions.timeout_sec` | `ClientOptions.read_timeout_sec`
|
22
|
-
`RequestOptions.timeout_sec` | `ClientOptions.send_timeout_sec`
|
23
|
-
|
24
|
-
## Batch requests across services no longer supported
|
25
|
-
|
26
|
-
It is no longer possible to combine multiple services (e.g. Gail & Drive)
|
27
|
-
in a batch request. If batching requests that span services, group
|
28
|
-
requests for each service in their own batch request.
|
29
|
-
|
30
|
-
# Migrating from version `0.9.x` to `0.10`
|
31
|
-
|
32
|
-
Only one minor breaking change was introduced in the `to_json` method due to a version bump for the `representable` gem from `2.3` to `3.0`. If you used the `skip_undefined` in `to_json`, you should replace that with `user_options: { skip_undefined: true }`.
|
33
|
-
|
34
|
-
ex:
|
35
|
-
```ruby
|
36
|
-
foo.to_json(skip_undefined: true)
|
37
|
-
```
|
38
|
-
to
|
39
|
-
```ruby
|
40
|
-
foo.to_json(user_options: { skip_undefined: true })
|
41
|
-
```
|
42
|
-
|
43
|
-
# Migrating from version `0.8.x` to `0.9` or above
|
44
|
-
|
45
|
-
Many changes and improvements have been made to the `google-api-ruby-client`
|
46
|
-
library to bring it to `0.9`. If you are starting a new project or haven't used
|
47
|
-
this library before version `0.9`, see the [README](README.md) to get started
|
48
|
-
as you won't need to migrate anything.
|
49
|
-
|
50
|
-
Code written against the `0.8.x` version of this library will not work with the `0.9`
|
51
|
-
version without modification.
|
52
|
-
|
53
|
-
## Discovery
|
54
|
-
|
55
|
-
In `0.8.x` the library would "discover" APIs on the fly, introducing
|
56
|
-
additional network calls and instability. That has been fixed in `0.9`.
|
57
|
-
|
58
|
-
To get the `drive` client in `0.8.x` required this:
|
59
|
-
|
60
|
-
```ruby
|
61
|
-
require 'google/api_client'
|
62
|
-
|
63
|
-
client = Google::APIClient.new
|
64
|
-
drive = client.discovered_api('drive', 'v2')
|
65
|
-
```
|
66
|
-
|
67
|
-
In `0.9` the same thing can be accomplished like this:
|
68
|
-
|
69
|
-
```ruby
|
70
|
-
require 'google/apis/drive_v2'
|
71
|
-
|
72
|
-
drive = Google::Apis::DriveV2::DriveService.new
|
73
|
-
```
|
74
|
-
|
75
|
-
All APIs are immediately accessible without requiring additional network calls or runtime code generation.
|
76
|
-
|
77
|
-
## API Methods
|
78
|
-
|
79
|
-
The calling style for API methods has changed. In `0.8.x` all calls were via a generic `execute` method. In `0.9`
|
80
|
-
the generated services have fully defined method signatures for all available methods.
|
81
|
-
|
82
|
-
To get a file using the Google Drive API in `0.8.x` required this:
|
83
|
-
|
84
|
-
```ruby
|
85
|
-
file = client.execute(:api_method => drive.file.get, :parameters => { 'id' => 'abc123' })
|
86
|
-
```
|
87
|
-
|
88
|
-
In `0.9` the same thing can be accomplished like this:
|
89
|
-
|
90
|
-
```ruby
|
91
|
-
file = drive.get_file('abc123')
|
92
|
-
```
|
93
|
-
|
94
|
-
Full API definitions including available methods, parameters, and data classes can be found in the `generated` directory.
|
95
|
-
|
96
|
-
## Authorization
|
97
|
-
|
98
|
-
In the 0.9 version of this library, the authentication and authorization code was moved
|
99
|
-
to the new [googleauth](https://github.com/google/google-auth-library-ruby) library. While the new library provides
|
100
|
-
significantly simpler APIs for some use cases, not all features have been migrated. Missing features
|
101
|
-
are expected to be added by end of Q2 2015.
|
102
|
-
|
103
|
-
The underlying [Signet](https://github.com/google/signet) is still used for authorization. OAuth 2 credentials obtained
|
104
|
-
previously will continue to work with the `0.9` version. OAuth 1 is no longer supported.
|
105
|
-
|
106
|
-
If you were using a PKCS12 file to authorize, we recommend you generate a new key for the service account using the JSON format ( client_secret.json) file with googleauth.
|
107
|
-
|
108
|
-
## Media uploads
|
109
|
-
|
110
|
-
Media uploads are significantly simpler in `0.9`.
|
111
|
-
|
112
|
-
The old `0.8.x` way of uploading media:
|
113
|
-
|
114
|
-
```ruby
|
115
|
-
media = Google::APIClient::UploadIO.new('mymovie.m4v', 'video/mp4')
|
116
|
-
metadata = {
|
117
|
-
'title' => 'My movie',
|
118
|
-
'description' => 'The best home movie ever made'
|
119
|
-
}
|
120
|
-
client.execute(:api_method => drive.files.insert,
|
121
|
-
:parameters => { 'uploadType' => 'multipart' },
|
122
|
-
:body_object => metadata,
|
123
|
-
:media => media )
|
124
|
-
```
|
125
|
-
|
126
|
-
The new way in `0.9` using `upload_source` and `content_type` parameters:
|
127
|
-
|
128
|
-
```ruby
|
129
|
-
metadata = {
|
130
|
-
title: 'My movie',
|
131
|
-
description: 'The best home movie ever made'
|
132
|
-
}
|
133
|
-
drive.insert_file(metadata, upload_source: 'mymovie.m4v', content_type: 'video/mp4')
|
134
|
-
```
|
135
|
-
|
136
|
-
`upload_source` can be either a path to a file, an `IO` stream, or a `StringIO` instance.
|
137
|
-
|
138
|
-
Uploads are resumable and will be automatically retried if interrupted.
|
139
|
-
|
140
|
-
## Media downloads
|
141
|
-
|
142
|
-
`0.9` introduces support for media downloads (`alt=media`). To download content, use the `download_dest` parameter:
|
143
|
-
|
144
|
-
```ruby
|
145
|
-
drive.get_file('abc123', download_dest: '/tmp/myfile.txt')
|
146
|
-
```
|
147
|
-
|
148
|
-
`download_dest` may be either a path to a file or an `IO` stream.
|
149
|
-
|
150
|
-
## Batch Requests
|
151
|
-
|
152
|
-
The old `0.8.x` way of performing batch requests:
|
153
|
-
|
154
|
-
```ruby
|
155
|
-
client = Google::APIClient.new
|
156
|
-
urlshortener = client.discovered_api('urlshortener')
|
157
|
-
|
158
|
-
batch = Google::APIClient::BatchRequest.new do |result|
|
159
|
-
puts result.data
|
160
|
-
end
|
161
|
-
|
162
|
-
batch.add(:api_method => urlshortener.url.insert,
|
163
|
-
:body_object => { 'longUrl' => 'http://example.com/foo' })
|
164
|
-
batch.add(:api_method => urlshortener.url.insert,
|
165
|
-
:body_object => { 'longUrl' => 'http://example.com/bar' })
|
166
|
-
client.execute(batch)
|
167
|
-
```
|
168
|
-
|
169
|
-
In `0.9`, the equivalent code is:
|
170
|
-
|
171
|
-
```ruby
|
172
|
-
require 'google/apis/urlshortener_v1'
|
173
|
-
|
174
|
-
urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new
|
175
|
-
|
176
|
-
urlshortener.batch do |urlshortener|
|
177
|
-
urlshortener.insert_url({long_url: 'http://example.com/foo'}) do |res, err|
|
178
|
-
puts res
|
179
|
-
end
|
180
|
-
urlshortener.insert_url({long_url: 'http://example.com/bar'}) do |res, err|
|
181
|
-
puts res
|
182
|
-
end
|
183
|
-
end
|
184
|
-
```
|
185
|
-
|
186
|
-
Or if sharing the same block:
|
187
|
-
|
188
|
-
```ruby
|
189
|
-
require 'google/apis/urlshortener_v1'
|
190
|
-
|
191
|
-
urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new
|
192
|
-
|
193
|
-
callback = lambda { |res, err| puts res }
|
194
|
-
urlshortener.batch do |urlshortener|
|
195
|
-
urlshortener.insert_url({long_url: 'http://example.com/foo'}, &callback)
|
196
|
-
urlshortener.insert_url({long_url: 'http://example.com/bar'}, &callback)
|
197
|
-
end
|
198
|
-
```
|
199
|
-
|
200
|
-
## JRuby
|
201
|
-
|
202
|
-
Jruby 1.7.4 in 2.0 compatibility mode is supported. To enable for a specific script:
|
203
|
-
|
204
|
-
```
|
205
|
-
jruby --2.0 myscript.rb
|
206
|
-
```
|
207
|
-
|
208
|
-
Or set as the default:
|
209
|
-
|
210
|
-
```
|
211
|
-
export JRUBY_OPTS=--2.0
|
212
|
-
```
|
213
|
-
|
214
|
-
JRuby 9000 will be supported once released.
|
215
|
-
|