You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/users/Client.swift
+59-26Lines changed: 59 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -40,9 +40,7 @@ public struct Client: APIProtocol {
40
40
}
41
41
/// Get the authenticated user
42
42
///
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.
46
44
///
47
45
/// - Remark: HTTP `GET /user`.
48
46
/// - Remark: Generated from `#/paths//user/get(users/get-authenticated)`.
@@ -976,7 +974,10 @@ public struct Client: APIProtocol {
976
974
}
977
975
/// List email addresses for the authenticated user
978
976
///
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.
980
981
///
981
982
/// - Remark: HTTP `GET /user/emails`.
982
983
/// - Remark: Generated from `#/paths//user/emails/get(users/list-emails-for-authenticated-user)`.
@@ -1128,7 +1129,7 @@ public struct Client: APIProtocol {
1128
1129
}
1129
1130
/// Add an email address for the authenticated user
1130
1131
///
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.
1132
1133
///
1133
1134
/// - Remark: HTTP `POST /user/emails`.
1134
1135
/// - Remark: Generated from `#/paths//user/emails/post(users/add-email-for-authenticated-user)`.
@@ -1291,7 +1292,7 @@ public struct Client: APIProtocol {
1291
1292
}
1292
1293
/// Delete an email address for the authenticated user
1293
1294
///
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.
1295
1296
///
1296
1297
/// - Remark: HTTP `DELETE /user/emails`.
1297
1298
/// - Remark: Generated from `#/paths//user/emails/delete(users/delete-email-for-authenticated-user)`.
@@ -1806,7 +1807,7 @@ public struct Client: APIProtocol {
1806
1807
///
1807
1808
/// 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)."
1808
1809
///
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.
/// - Remark: Generated from `#/paths//user/following/{username}/delete(users/unfollow)`.
@@ -2030,7 +2031,9 @@ public struct Client: APIProtocol {
2030
2031
}
2031
2032
/// List GPG keys for the authenticated user
2032
2033
///
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.
2034
2037
///
2035
2038
/// - Remark: HTTP `GET /user/gpg_keys`.
2036
2039
/// - Remark: Generated from `#/paths//user/gpg_keys/get(users/list-gpg-keys-for-authenticated-user)`.
@@ -2182,7 +2185,9 @@ public struct Client: APIProtocol {
2182
2185
}
2183
2186
/// Create a GPG key for the authenticated user
2184
2187
///
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.
2186
2191
///
2187
2192
/// - Remark: HTTP `POST /user/gpg_keys`.
2188
2193
/// - Remark: Generated from `#/paths//user/gpg_keys/post(users/create-gpg-key-for-authenticated-user)`.
@@ -2343,7 +2348,9 @@ public struct Client: APIProtocol {
2343
2348
}
2344
2349
/// Get a GPG key for the authenticated user
2345
2350
///
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.
/// - 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 {
2475
2482
}
2476
2483
/// Delete a GPG key for the authenticated user
2477
2484
///
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.
/// - 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 {
2609
2618
}
2610
2619
/// List public SSH keys for the authenticated user
2611
2620
///
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.
2613
2624
///
2614
2625
/// - Remark: HTTP `GET /user/keys`.
2615
2626
/// - Remark: Generated from `#/paths//user/keys/get(users/list-public-ssh-keys-for-authenticated-user)`.
@@ -2761,7 +2772,9 @@ public struct Client: APIProtocol {
2761
2772
}
2762
2773
/// Create a public SSH key for the authenticated user
2763
2774
///
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.
2765
2778
///
2766
2779
/// - Remark: HTTP `POST /user/keys`.
2767
2780
/// - Remark: Generated from `#/paths//user/keys/post(users/create-public-ssh-key-for-authenticated-user)`.
@@ -2922,7 +2935,9 @@ public struct Client: APIProtocol {
2922
2935
}
2923
2936
/// Get a public SSH key for the authenticated user
2924
2937
///
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.
2926
2941
///
2927
2942
/// - Remark: HTTP `GET /user/keys/{key_id}`.
2928
2943
/// - 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 {
3054
3069
}
3055
3070
/// Delete a public SSH key for the authenticated user
3056
3071
///
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.
3058
3075
///
3059
3076
/// - Remark: HTTP `DELETE /user/keys/{key_id}`.
3060
3077
/// - 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 {
3166
3183
}
3167
3184
/// List public email addresses for the authenticated user
3168
3185
///
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.
3170
3191
///
3171
3192
/// - Remark: HTTP `GET /user/public_emails`.
3172
3193
/// - Remark: Generated from `#/paths//user/public_emails/get(users/list-public-emails-for-authenticated-user)`.
@@ -3470,7 +3491,9 @@ public struct Client: APIProtocol {
3470
3491
}
3471
3492
/// Add social accounts for the authenticated user
3472
3493
///
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.
3474
3497
///
3475
3498
/// - Remark: HTTP `POST /user/social_accounts`.
3476
3499
/// - Remark: Generated from `#/paths//user/social_accounts/post(users/add-social-account-for-authenticated-user)`.
@@ -3631,7 +3654,9 @@ public struct Client: APIProtocol {
3631
3654
}
3632
3655
/// Delete social accounts for the authenticated user
3633
3656
///
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.
/// - Remark: Generated from `#/paths//user/social_accounts/delete(users/delete-social-account-for-authenticated-user)`.
@@ -3772,7 +3797,9 @@ public struct Client: APIProtocol {
3772
3797
}
3773
3798
/// List SSH signing keys for the authenticated user
3774
3799
///
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.
3776
3803
///
3777
3804
/// - Remark: HTTP `GET /user/ssh_signing_keys`.
3778
3805
/// - 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 {
3924
3951
}
3925
3952
/// Create a SSH signing key for the authenticated user
3926
3953
///
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.
3928
3957
///
3929
3958
/// - Remark: HTTP `POST /user/ssh_signing_keys`.
3930
3959
/// - 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 {
4085
4114
}
4086
4115
/// Get an SSH signing key for the authenticated user
4087
4116
///
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.
/// - 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 {
4217
4248
}
4218
4249
/// Delete an SSH signing key for the authenticated user
4219
4250
///
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.
/// - 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 {
4419
4452
///
4420
4453
/// Provides publicly available information about someone with a GitHub account.
4421
4454
///
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
-
///
4424
4455
/// 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).
4425
4456
///
4426
4457
/// 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 {
4808
4839
}
4809
4840
/// Get contextual information for a user
4810
4841
///
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.
4812
4843
///
4813
4844
/// 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:
4814
4845
///
@@ -4817,6 +4848,8 @@ public struct Client: APIProtocol {
0 commit comments