By default, this returns an instance of
Google::Apps::Chat::V1::ChatService::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the ChatService service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest or :grpc in
the transport parameter.
Raises an exception if the currently installed versioned client gem for the
given API version does not support the given transport of the ChatService service.
You can determine whether the method will succeed by calling
Chat.chat_service_available?.
About ChatService
Enables developers to build Chat apps and
integrations on Google Chat Platform.
Parameters
version (::String, ::Symbol) (defaults to: :v1) — The API version to connect to. Optional.
Defaults to :v1.
transport (:grpc, :rest) (defaults to: :grpc) — The transport to use. Defaults to :grpc.
Returns
(::Object) — A client object for the specified version.
Determines whether the ChatService service is supported by the current client.
If true, you can retrieve a client object by calling Chat.chat_service.
If false, that method will raise an exception. This could happen if the given
API version does not exist or does not support the ChatService service,
or if the versioned client gem needs an update to support the ChatService service.
Parameters
version (::String, ::Symbol) (defaults to: :v1) — The API version to connect to. Optional.
Defaults to :v1.
transport (:grpc, :rest) (defaults to: :grpc) — The transport to use. Defaults to :grpc.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Google Chat API - Module Google::Apps::Chat (v1.1.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.1 (latest)](/ruby/docs/reference/google-apps-chat/latest/Google-Apps-Chat)\n- [1.1.0](/ruby/docs/reference/google-apps-chat/1.1.0/Google-Apps-Chat)\n- [1.0.1](/ruby/docs/reference/google-apps-chat/1.0.1/Google-Apps-Chat)\n- [0.1.0](/ruby/docs/reference/google-apps-chat/0.1.0/Google-Apps-Chat) \nReference documentation and code samples for the Google Chat API module Google::Apps::Chat.\n\nMethods\n-------\n\n### .chat_service\n\n def self.chat_service(version: :v1, transport: :grpc, &block) -\u003e ::Object\n\nCreate a new client object for ChatService.\n\n\nBy default, this returns an instance of\n[Google::Apps::Chat::V1::ChatService::Client](https://cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-ChatService-Client)\nfor a gRPC client for version V1 of the API.\nHowever, you can specify a different API version by passing it in the\n`version` parameter. If the ChatService service is\nsupported by that API version, and the corresponding gem is available, the\nappropriate versioned client will be returned.\nYou can also specify a different transport by passing `:rest` or `:grpc` in\nthe `transport` parameter.\n\n\u003cbr /\u003e\n\nRaises an exception if the currently installed versioned client gem for the\ngiven API version does not support the given transport of the ChatService service.\nYou can determine whether the method will succeed by calling\n[Chat.chat_service_available?](/ruby/docs/reference/google-apps-chat/latest/Google-Apps-Chat#Google__Apps__Chat_chat_service_available__class_ \"Google::Apps::Chat.chat_service_available? (method)\").\n\n#### About ChatService\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nEnables developers to build Chat apps and\nintegrations on Google Chat Platform. \n**Parameters**\n\n- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.\n- **transport** (:grpc, :rest) *(defaults to: :grpc)* --- The transport to use. Defaults to `:grpc`. \n**Returns**\n\n- (::Object) --- A client object for the specified version.\n\n### .chat_service_available?\n\n def self.chat_service_available?(version: :v1, transport: :grpc) -\u003e boolean\n\nDetermines whether the ChatService service is supported by the current client.\nIf true, you can retrieve a client object by calling [Chat.chat_service](/ruby/docs/reference/google-apps-chat/latest/Google-Apps-Chat#Google__Apps__Chat_chat_service_class_ \"Google::Apps::Chat.chat_service (method)\").\nIf false, that method will raise an exception. This could happen if the given\nAPI version does not exist or does not support the ChatService service,\nor if the versioned client gem needs an update to support the ChatService service. \n**Parameters**\n\n- **version** (::String, ::Symbol) *(defaults to: :v1)* --- The API version to connect to. Optional. Defaults to `:v1`.\n- **transport** (:grpc, :rest) *(defaults to: :grpc)* --- The transport to use. Defaults to `:grpc`. \n**Returns**\n\n- (boolean) --- Whether the service is available.\n\nConstants\n---------\n\n### VERSION\n\n**value:**\"1.1.1\""]]