Skip to content

Commit d4da340

Browse files
feat: Automated regeneration of YouTube client (googleapis#12308)
Auto-created at 2024-10-12 13:18:18 +0000 using the toys pull request generator.
1 parent 4ceecc1 commit d4da340

File tree

5 files changed

+75
-4
lines changed

5 files changed

+75
-4
lines changed

clients/you_tube/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_you_tube, "~> 0.48"}]
14+
[{:google_api_you_tube, "~> 0.49"}]
1515
end
1616
```
1717

clients/you_tube/lib/google_api/you_tube/v3/api/live_chat_messages.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ defmodule GoogleApi.YouTube.V3.Api.LiveChatMessages do
168168
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
169169
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
170170
* `:hl` (*type:* `String.t`) - Specifies the localization language in which the system messages should be returned.
171-
* `:maxResults` (*type:* `integer()`) - The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
171+
* `:maxResults` (*type:* `integer()`) - The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.
172172
* `:pageToken` (*type:* `String.t`) - The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identify other pages that could be retrieved.
173173
* `:profileImageSize` (*type:* `integer()`) - Specifies the size of the profile image that should be returned for each user.
174174
* `opts` (*type:* `keyword()`) - Call options

clients/you_tube/lib/google_api/you_tube/v3/api/youtube.ex

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,75 @@ defmodule GoogleApi.YouTube.V3.Api.Youtube do
8585
|> Connection.execute(request)
8686
|> Response.decode(opts ++ [struct: %GoogleApi.YouTube.V3.Model.CommentThread{}])
8787
end
88+
89+
@doc """
90+
Allows a user to load live chat through a server-streamed RPC.
91+
92+
## Parameters
93+
94+
* `connection` (*type:* `GoogleApi.YouTube.V3.Connection.t`) - Connection to server
95+
* `optional_params` (*type:* `keyword()`) - Optional parameters
96+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
97+
* `:access_token` (*type:* `String.t`) - OAuth access token.
98+
* `:alt` (*type:* `String.t`) - Data format for response.
99+
* `:callback` (*type:* `String.t`) - JSONP
100+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
101+
* `:key` (*type:* `String.t`) - 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.
102+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
103+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
104+
* `:quotaUser` (*type:* `String.t`) - 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.
105+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
106+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
107+
* `:hl` (*type:* `String.t`) - Specifies the localization language in which the system messages should be returned.
108+
* `:liveChatId` (*type:* `String.t`) - The id of the live chat for which comments should be returned.
109+
* `:maxResults` (*type:* `integer()`) - The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.
110+
* `:pageToken` (*type:* `String.t`) - The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identify other pages that could be retrieved.
111+
* `:part` (*type:* `list(String.t)`) - The *part* parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id, snippet, and authorDetails.
112+
* `:profileImageSize` (*type:* `integer()`) - Specifies the size of the profile image that should be returned for each user.
113+
* `opts` (*type:* `keyword()`) - Call options
114+
115+
## Returns
116+
117+
* `{:ok, %GoogleApi.YouTube.V3.Model.LiveChatMessageListResponse{}}` on success
118+
* `{:error, info}` on failure
119+
"""
120+
@spec youtube_youtube_v3_live_chat_messages_stream(Tesla.Env.client(), keyword(), keyword()) ::
121+
{:ok, GoogleApi.YouTube.V3.Model.LiveChatMessageListResponse.t()}
122+
| {:ok, Tesla.Env.t()}
123+
| {:ok, list()}
124+
| {:error, any()}
125+
def youtube_youtube_v3_live_chat_messages_stream(connection, optional_params \\ [], opts \\ []) do
126+
optional_params_config = %{
127+
:"$.xgafv" => :query,
128+
:access_token => :query,
129+
:alt => :query,
130+
:callback => :query,
131+
:fields => :query,
132+
:key => :query,
133+
:oauth_token => :query,
134+
:prettyPrint => :query,
135+
:quotaUser => :query,
136+
:uploadType => :query,
137+
:upload_protocol => :query,
138+
:hl => :query,
139+
:liveChatId => :query,
140+
:maxResults => :query,
141+
:pageToken => :query,
142+
:part => :query,
143+
:profileImageSize => :query
144+
}
145+
146+
request =
147+
Request.new()
148+
|> Request.method(:get)
149+
|> Request.url("/youtube/v3/liveChat/messages/stream", %{})
150+
|> Request.add_optional_params(optional_params_config, optional_params)
151+
|> Request.library_version(@library_version)
152+
153+
connection
154+
|> Connection.execute(request)
155+
|> Response.decode(
156+
opts ++ [struct: %GoogleApi.YouTube.V3.Model.LiveChatMessageListResponse{}]
157+
)
158+
end
88159
end

clients/you_tube/lib/google_api/you_tube/v3/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.YouTube.V3 do
2020
API client metadata for GoogleApi.YouTube.V3.
2121
"""
2222

23-
@discovery_revision "20240926"
23+
@discovery_revision "20241010"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/you_tube/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.YouTube.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.48.0"
21+
@version "0.49.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)