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 OAuth2 client #11552

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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/o_auth2/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_o_auth2, "~> 0.13"}]
[{:google_api_o_auth2, "~> 0.14"}]
end
```

Expand Down
10 changes: 8 additions & 2 deletions clients/o_auth2/lib/google_api/o_auth2/v2/api/userinfo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ defmodule GoogleApi.OAuth2.V2.Api.Userinfo do
* `{:error, info}` on failure
"""
@spec oauth2_userinfo_get(Tesla.Env.client(), keyword(), keyword()) ::
{:ok, GoogleApi.OAuth2.V2.Model.Userinfo.t()} | {:ok, Tesla.Env.t()} | {:error, any()}
{:ok, GoogleApi.OAuth2.V2.Model.Userinfo.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def oauth2_userinfo_get(connection, optional_params \\ [], opts \\ []) do
optional_params_config = %{
:alt => :query,
Expand Down Expand Up @@ -93,7 +96,10 @@ defmodule GoogleApi.OAuth2.V2.Api.Userinfo do
* `{:error, info}` on failure
"""
@spec oauth2_userinfo_v2_me_get(Tesla.Env.client(), keyword(), keyword()) ::
{:ok, GoogleApi.OAuth2.V2.Model.Userinfo.t()} | {:ok, Tesla.Env.t()} | {:error, any()}
{:ok, GoogleApi.OAuth2.V2.Model.Userinfo.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def oauth2_userinfo_v2_me_get(connection, optional_params \\ [], opts \\ []) do
optional_params_config = %{
:alt => :query,
Expand Down
2 changes: 1 addition & 1 deletion clients/o_auth2/lib/google_api/o_auth2/v2/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule GoogleApi.OAuth2.V2.Connection do

use GoogleApi.Gax.Connection,
scopes: [
# View your email address
# See your primary Google Account email address
"https://www.googleapis.com/auth/userinfo.email",

# See your personal info, including any personal info you've made publicly available
Expand Down
14 changes: 7 additions & 7 deletions clients/o_auth2/lib/google_api/o_auth2/v2/model/tokeninfo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ defmodule GoogleApi.OAuth2.V2.Model.Tokeninfo do
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:audience => String.t(),
:email => String.t(),
:expires_in => integer(),
:issued_to => String.t(),
:scope => String.t(),
:user_id => String.t(),
:verified_email => boolean()
:audience => String.t() | nil,
:email => String.t() | nil,
:expires_in => integer() | nil,
:issued_to => String.t() | nil,
:scope => String.t() | nil,
:user_id => String.t() | nil,
:verified_email => boolean() | nil
}

field(:audience)
Expand Down
22 changes: 11 additions & 11 deletions clients/o_auth2/lib/google_api/o_auth2/v2/model/userinfo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ defmodule GoogleApi.OAuth2.V2.Model.Userinfo do
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:email => String.t(),
:family_name => String.t(),
:gender => String.t(),
:given_name => String.t(),
:hd => String.t(),
:id => String.t(),
:link => String.t(),
:locale => String.t(),
:name => String.t(),
:picture => String.t(),
:verified_email => boolean()
:email => String.t() | nil,
:family_name => String.t() | nil,
:gender => String.t() | nil,
:given_name => String.t() | nil,
:hd => String.t() | nil,
:id => String.t() | nil,
:link => String.t() | nil,
:locale => String.t() | nil,
:name => String.t() | nil,
:picture => String.t() | nil,
:verified_email => boolean() | nil
}

field(:email)
Expand Down
2 changes: 1 addition & 1 deletion clients/o_auth2/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.OAuth2.Mixfile do
use Mix.Project

@version "0.13.0"
@version "0.14.0"

def project() do
[
Expand Down
Loading