Class: Google::Apis::DatastoreV1::DatastoreService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DatastoreV1::DatastoreService
- Defined in:
- generated/google/apis/datastore_v1/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, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::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, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::BeginTransactionResponse
Begins a new transaction.
-
#commit_project(project_id, commit_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::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, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::LookupResponse
Looks up entities by key.
-
#rollback_project(project_id, rollback_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::RollbackResponse
Rolls back a transaction.
-
#run_project_query(project_id, run_query_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::RunQueryResponse
Queries for entities.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Constructor Details
#initialize ⇒ DatastoreService
Returns a new instance of DatastoreService.
46 47 48 |
# File 'generated/google/apis/datastore_v1/service.rb', line 46 def initialize super('https://datastore.googleapis.com/', '') 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_v1/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_v1/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#allocate_project_ids(project_id, allocate_ids_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::AllocateIdsResponse
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
138 139 140 141 142 143 144 145 146 147 148 |
# File 'generated/google/apis/datastore_v1/service.rb', line 138 def allocate_project_ids(project_id, allocate_ids_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}:allocateIds', ) command.request_representation = Google::Apis::DatastoreV1::AllocateIdsRequest::Representation command.request_object = allocate_ids_request_object command.response_representation = Google::Apis::DatastoreV1::AllocateIdsResponse::Representation command.response_class = Google::Apis::DatastoreV1::AllocateIdsResponse command.params['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#begin_project_transaction(project_id, begin_transaction_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::BeginTransactionResponse
Begins a new transaction.
104 105 106 107 108 109 110 111 112 113 114 |
# File 'generated/google/apis/datastore_v1/service.rb', line 104 def begin_project_transaction(project_id, begin_transaction_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}:beginTransaction', ) command.request_representation = Google::Apis::DatastoreV1::BeginTransactionRequest::Representation command.request_object = begin_transaction_request_object command.response_representation = Google::Apis::DatastoreV1::BeginTransactionResponse::Representation command.response_class = Google::Apis::DatastoreV1::BeginTransactionResponse command.params['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#commit_project(project_id, commit_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::CommitResponse
Commits a transaction, optionally creating, deleting or modifying some entities.
205 206 207 208 209 210 211 212 213 214 215 |
# File 'generated/google/apis/datastore_v1/service.rb', line 205 def commit_project(project_id, commit_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}:commit', ) command.request_representation = Google::Apis::DatastoreV1::CommitRequest::Representation command.request_object = commit_request_object command.response_representation = Google::Apis::DatastoreV1::CommitResponse::Representation command.response_class = Google::Apis::DatastoreV1::CommitResponse command.params['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#lookup_project(project_id, lookup_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::LookupResponse
Looks up entities by key.
171 172 173 174 175 176 177 178 179 180 181 |
# File 'generated/google/apis/datastore_v1/service.rb', line 171 def lookup_project(project_id, lookup_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}:lookup', ) command.request_representation = Google::Apis::DatastoreV1::LookupRequest::Representation command.request_object = lookup_request_object command.response_representation = Google::Apis::DatastoreV1::LookupResponse::Representation command.response_class = Google::Apis::DatastoreV1::LookupResponse command.params['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#rollback_project(project_id, rollback_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::RollbackResponse
Rolls back a transaction.
238 239 240 241 242 243 244 245 246 247 248 |
# File 'generated/google/apis/datastore_v1/service.rb', line 238 def rollback_project(project_id, rollback_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}:rollback', ) command.request_representation = Google::Apis::DatastoreV1::RollbackRequest::Representation command.request_object = rollback_request_object command.response_representation = Google::Apis::DatastoreV1::RollbackResponse::Representation command.response_class = Google::Apis::DatastoreV1::RollbackResponse command.params['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#run_project_query(project_id, run_query_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1::RunQueryResponse
Queries for entities.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'generated/google/apis/datastore_v1/service.rb', line 71 def run_project_query(project_id, run_query_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}:runQuery', ) command.request_representation = Google::Apis::DatastoreV1::RunQueryRequest::Representation command.request_object = run_query_request_object command.response_representation = Google::Apis::DatastoreV1::RunQueryResponse::Representation command.response_class = Google::Apis::DatastoreV1::RunQueryResponse command.params['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |