|
| 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 |
0 commit comments