Skip to content

Commit 10a36d2

Browse files
feat: Automated regeneration of YouTube client (googleapis#12857)
Auto-created at 2025-01-23 13:14:51 +0000 using the toys pull request generator.
1 parent 0cfcfe3 commit 10a36d2

File tree

5 files changed

+144
-3
lines changed

5 files changed

+144
-3
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.53"}]
14+
[{:google_api_you_tube, "~> 0.54"}]
1515
end
1616
```
1717

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.YouTube.V3.Api.VideoTrainability do
19+
@moduledoc """
20+
API calls for all endpoints tagged `VideoTrainability`.
21+
"""
22+
23+
alias GoogleApi.YouTube.V3.Connection
24+
alias GoogleApi.Gax.{Request, Response}
25+
26+
@library_version Mix.Project.config() |> Keyword.get(:version, "")
27+
28+
@doc """
29+
Returns the trainability status of a video.
30+
31+
## Parameters
32+
33+
* `connection` (*type:* `GoogleApi.YouTube.V3.Connection.t`) - Connection to server
34+
* `optional_params` (*type:* `keyword()`) - Optional parameters
35+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
36+
* `:access_token` (*type:* `String.t`) - OAuth access token.
37+
* `:alt` (*type:* `String.t`) - Data format for response.
38+
* `:callback` (*type:* `String.t`) - JSONP
39+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
40+
* `: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.
41+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
42+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
43+
* `: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.
44+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
45+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
46+
* `:id` (*type:* `String.t`) - The ID of the video to retrieve.
47+
* `opts` (*type:* `keyword()`) - Call options
48+
49+
## Returns
50+
51+
* `{:ok, %GoogleApi.YouTube.V3.Model.VideoTrainability{}}` on success
52+
* `{:error, info}` on failure
53+
"""
54+
@spec youtube_video_trainability_get(Tesla.Env.client(), keyword(), keyword()) ::
55+
{:ok, GoogleApi.YouTube.V3.Model.VideoTrainability.t()}
56+
| {:ok, Tesla.Env.t()}
57+
| {:ok, list()}
58+
| {:error, any()}
59+
def youtube_video_trainability_get(connection, optional_params \\ [], opts \\ []) do
60+
optional_params_config = %{
61+
:"$.xgafv" => :query,
62+
:access_token => :query,
63+
:alt => :query,
64+
:callback => :query,
65+
:fields => :query,
66+
:key => :query,
67+
:oauth_token => :query,
68+
:prettyPrint => :query,
69+
:quotaUser => :query,
70+
:uploadType => :query,
71+
:upload_protocol => :query,
72+
:id => :query
73+
}
74+
75+
request =
76+
Request.new()
77+
|> Request.method(:get)
78+
|> Request.url("/youtube/v3/videoTrainability", %{})
79+
|> Request.add_optional_params(optional_params_config, optional_params)
80+
|> Request.library_version(@library_version)
81+
82+
connection
83+
|> Connection.execute(request)
84+
|> Response.decode(opts ++ [struct: %GoogleApi.YouTube.V3.Model.VideoTrainability{}])
85+
end
86+
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 "20250101"
23+
@discovery_revision "20250122"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.YouTube.V3.Model.VideoTrainability do
19+
@moduledoc """
20+
Specifies who is allowed to train on the video.
21+
22+
## Attributes
23+
24+
* `etag` (*type:* `String.t`, *default:* `nil`) - Etag of this resource.
25+
* `kind` (*type:* `String.t`, *default:* `youtube#videoTrainability`) - Identifies what kind of resource this is. Value: the fixed string "youtube#videoTrainability".
26+
* `permitted` (*type:* `list(String.t)`, *default:* `nil`) - Specifies who is allowed to train on the video. Valid values are: - a single string "all" - a single string "none" - a list of allowed parties
27+
* `videoId` (*type:* `String.t`, *default:* `nil`) - The ID of the video.
28+
"""
29+
30+
use GoogleApi.Gax.ModelBase
31+
32+
@type t :: %__MODULE__{
33+
:etag => String.t() | nil,
34+
:kind => String.t() | nil,
35+
:permitted => list(String.t()) | nil,
36+
:videoId => String.t() | nil
37+
}
38+
39+
field(:etag)
40+
field(:kind)
41+
field(:permitted, type: :list)
42+
field(:videoId)
43+
end
44+
45+
defimpl Poison.Decoder, for: GoogleApi.YouTube.V3.Model.VideoTrainability do
46+
def decode(value, options) do
47+
GoogleApi.YouTube.V3.Model.VideoTrainability.decode(value, options)
48+
end
49+
end
50+
51+
defimpl Poison.Encoder, for: GoogleApi.YouTube.V3.Model.VideoTrainability do
52+
def encode(value, options) do
53+
GoogleApi.Gax.ModelBase.encode(value, options)
54+
end
55+
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.53.1"
21+
@version "0.54.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)