Class: Google::Apis::DatastoreV1beta3::DatastoreService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DatastoreV1beta3::DatastoreService
- Defined in:
- generated/google/apis/datastore_v1beta3/service.rb
Overview
Google Cloud Datastore API
Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#allocate_project_ids(project_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::AllocateIdsResponse
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
-
#begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::BeginTransactionResponse
Begins a new transaction.
-
#commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::CommitResponse
Commits a transaction, optionally creating, deleting or modifying some entities.
-
#initialize ⇒ DatastoreService
constructor
A new instance of DatastoreService.
-
#lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::LookupResponse
Looks up entities by key.
-
#reserve_project_ids(project_id, reserve_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::ReserveIdsResponse
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
-
#rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RollbackResponse
Rolls back a transaction.
-
#run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RunQueryResponse
Queries for entities.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ DatastoreService
Returns a new instance of DatastoreService
46 47 48 49 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 46 def initialize super('https://datastore.googleapis.com/', '') @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
39 40 41 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
44 45 46 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#allocate_project_ids(project_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::AllocateIdsResponse
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
73 74 75 76 77 78 79 80 81 82 83 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 73 def allocate_project_ids(project_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:allocateIds', ) command.request_representation = Google::Apis::DatastoreV1beta3::AllocateIdsRequest::Representation command.request_object = allocate_ids_request_object command.response_representation = Google::Apis::DatastoreV1beta3::AllocateIdsResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::AllocateIdsResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::BeginTransactionResponse
Begins a new transaction.
106 107 108 109 110 111 112 113 114 115 116 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 106 def begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:beginTransaction', ) command.request_representation = Google::Apis::DatastoreV1beta3::BeginTransactionRequest::Representation command.request_object = begin_transaction_request_object command.response_representation = Google::Apis::DatastoreV1beta3::BeginTransactionResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::BeginTransactionResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::CommitResponse
Commits a transaction, optionally creating, deleting or modifying some entities.
140 141 142 143 144 145 146 147 148 149 150 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 140 def commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:commit', ) command.request_representation = Google::Apis::DatastoreV1beta3::CommitRequest::Representation command.request_object = commit_request_object command.response_representation = Google::Apis::DatastoreV1beta3::CommitResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::CommitResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::LookupResponse
Looks up entities by key.
173 174 175 176 177 178 179 180 181 182 183 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 173 def lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:lookup', ) command.request_representation = Google::Apis::DatastoreV1beta3::LookupRequest::Representation command.request_object = lookup_request_object command.response_representation = Google::Apis::DatastoreV1beta3::LookupResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::LookupResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reserve_project_ids(project_id, reserve_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::ReserveIdsResponse
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
207 208 209 210 211 212 213 214 215 216 217 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 207 def reserve_project_ids(project_id, reserve_ids_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:reserveIds', ) command.request_representation = Google::Apis::DatastoreV1beta3::ReserveIdsRequest::Representation command.request_object = reserve_ids_request_object command.response_representation = Google::Apis::DatastoreV1beta3::ReserveIdsResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::ReserveIdsResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RollbackResponse
Rolls back a transaction.
240 241 242 243 244 245 246 247 248 249 250 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 240 def rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:rollback', ) command.request_representation = Google::Apis::DatastoreV1beta3::RollbackRequest::Representation command.request_object = rollback_request_object command.response_representation = Google::Apis::DatastoreV1beta3::RollbackResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::RollbackResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RunQueryResponse
Queries for entities.
273 274 275 276 277 278 279 280 281 282 283 |
# File 'generated/google/apis/datastore_v1beta3/service.rb', line 273 def run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:runQuery', ) command.request_representation = Google::Apis::DatastoreV1beta3::RunQueryRequest::Representation command.request_object = run_query_request_object command.response_representation = Google::Apis::DatastoreV1beta3::RunQueryResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::RunQueryResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |