Class: Google::Apis::ChatV1::HangoutsChatService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::ChatV1::HangoutsChatService
- Defined in:
- generated/google/apis/chat_v1/service.rb
Overview
Hangouts Chat API
Enables bots to fetch information and perform actions in the new Hangouts Chat.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Google::Apis::Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#create_space_message(parent, message_object = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Creates a message.
-
#delete_space_message(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a message.
-
#get_space(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Returns a space.
-
#get_space_member(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Returns a membership.
-
#get_space_message(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Returns a message.
-
#initialize ⇒ HangoutsChatService
constructor
A new instance of HangoutsChatService.
-
#list_space_members(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListMembershipsResponse
Lists human memberships in a space.
-
#list_spaces(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSpacesResponse
Lists spaces the caller is a member of.
-
#update_space_message(name, message_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Updates a message.
Methods inherited from Google::Apis::Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Google::Apis::Core::Logging
Constructor Details
#initialize ⇒ HangoutsChatService
Returns a new instance of HangoutsChatService
45 46 47 48 |
# File 'generated/google/apis/chat_v1/service.rb', line 45 def initialize super('https://chat.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.
38 39 40 |
# File 'generated/google/apis/chat_v1/service.rb', line 38 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.
43 44 45 |
# File 'generated/google/apis/chat_v1/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#create_space_message(parent, message_object = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Creates a message.
220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'generated/google/apis/chat_v1/service.rb', line 220 def (parent, = nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/messages', ) command.request_representation = Google::Apis::ChatV1::Message::Representation command.request_object = command.response_representation = Google::Apis::ChatV1::Message::Representation command.response_class = Google::Apis::ChatV1::Message command.params['parent'] = parent unless parent.nil? command.query['threadKey'] = thread_key unless thread_key.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_space_message(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a message.
255 256 257 258 259 260 261 262 263 |
# File 'generated/google/apis/chat_v1/service.rb', line 255 def (name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Empty::Representation command.response_class = Google::Apis::ChatV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_space(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Returns a space.
71 72 73 74 75 76 77 78 79 |
# File 'generated/google/apis/chat_v1/service.rb', line 71 def get_space(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Space::Representation command.response_class = Google::Apis::ChatV1::Space command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_space_member(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Returns a membership.
138 139 140 141 142 143 144 145 146 |
# File 'generated/google/apis/chat_v1/service.rb', line 138 def get_space_member(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Membership::Representation command.response_class = Google::Apis::ChatV1::Membership command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_space_message(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Returns a message.
287 288 289 290 291 292 293 294 295 |
# File 'generated/google/apis/chat_v1/service.rb', line 287 def (name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Message::Representation command.response_class = Google::Apis::ChatV1::Message command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_space_members(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListMembershipsResponse
Lists human memberships in a space.
176 177 178 179 180 181 182 183 184 185 186 |
# File 'generated/google/apis/chat_v1/service.rb', line 176 def list_space_members(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/members', ) command.response_representation = Google::Apis::ChatV1::ListMembershipsResponse::Representation command.response_class = Google::Apis::ChatV1::ListMembershipsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_spaces(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSpacesResponse
Lists spaces the caller is a member of.
105 106 107 108 109 110 111 112 113 114 |
# File 'generated/google/apis/chat_v1/service.rb', line 105 def list_spaces(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/spaces', ) command.response_representation = Google::Apis::ChatV1::ListSpacesResponse::Representation command.response_class = Google::Apis::ChatV1::ListSpacesResponse command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_space_message(name, message_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Updates a message.
322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'generated/google/apis/chat_v1/service.rb', line 322 def (name, = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v1/{+name}', ) command.request_representation = Google::Apis::ChatV1::Message::Representation command.request_object = command.response_representation = Google::Apis::ChatV1::Message::Representation command.response_class = Google::Apis::ChatV1::Message command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |