Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of Fonts client #10835

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/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_fonts, "~> 0.11"}]
[{:google_api_fonts, "~> 0.12"}]
end
```

Expand Down
8 changes: 7 additions & 1 deletion clients/fonts/lib/google_api/fonts/v1/api/webfonts.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ defmodule GoogleApi.Fonts.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.Fonts.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/fonts/lib/google_api/fonts/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Fonts.V1 do
API client metadata for GoogleApi.Fonts.V1.
"""

@discovery_revision "20210213"
@discovery_revision "20240306"

def discovery_revision(), do: @discovery_revision
end
52 changes: 52 additions & 0 deletions clients/fonts/lib/google_api/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.Fonts.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.Fonts.V1.Model.Axis do
def decode(value, options) do
GoogleApi.Fonts.V1.Model.Axis.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Fonts.V1.Model.Axis do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
6 changes: 6 additions & 0 deletions clients/fonts/lib/google_api/fonts/v1/model/webfont.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ defmodule GoogleApi.Fonts.V1.Model.Webfont do

## Attributes

* `axes` (*type:* `list(GoogleApi.Fonts.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.Fonts.V1.Model.Webfont do
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:axes => list(GoogleApi.Fonts.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.Fonts.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/fonts/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Fonts.Mixfile do
use Mix.Project

@version "0.11.0"
@version "0.12.0"

def project() do
[
Expand Down
Loading