google-api-client 0.9.pre3 → 0.9.pre4
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/.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
|
@@ -62,6 +62,10 @@ module Google
|
|
|
62
62
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
+
class GetProjectConfigResponse
|
|
66
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
67
|
+
end
|
|
68
|
+
|
|
65
69
|
class ResetPasswordRequest
|
|
66
70
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
67
71
|
end
|
|
@@ -82,6 +86,10 @@ module Google
|
|
|
82
86
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
83
87
|
end
|
|
84
88
|
|
|
89
|
+
class IdpConfig
|
|
90
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
91
|
+
end
|
|
92
|
+
|
|
85
93
|
class Relyingparty
|
|
86
94
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
87
95
|
end
|
|
@@ -131,6 +139,7 @@ module Google
|
|
|
131
139
|
property :kind, as: 'kind'
|
|
132
140
|
property :provider_id, as: 'providerId'
|
|
133
141
|
property :registered, as: 'registered'
|
|
142
|
+
property :session_id, as: 'sessionId'
|
|
134
143
|
end
|
|
135
144
|
end
|
|
136
145
|
|
|
@@ -163,6 +172,7 @@ module Google
|
|
|
163
172
|
class GetOobConfirmationCodeResponse
|
|
164
173
|
# @private
|
|
165
174
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
175
|
+
property :email, as: 'email'
|
|
166
176
|
property :kind, as: 'kind'
|
|
167
177
|
property :oob_code, as: 'oobCode'
|
|
168
178
|
end
|
|
@@ -217,6 +227,17 @@ module Google
|
|
|
217
227
|
end
|
|
218
228
|
end
|
|
219
229
|
|
|
230
|
+
class GetProjectConfigResponse
|
|
231
|
+
# @private
|
|
232
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
233
|
+
property :allow_password_user, as: 'allowPasswordUser'
|
|
234
|
+
property :api_key, as: 'apiKey'
|
|
235
|
+
collection :idp_config, as: 'idpConfig', class: Google::Apis::IdentitytoolkitV3::IdpConfig, decorator: Google::Apis::IdentitytoolkitV3::IdpConfig::Representation
|
|
236
|
+
|
|
237
|
+
property :project_id, as: 'projectId'
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
|
|
220
241
|
class ResetPasswordRequest
|
|
221
242
|
# @private
|
|
222
243
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -266,6 +287,7 @@ module Google
|
|
|
266
287
|
property :post_body, as: 'postBody'
|
|
267
288
|
property :request_uri, as: 'requestUri'
|
|
268
289
|
property :return_refresh_token, as: 'returnRefreshToken'
|
|
290
|
+
property :session_id, as: 'sessionId'
|
|
269
291
|
end
|
|
270
292
|
end
|
|
271
293
|
|
|
@@ -280,6 +302,16 @@ module Google
|
|
|
280
302
|
end
|
|
281
303
|
end
|
|
282
304
|
|
|
305
|
+
class IdpConfig
|
|
306
|
+
# @private
|
|
307
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
308
|
+
property :client_id, as: 'clientId'
|
|
309
|
+
property :enabled, as: 'enabled'
|
|
310
|
+
property :experiment_percent, as: 'experimentPercent'
|
|
311
|
+
property :provider, as: 'provider'
|
|
312
|
+
end
|
|
313
|
+
end
|
|
314
|
+
|
|
283
315
|
class Relyingparty
|
|
284
316
|
# @private
|
|
285
317
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -309,6 +341,7 @@ module Google
|
|
|
309
341
|
property :email, as: 'email'
|
|
310
342
|
property :id_token, as: 'idToken'
|
|
311
343
|
property :kind, as: 'kind'
|
|
344
|
+
property :new_email, as: 'newEmail'
|
|
312
345
|
collection :provider_user_info, as: 'providerUserInfo', class: Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse::ProviderUserInfo, decorator: Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse::ProviderUserInfo::Representation
|
|
313
346
|
|
|
314
347
|
end
|
|
@@ -391,6 +424,7 @@ module Google
|
|
|
391
424
|
property :last_name, as: 'lastName'
|
|
392
425
|
property :local_id, as: 'localId'
|
|
393
426
|
property :need_confirmation, as: 'needConfirmation'
|
|
427
|
+
property :need_email, as: 'needEmail'
|
|
394
428
|
property :nick_name, as: 'nickName'
|
|
395
429
|
property :oauth_access_token, as: 'oauthAccessToken'
|
|
396
430
|
property :oauth_authorization_code, as: 'oauthAuthorizationCode'
|
|
@@ -413,6 +447,9 @@ module Google
|
|
|
413
447
|
property :id_token, as: 'idToken'
|
|
414
448
|
property :kind, as: 'kind'
|
|
415
449
|
property :local_id, as: 'localId'
|
|
450
|
+
property :oauth_access_token, as: 'oauthAccessToken'
|
|
451
|
+
property :oauth_authorization_code, as: 'oauthAuthorizationCode'
|
|
452
|
+
property :oauth_expire_in, as: 'oauthExpireIn'
|
|
416
453
|
property :photo_url, as: 'photoUrl'
|
|
417
454
|
property :registered, as: 'registered'
|
|
418
455
|
end
|
|
@@ -76,8 +76,7 @@ module Google
|
|
|
76
76
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
77
77
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
78
78
|
def create_auth_uri(create_auth_uri_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
79
|
-
|
|
80
|
-
command = make_simple_command(:post, path, options)
|
|
79
|
+
command = make_simple_command(:post, 'createAuthUri', options)
|
|
81
80
|
command.request_representation = Google::Apis::IdentitytoolkitV3::CreateAuthUriRequest::Representation
|
|
82
81
|
command.request_object = create_auth_uri_request_object
|
|
83
82
|
command.response_representation = Google::Apis::IdentitytoolkitV3::CreateAuthUriResponse::Representation
|
|
@@ -112,8 +111,7 @@ module Google
|
|
|
112
111
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
113
112
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
114
113
|
def delete_account(delete_account_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
115
|
-
|
|
116
|
-
command = make_simple_command(:post, path, options)
|
|
114
|
+
command = make_simple_command(:post, 'deleteAccount', options)
|
|
117
115
|
command.request_representation = Google::Apis::IdentitytoolkitV3::DeleteAccountRequest::Representation
|
|
118
116
|
command.request_object = delete_account_request_object
|
|
119
117
|
command.response_representation = Google::Apis::IdentitytoolkitV3::DeleteAccountResponse::Representation
|
|
@@ -148,8 +146,7 @@ module Google
|
|
|
148
146
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
149
147
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
150
148
|
def download_account(download_account_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
151
|
-
|
|
152
|
-
command = make_simple_command(:post, path, options)
|
|
149
|
+
command = make_simple_command(:post, 'downloadAccount', options)
|
|
153
150
|
command.request_representation = Google::Apis::IdentitytoolkitV3::DownloadAccountRequest::Representation
|
|
154
151
|
command.request_object = download_account_request_object
|
|
155
152
|
command.response_representation = Google::Apis::IdentitytoolkitV3::DownloadAccountResponse::Representation
|
|
@@ -184,8 +181,7 @@ module Google
|
|
|
184
181
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
185
182
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
186
183
|
def get_account_info(get_account_info_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
187
|
-
|
|
188
|
-
command = make_simple_command(:post, path, options)
|
|
184
|
+
command = make_simple_command(:post, 'getAccountInfo', options)
|
|
189
185
|
command.request_representation = Google::Apis::IdentitytoolkitV3::GetAccountInfoRequest::Representation
|
|
190
186
|
command.request_object = get_account_info_request_object
|
|
191
187
|
command.response_representation = Google::Apis::IdentitytoolkitV3::GetAccountInfoResponse::Representation
|
|
@@ -220,8 +216,7 @@ module Google
|
|
|
220
216
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
221
217
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
222
218
|
def get_oob_confirmation_code(relyingparty_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
223
|
-
|
|
224
|
-
command = make_simple_command(:post, path, options)
|
|
219
|
+
command = make_simple_command(:post, 'getOobConfirmationCode', options)
|
|
225
220
|
command.request_representation = Google::Apis::IdentitytoolkitV3::Relyingparty::Representation
|
|
226
221
|
command.request_object = relyingparty_object
|
|
227
222
|
command.response_representation = Google::Apis::IdentitytoolkitV3::GetOobConfirmationCodeResponse::Representation
|
|
@@ -232,6 +227,38 @@ module Google
|
|
|
232
227
|
execute_or_queue_command(command, &block)
|
|
233
228
|
end
|
|
234
229
|
|
|
230
|
+
# Get project configuration.
|
|
231
|
+
# @param [String] fields
|
|
232
|
+
# Selector specifying which fields to include in a partial response.
|
|
233
|
+
# @param [String] quota_user
|
|
234
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
235
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
236
|
+
# Overrides userIp if both are provided.
|
|
237
|
+
# @param [String] user_ip
|
|
238
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
239
|
+
# enforce per-user limits.
|
|
240
|
+
# @param [Google::Apis::RequestOptions] options
|
|
241
|
+
# Request-specific options
|
|
242
|
+
#
|
|
243
|
+
# @yield [result, err] Result & error if block supplied
|
|
244
|
+
# @yieldparam result [Google::Apis::IdentitytoolkitV3::GetProjectConfigResponse] parsed result object
|
|
245
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
246
|
+
#
|
|
247
|
+
# @return [Google::Apis::IdentitytoolkitV3::GetProjectConfigResponse]
|
|
248
|
+
#
|
|
249
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
250
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
251
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
252
|
+
def get_relyingparty_project_config(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
253
|
+
command = make_simple_command(:get, 'getProjectConfig', options)
|
|
254
|
+
command.response_representation = Google::Apis::IdentitytoolkitV3::GetProjectConfigResponse::Representation
|
|
255
|
+
command.response_class = Google::Apis::IdentitytoolkitV3::GetProjectConfigResponse
|
|
256
|
+
command.query['fields'] = fields unless fields.nil?
|
|
257
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
258
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
259
|
+
execute_or_queue_command(command, &block)
|
|
260
|
+
end
|
|
261
|
+
|
|
235
262
|
# Get token signing public key.
|
|
236
263
|
# @param [String] fields
|
|
237
264
|
# Selector specifying which fields to include in a partial response.
|
|
@@ -255,8 +282,7 @@ module Google
|
|
|
255
282
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
256
283
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
257
284
|
def get_public_keys(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
258
|
-
|
|
259
|
-
command = make_simple_command(:get, path, options)
|
|
285
|
+
command = make_simple_command(:get, 'publicKeys', options)
|
|
260
286
|
command.response_representation = Hash<String,String>::Representation
|
|
261
287
|
command.response_class = Hash<String,String>
|
|
262
288
|
command.query['fields'] = fields unless fields.nil?
|
|
@@ -288,8 +314,7 @@ module Google
|
|
|
288
314
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
289
315
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
290
316
|
def get_recaptcha_param(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
291
|
-
|
|
292
|
-
command = make_simple_command(:get, path, options)
|
|
317
|
+
command = make_simple_command(:get, 'getRecaptchaParam', options)
|
|
293
318
|
command.response_representation = Google::Apis::IdentitytoolkitV3::GetRecaptchaParamResponse::Representation
|
|
294
319
|
command.response_class = Google::Apis::IdentitytoolkitV3::GetRecaptchaParamResponse
|
|
295
320
|
command.query['fields'] = fields unless fields.nil?
|
|
@@ -322,8 +347,7 @@ module Google
|
|
|
322
347
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
323
348
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
324
349
|
def reset_password(reset_password_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
325
|
-
|
|
326
|
-
command = make_simple_command(:post, path, options)
|
|
350
|
+
command = make_simple_command(:post, 'resetPassword', options)
|
|
327
351
|
command.request_representation = Google::Apis::IdentitytoolkitV3::ResetPasswordRequest::Representation
|
|
328
352
|
command.request_object = reset_password_request_object
|
|
329
353
|
command.response_representation = Google::Apis::IdentitytoolkitV3::ResetPasswordResponse::Representation
|
|
@@ -358,8 +382,7 @@ module Google
|
|
|
358
382
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
359
383
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
360
384
|
def set_account_info(set_account_info_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
361
|
-
|
|
362
|
-
command = make_simple_command(:post, path, options)
|
|
385
|
+
command = make_simple_command(:post, 'setAccountInfo', options)
|
|
363
386
|
command.request_representation = Google::Apis::IdentitytoolkitV3::SetAccountInfoRequest::Representation
|
|
364
387
|
command.request_object = set_account_info_request_object
|
|
365
388
|
command.response_representation = Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse::Representation
|
|
@@ -394,8 +417,7 @@ module Google
|
|
|
394
417
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
395
418
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
396
419
|
def upload_account(upload_account_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
397
|
-
|
|
398
|
-
command = make_simple_command(:post, path, options)
|
|
420
|
+
command = make_simple_command(:post, 'uploadAccount', options)
|
|
399
421
|
command.request_representation = Google::Apis::IdentitytoolkitV3::UploadAccountRequest::Representation
|
|
400
422
|
command.request_object = upload_account_request_object
|
|
401
423
|
command.response_representation = Google::Apis::IdentitytoolkitV3::UploadAccountResponse::Representation
|
|
@@ -430,8 +452,7 @@ module Google
|
|
|
430
452
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
431
453
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
432
454
|
def verify_assertion(verify_assertion_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
433
|
-
|
|
434
|
-
command = make_simple_command(:post, path, options)
|
|
455
|
+
command = make_simple_command(:post, 'verifyAssertion', options)
|
|
435
456
|
command.request_representation = Google::Apis::IdentitytoolkitV3::VerifyAssertionRequest::Representation
|
|
436
457
|
command.request_object = verify_assertion_request_object
|
|
437
458
|
command.response_representation = Google::Apis::IdentitytoolkitV3::VerifyAssertionResponse::Representation
|
|
@@ -466,8 +487,7 @@ module Google
|
|
|
466
487
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
467
488
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
468
489
|
def verify_password(verify_password_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
469
|
-
|
|
470
|
-
command = make_simple_command(:post, path, options)
|
|
490
|
+
command = make_simple_command(:post, 'verifyPassword', options)
|
|
471
491
|
command.request_representation = Google::Apis::IdentitytoolkitV3::VerifyPasswordRequest::Representation
|
|
472
492
|
command.request_object = verify_password_request_object
|
|
473
493
|
command.response_representation = Google::Apis::IdentitytoolkitV3::VerifyPasswordResponse::Representation
|
|
@@ -0,0 +1,32 @@
|
|
|
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/kgsearch_v1/service.rb'
|
|
16
|
+
require 'google/apis/kgsearch_v1/classes.rb'
|
|
17
|
+
require 'google/apis/kgsearch_v1/representations.rb'
|
|
18
|
+
|
|
19
|
+
module Google
|
|
20
|
+
module Apis
|
|
21
|
+
# Knowledge Graph Search API
|
|
22
|
+
#
|
|
23
|
+
# Knowledge Graph Search API allows developers to search the Google Knowledge
|
|
24
|
+
# Graph for entities.
|
|
25
|
+
#
|
|
26
|
+
# @see https://developers.google.com/knowledge-graph/
|
|
27
|
+
module KgsearchV1
|
|
28
|
+
VERSION = 'V1'
|
|
29
|
+
REVISION = '20151215'
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
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 KgsearchV1
|
|
24
|
+
|
|
25
|
+
# Response message includes the context and a list of matching results which
|
|
26
|
+
# contain the detail of associated entities.
|
|
27
|
+
class SearchResponse
|
|
28
|
+
include Google::Apis::Core::Hashable
|
|
29
|
+
|
|
30
|
+
# The local context applicable for the response. See more details at http://www.
|
|
31
|
+
# w3.org/TR/json-ld/#context-definitions.
|
|
32
|
+
# Corresponds to the JSON property `context`
|
|
33
|
+
# @return [Object]
|
|
34
|
+
attr_accessor :context
|
|
35
|
+
|
|
36
|
+
# The schema type of top-level JSON-LD object, e.g. ItemList.
|
|
37
|
+
# Corresponds to the JSON property `type`
|
|
38
|
+
# @return [Object]
|
|
39
|
+
attr_accessor :type
|
|
40
|
+
|
|
41
|
+
# The item list of search results.
|
|
42
|
+
# Corresponds to the JSON property `itemListElement`
|
|
43
|
+
# @return [Array<Object>]
|
|
44
|
+
attr_accessor :item_list_element
|
|
45
|
+
|
|
46
|
+
def initialize(**args)
|
|
47
|
+
update!(**args)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Update properties of this object
|
|
51
|
+
def update!(**args)
|
|
52
|
+
@context = args[:context] unless args[:context].nil?
|
|
53
|
+
@type = args[:type] unless args[:type].nil?
|
|
54
|
+
@item_list_element = args[:item_list_element] unless args[:item_list_element].nil?
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
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 KgsearchV1
|
|
24
|
+
|
|
25
|
+
class SearchResponse
|
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
class SearchResponse
|
|
30
|
+
# @private
|
|
31
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
32
|
+
property :context, as: 'context'
|
|
33
|
+
property :type, as: 'type'
|
|
34
|
+
collection :item_list_element, as: 'itemListElement'
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
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 KgsearchV1
|
|
23
|
+
# Knowledge Graph Search API
|
|
24
|
+
#
|
|
25
|
+
# Knowledge Graph Search API allows developers to search the Google Knowledge
|
|
26
|
+
# Graph for entities.
|
|
27
|
+
#
|
|
28
|
+
# @example
|
|
29
|
+
# require 'google/apis/kgsearch_v1'
|
|
30
|
+
#
|
|
31
|
+
# Kgsearch = Google::Apis::KgsearchV1 # Alias the module
|
|
32
|
+
# service = Kgsearch::KgsearchService.new
|
|
33
|
+
#
|
|
34
|
+
# @see https://developers.google.com/knowledge-graph/
|
|
35
|
+
class KgsearchService < 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://kgsearch.googleapis.com/', '')
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Searches Knowledge Graph for entities that match the constraints. A list of
|
|
51
|
+
# matched entities will be returned in response, which will be in JSON-LD format
|
|
52
|
+
# and compatible with http://schema.org
|
|
53
|
+
# @param [String] query
|
|
54
|
+
# The literal query string for search.
|
|
55
|
+
# @param [Array<String>, String] ids
|
|
56
|
+
# The list of entity id to be used for search instead of query string.
|
|
57
|
+
# @param [Array<String>, String] languages
|
|
58
|
+
# The list of language codes (defined in ISO 693) to run the query with, e.g. '
|
|
59
|
+
# en'.
|
|
60
|
+
# @param [Array<String>, String] types
|
|
61
|
+
# Restricts returned entities with these types, e.g. Person (as defined in http:/
|
|
62
|
+
# /schema.org/Person).
|
|
63
|
+
# @param [Boolean] indent
|
|
64
|
+
# Enables indenting of json results.
|
|
65
|
+
# @param [Boolean] prefix
|
|
66
|
+
# Enables prefix match against names and aliases of entities
|
|
67
|
+
# @param [Fixnum] limit
|
|
68
|
+
# Limits the number of entities to be returned.
|
|
69
|
+
# @param [String] fields
|
|
70
|
+
# Selector specifying which fields to include in a partial response.
|
|
71
|
+
# @param [String] quota_user
|
|
72
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
73
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
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::KgsearchV1::SearchResponse] parsed result object
|
|
79
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
80
|
+
#
|
|
81
|
+
# @return [Google::Apis::KgsearchV1::SearchResponse]
|
|
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 search_entities(query: nil, ids: nil, languages: nil, types: nil, indent: nil, prefix: nil, limit: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
87
|
+
command = make_simple_command(:get, 'v1/entities:search', options)
|
|
88
|
+
command.response_representation = Google::Apis::KgsearchV1::SearchResponse::Representation
|
|
89
|
+
command.response_class = Google::Apis::KgsearchV1::SearchResponse
|
|
90
|
+
command.query['query'] = query unless query.nil?
|
|
91
|
+
command.query['ids'] = ids unless ids.nil?
|
|
92
|
+
command.query['languages'] = languages unless languages.nil?
|
|
93
|
+
command.query['types'] = types unless types.nil?
|
|
94
|
+
command.query['indent'] = indent unless indent.nil?
|
|
95
|
+
command.query['prefix'] = prefix unless prefix.nil?
|
|
96
|
+
command.query['limit'] = limit unless limit.nil?
|
|
97
|
+
command.query['fields'] = fields unless fields.nil?
|
|
98
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
99
|
+
execute_or_queue_command(command, &block)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
protected
|
|
103
|
+
|
|
104
|
+
def apply_command_defaults(command)
|
|
105
|
+
command.query['key'] = key unless key.nil?
|
|
106
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|