Skip to content

Commit

Permalink
feat: Automated regeneration of WebFonts client (#10892)
Browse files Browse the repository at this point in the history
Auto-created at 2024-03-12 01:33:57 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Mar 12, 2024
1 parent 5c21db7 commit 4a1e2c2
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clients/web_fonts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_web_fonts, "~> 0.3"}]
[{:google_api_web_fonts, "~> 0.4"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ defmodule GoogleApi.WebFonts.V1.Api.Webfonts do
* `: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.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:capability` (*type:* `list(String.t)`) - Controls the font urls in `Webfont.files`, by default, static ttf fonts are sent.
* `:family` (*type:* `list(String.t)`) - Filters by Webfont.family, using literal match. If not set, returns all families
* `:sort` (*type:* `String.t`) - Enables sorting of the list.
* `:subset` (*type:* `String.t`) - Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families.
* `opts` (*type:* `keyword()`) - Call options
## Returns
Expand All @@ -69,7 +72,10 @@ defmodule GoogleApi.WebFonts.V1.Api.Webfonts do
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:sort => :query
:capability => :query,
:family => :query,
:sort => :query,
:subset => :query
}

request =
Expand Down
2 changes: 1 addition & 1 deletion clients/web_fonts/lib/google_api/web_fonts/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.WebFonts.V1 do
API client metadata for GoogleApi.WebFonts.V1.
"""

@discovery_revision "20210213"
@discovery_revision "20240306"

def discovery_revision(), do: @discovery_revision
end
52 changes: 52 additions & 0 deletions clients/web_fonts/lib/google_api/web_fonts/v1/model/axis.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.WebFonts.V1.Model.Axis do
@moduledoc """
Metadata for a variable font axis.
## Attributes
* `end` (*type:* `number()`, *default:* `nil`) - maximum value
* `start` (*type:* `number()`, *default:* `nil`) - minimum value
* `tag` (*type:* `String.t`, *default:* `nil`) - tag name.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:end => number() | nil,
:start => number() | nil,
:tag => String.t() | nil
}

field(:end)
field(:start)
field(:tag)
end

defimpl Poison.Decoder, for: GoogleApi.WebFonts.V1.Model.Axis do
def decode(value, options) do
GoogleApi.WebFonts.V1.Model.Axis.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.WebFonts.V1.Model.Axis do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ defmodule GoogleApi.WebFonts.V1.Model.Webfont do
## Attributes
* `axes` (*type:* `list(GoogleApi.WebFonts.V1.Model.Axis.t)`, *default:* `nil`) - Axis for variable fonts.
* `category` (*type:* `String.t`, *default:* `nil`) - The category of the font.
* `family` (*type:* `String.t`, *default:* `nil`) - The name of the font.
* `files` (*type:* `map()`, *default:* `nil`) - The font files (with all supported scripts) for each one of the available variants, as a key : value map.
* `kind` (*type:* `String.t`, *default:* `nil`) - This kind represents a webfont object in the webfonts service.
* `lastModified` (*type:* `String.t`, *default:* `nil`) - The date (format "yyyy-MM-dd") the font was modified for the last time.
* `menu` (*type:* `String.t`, *default:* `nil`) - Font URL for menu subset, a subset of the font that is enough to display the font name
* `subsets` (*type:* `list(String.t)`, *default:* `nil`) - The scripts supported by the font.
* `variants` (*type:* `list(String.t)`, *default:* `nil`) - The available variants for the font.
* `version` (*type:* `String.t`, *default:* `nil`) - The font version.
Expand All @@ -34,21 +36,25 @@ defmodule GoogleApi.WebFonts.V1.Model.Webfont do
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:axes => list(GoogleApi.WebFonts.V1.Model.Axis.t()) | nil,
:category => String.t() | nil,
:family => String.t() | nil,
:files => map() | nil,
:kind => String.t() | nil,
:lastModified => String.t() | nil,
:menu => String.t() | nil,
:subsets => list(String.t()) | nil,
:variants => list(String.t()) | nil,
:version => String.t() | nil
}

field(:axes, as: GoogleApi.WebFonts.V1.Model.Axis, type: :list)
field(:category)
field(:family)
field(:files, type: :map)
field(:kind)
field(:lastModified)
field(:menu)
field(:subsets, type: :list)
field(:variants, type: :list)
field(:version)
Expand Down
2 changes: 1 addition & 1 deletion clients/web_fonts/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.WebFonts.Mixfile do
use Mix.Project

@version "0.3.0"
@version "0.4.0"

def project() do
[
Expand Down

0 comments on commit 4a1e2c2

Please sign in to comment.