Skip to content

Commit 6c5ccf9

Browse files
Commit via running ake Sources/users
1 parent ee788eb commit 6c5ccf9

File tree

2 files changed

+236
-104
lines changed

2 files changed

+236
-104
lines changed

Sources/users/Client.swift

Lines changed: 59 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ public struct Client: APIProtocol {
4040
}
4141
/// Get the authenticated user
4242
///
43-
/// If the authenticated user is authenticated with an OAuth token with the `user` scope, then the response lists public and private profile information.
44-
///
45-
/// If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information.
43+
/// OAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information.
4644
///
4745
/// - Remark: HTTP `GET /user`.
4846
/// - Remark: Generated from `#/paths//user/get(users/get-authenticated)`.
@@ -976,7 +974,10 @@ public struct Client: APIProtocol {
976974
}
977975
/// List email addresses for the authenticated user
978976
///
979-
/// Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope.
977+
/// Lists all of your email addresses, and specifies which one is visible
978+
/// to the public.
979+
///
980+
/// OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint.
980981
///
981982
/// - Remark: HTTP `GET /user/emails`.
982983
/// - Remark: Generated from `#/paths//user/emails/get(users/list-emails-for-authenticated-user)`.
@@ -1128,7 +1129,7 @@ public struct Client: APIProtocol {
11281129
}
11291130
/// Add an email address for the authenticated user
11301131
///
1131-
/// This endpoint is accessible with the `user` scope.
1132+
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
11321133
///
11331134
/// - Remark: HTTP `POST /user/emails`.
11341135
/// - Remark: Generated from `#/paths//user/emails/post(users/add-email-for-authenticated-user)`.
@@ -1291,7 +1292,7 @@ public struct Client: APIProtocol {
12911292
}
12921293
/// Delete an email address for the authenticated user
12931294
///
1294-
/// This endpoint is accessible with the `user` scope.
1295+
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
12951296
///
12961297
/// - Remark: HTTP `DELETE /user/emails`.
12971298
/// - Remark: Generated from `#/paths//user/emails/delete(users/delete-email-for-authenticated-user)`.
@@ -1806,7 +1807,7 @@ public struct Client: APIProtocol {
18061807
///
18071808
/// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."
18081809
///
1809-
/// Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.
1810+
/// OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint.
18101811
///
18111812
/// - Remark: HTTP `PUT /user/following/{username}`.
18121813
/// - Remark: Generated from `#/paths//user/following/{username}/put(users/follow)`.
@@ -1918,7 +1919,7 @@ public struct Client: APIProtocol {
19181919
}
19191920
/// Unfollow a user
19201921
///
1921-
/// Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.
1922+
/// OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint.
19221923
///
19231924
/// - Remark: HTTP `DELETE /user/following/{username}`.
19241925
/// - Remark: Generated from `#/paths//user/following/{username}/delete(users/unfollow)`.
@@ -2030,7 +2031,9 @@ public struct Client: APIProtocol {
20302031
}
20312032
/// List GPG keys for the authenticated user
20322033
///
2033-
/// Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
2034+
/// Lists the current user's GPG keys.
2035+
///
2036+
/// OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint.
20342037
///
20352038
/// - Remark: HTTP `GET /user/gpg_keys`.
20362039
/// - Remark: Generated from `#/paths//user/gpg_keys/get(users/list-gpg-keys-for-authenticated-user)`.
@@ -2182,7 +2185,9 @@ public struct Client: APIProtocol {
21822185
}
21832186
/// Create a GPG key for the authenticated user
21842187
///
2185-
/// Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
2188+
/// Adds a GPG key to the authenticated user's GitHub account.
2189+
///
2190+
/// OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint.
21862191
///
21872192
/// - Remark: HTTP `POST /user/gpg_keys`.
21882193
/// - Remark: Generated from `#/paths//user/gpg_keys/post(users/create-gpg-key-for-authenticated-user)`.
@@ -2343,7 +2348,9 @@ public struct Client: APIProtocol {
23432348
}
23442349
/// Get a GPG key for the authenticated user
23452350
///
2346-
/// View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
2351+
/// View extended details for a single GPG key.
2352+
///
2353+
/// OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint.
23472354
///
23482355
/// - Remark: HTTP `GET /user/gpg_keys/{gpg_key_id}`.
23492356
/// - Remark: Generated from `#/paths//user/gpg_keys/{gpg_key_id}/get(users/get-gpg-key-for-authenticated-user)`.
@@ -2475,7 +2482,9 @@ public struct Client: APIProtocol {
24752482
}
24762483
/// Delete a GPG key for the authenticated user
24772484
///
2478-
/// Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
2485+
/// Removes a GPG key from the authenticated user's GitHub account.
2486+
///
2487+
/// OAuth app tokens and personal access tokens (classic) need the `admin:gpg_key` scope to use this endpoint.
24792488
///
24802489
/// - Remark: HTTP `DELETE /user/gpg_keys/{gpg_key_id}`.
24812490
/// - Remark: Generated from `#/paths//user/gpg_keys/{gpg_key_id}/delete(users/delete-gpg-key-for-authenticated-user)`.
@@ -2609,7 +2618,9 @@ public struct Client: APIProtocol {
26092618
}
26102619
/// List public SSH keys for the authenticated user
26112620
///
2612-
/// Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
2621+
/// Lists the public SSH keys for the authenticated user's GitHub account.
2622+
///
2623+
/// OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint.
26132624
///
26142625
/// - Remark: HTTP `GET /user/keys`.
26152626
/// - Remark: Generated from `#/paths//user/keys/get(users/list-public-ssh-keys-for-authenticated-user)`.
@@ -2761,7 +2772,9 @@ public struct Client: APIProtocol {
27612772
}
27622773
/// Create a public SSH key for the authenticated user
27632774
///
2764-
/// Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
2775+
/// Adds a public SSH key to the authenticated user's GitHub account.
2776+
///
2777+
/// OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint.
27652778
///
27662779
/// - Remark: HTTP `POST /user/keys`.
27672780
/// - Remark: Generated from `#/paths//user/keys/post(users/create-public-ssh-key-for-authenticated-user)`.
@@ -2922,7 +2935,9 @@ public struct Client: APIProtocol {
29222935
}
29232936
/// Get a public SSH key for the authenticated user
29242937
///
2925-
/// View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
2938+
/// View extended details for a single public SSH key.
2939+
///
2940+
/// OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint.
29262941
///
29272942
/// - Remark: HTTP `GET /user/keys/{key_id}`.
29282943
/// - Remark: Generated from `#/paths//user/keys/{key_id}/get(users/get-public-ssh-key-for-authenticated-user)`.
@@ -3054,7 +3069,9 @@ public struct Client: APIProtocol {
30543069
}
30553070
/// Delete a public SSH key for the authenticated user
30563071
///
3057-
/// Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
3072+
/// Removes a public SSH key from the authenticated user's GitHub account.
3073+
///
3074+
/// OAuth app tokens and personal access tokens (classic) need the `admin:public_key` scope to use this endpoint.
30583075
///
30593076
/// - Remark: HTTP `DELETE /user/keys/{key_id}`.
30603077
/// - Remark: Generated from `#/paths//user/keys/{key_id}/delete(users/delete-public-ssh-key-for-authenticated-user)`.
@@ -3166,7 +3183,11 @@ public struct Client: APIProtocol {
31663183
}
31673184
/// List public email addresses for the authenticated user
31683185
///
3169-
/// Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/users/emails#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope.
3186+
/// Lists your publicly visible email address, which you can set with the
3187+
/// [Set primary email visibility for the authenticated user](https://docs.github.com/rest/users/emails#set-primary-email-visibility-for-the-authenticated-user)
3188+
/// endpoint.
3189+
///
3190+
/// OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint.
31703191
///
31713192
/// - Remark: HTTP `GET /user/public_emails`.
31723193
/// - Remark: Generated from `#/paths//user/public_emails/get(users/list-public-emails-for-authenticated-user)`.
@@ -3470,7 +3491,9 @@ public struct Client: APIProtocol {
34703491
}
34713492
/// Add social accounts for the authenticated user
34723493
///
3473-
/// Add one or more social accounts to the authenticated user's profile. This endpoint is accessible with the `user` scope.
3494+
/// Add one or more social accounts to the authenticated user's profile.
3495+
///
3496+
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
34743497
///
34753498
/// - Remark: HTTP `POST /user/social_accounts`.
34763499
/// - Remark: Generated from `#/paths//user/social_accounts/post(users/add-social-account-for-authenticated-user)`.
@@ -3631,7 +3654,9 @@ public struct Client: APIProtocol {
36313654
}
36323655
/// Delete social accounts for the authenticated user
36333656
///
3634-
/// Deletes one or more social accounts from the authenticated user's profile. This endpoint is accessible with the `user` scope.
3657+
/// Deletes one or more social accounts from the authenticated user's profile.
3658+
///
3659+
/// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
36353660
///
36363661
/// - Remark: HTTP `DELETE /user/social_accounts`.
36373662
/// - Remark: Generated from `#/paths//user/social_accounts/delete(users/delete-social-account-for-authenticated-user)`.
@@ -3772,7 +3797,9 @@ public struct Client: APIProtocol {
37723797
}
37733798
/// List SSH signing keys for the authenticated user
37743799
///
3775-
/// Lists the SSH signing keys for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)."
3800+
/// Lists the SSH signing keys for the authenticated user's GitHub account.
3801+
///
3802+
/// OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint.
37763803
///
37773804
/// - Remark: HTTP `GET /user/ssh_signing_keys`.
37783805
/// - Remark: Generated from `#/paths//user/ssh_signing_keys/get(users/list-ssh-signing-keys-for-authenticated-user)`.
@@ -3924,7 +3951,9 @@ public struct Client: APIProtocol {
39243951
}
39253952
/// Create a SSH signing key for the authenticated user
39263953
///
3927-
/// Creates an SSH signing key for the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `write:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)."
3954+
/// Creates an SSH signing key for the authenticated user's GitHub account.
3955+
///
3956+
/// OAuth app tokens and personal access tokens (classic) need the `write:ssh_signing_key` scope to use this endpoint.
39283957
///
39293958
/// - Remark: HTTP `POST /user/ssh_signing_keys`.
39303959
/// - Remark: Generated from `#/paths//user/ssh_signing_keys/post(users/create-ssh-signing-key-for-authenticated-user)`.
@@ -4085,7 +4114,9 @@ public struct Client: APIProtocol {
40854114
}
40864115
/// Get an SSH signing key for the authenticated user
40874116
///
4088-
/// Gets extended details for an SSH signing key. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `read:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)."
4117+
/// Gets extended details for an SSH signing key.
4118+
///
4119+
/// OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint.
40894120
///
40904121
/// - Remark: HTTP `GET /user/ssh_signing_keys/{ssh_signing_key_id}`.
40914122
/// - Remark: Generated from `#/paths//user/ssh_signing_keys/{ssh_signing_key_id}/get(users/get-ssh-signing-key-for-authenticated-user)`.
@@ -4217,7 +4248,9 @@ public struct Client: APIProtocol {
42174248
}
42184249
/// Delete an SSH signing key for the authenticated user
42194250
///
4220-
/// Deletes an SSH signing key from the authenticated user's GitHub account. You must authenticate with Basic Authentication, or you must authenticate with OAuth with at least `admin:ssh_signing_key` scope. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)."
4251+
/// Deletes an SSH signing key from the authenticated user's GitHub account.
4252+
///
4253+
/// OAuth app tokens and personal access tokens (classic) need the `admin:ssh_signing_key` scope to use this endpoint.
42214254
///
42224255
/// - Remark: HTTP `DELETE /user/ssh_signing_keys/{ssh_signing_key_id}`.
42234256
/// - Remark: Generated from `#/paths//user/ssh_signing_keys/{ssh_signing_key_id}/delete(users/delete-ssh-signing-key-for-authenticated-user)`.
@@ -4419,8 +4452,6 @@ public struct Client: APIProtocol {
44194452
///
44204453
/// Provides publicly available information about someone with a GitHub account.
44214454
///
4422-
/// GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below"
4423-
///
44244455
/// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).
44254456
///
44264457
/// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)".
@@ -4808,7 +4839,7 @@ public struct Client: APIProtocol {
48084839
}
48094840
/// Get contextual information for a user
48104841
///
4811-
/// Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
4842+
/// Provides hovercard information. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
48124843
///
48134844
/// The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this:
48144845
///
@@ -4817,6 +4848,8 @@ public struct Client: APIProtocol {
48174848
/// https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192
48184849
/// ```
48194850
///
4851+
/// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
4852+
///
48204853
/// - Remark: HTTP `GET /users/{username}/hovercard`.
48214854
/// - Remark: Generated from `#/paths//users/{username}/hovercard/get(users/get-context-for-user)`.
48224855
public func users_sol_get_hyphen_context_hyphen_for_hyphen_user(_ input: Operations.users_sol_get_hyphen_context_hyphen_for_hyphen_user.Input) async throws -> Operations.users_sol_get_hyphen_context_hyphen_for_hyphen_user.Output {

0 commit comments

Comments
 (0)