Struct roctogen::endpoints::orgs::Orgs[][src]

pub struct Orgs<'api> { /* fields omitted */ }

Implementations

impl<'api> Orgs<'api>[src]

pub async fn block_user_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsBlockUserError>
[src]

pub fn block_user(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsBlockUserError>
[src]

pub async fn cancel_invitation_async(
    &self,
    org: &str,
    invitation_id: i32
) -> Result<(), OrgsCancelInvitationError>
[src]


Cancel an organization invitation

Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.

This endpoint triggers notifications.

GitHub API docs for cancel_invitation


pub fn cancel_invitation(
    &self,
    org: &str,
    invitation_id: i32
) -> Result<(), OrgsCancelInvitationError>
[src]


Cancel an organization invitation

Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.

This endpoint triggers notifications.

GitHub API docs for cancel_invitation


pub async fn check_blocked_user_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsCheckBlockedUserError>
[src]

pub fn check_blocked_user(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsCheckBlockedUserError>
[src]

pub async fn check_membership_for_user_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsCheckMembershipForUserError>
[src]


Check organization membership for a user

Check if a user is, publicly or privately, a member of the organization.

GitHub API docs for check_membership_for_user


pub fn check_membership_for_user(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsCheckMembershipForUserError>
[src]


Check organization membership for a user

Check if a user is, publicly or privately, a member of the organization.

GitHub API docs for check_membership_for_user


pub async fn check_public_membership_for_user_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsCheckPublicMembershipForUserError>
[src]

pub fn check_public_membership_for_user(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsCheckPublicMembershipForUserError>
[src]

pub async fn convert_member_to_outside_collaborator_async(
    &self,
    org: &str,
    username: &str
) -> Result<HashMap<String, Value>, OrgsConvertMemberToOutsideCollaboratorError>
[src]


Convert an organization member to outside collaborator

When an organization member is converted to an outside collaborator, they’ll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see “Converting an organization member to an outside collaborator”.

GitHub API docs for convert_member_to_outside_collaborator


pub fn convert_member_to_outside_collaborator(
    &self,
    org: &str,
    username: &str
) -> Result<HashMap<String, Value>, OrgsConvertMemberToOutsideCollaboratorError>
[src]


Convert an organization member to outside collaborator

When an organization member is converted to an outside collaborator, they’ll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see “Converting an organization member to an outside collaborator”.

GitHub API docs for convert_member_to_outside_collaborator


pub async fn create_invitation_async(
    &self,
    org: &str,
    body: PostOrgsCreateInvitation
) -> Result<OrganizationInvitation, OrgsCreateInvitationError>
[src]


Create an organization invitation

Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See “Abuse rate limits” and “Dealing with abuse rate limits” for details.

GitHub API docs for create_invitation


pub fn create_invitation(
    &self,
    org: &str,
    body: PostOrgsCreateInvitation
) -> Result<OrganizationInvitation, OrgsCreateInvitationError>
[src]


Create an organization invitation

Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See “Abuse rate limits” and “Dealing with abuse rate limits” for details.

GitHub API docs for create_invitation


pub async fn create_webhook_async(
    &self,
    org: &str,
    body: PostOrgsCreateWebhook
) -> Result<OrgHook, OrgsCreateWebhookError>
[src]


Create an organization webhook

Here’s how you can create a hook that posts payloads in JSON format:

GitHub API docs for create_webhook


pub fn create_webhook(
    &self,
    org: &str,
    body: PostOrgsCreateWebhook
) -> Result<OrgHook, OrgsCreateWebhookError>
[src]


Create an organization webhook

Here’s how you can create a hook that posts payloads in JSON format:

GitHub API docs for create_webhook


pub async fn delete_webhook_async(
    &self,
    org: &str,
    hook_id: i32
) -> Result<(), OrgsDeleteWebhookError>
[src]

pub fn delete_webhook(
    &self,
    org: &str,
    hook_id: i32
) -> Result<(), OrgsDeleteWebhookError>
[src]

pub async fn get_async(
    &self,
    org: &str
) -> Result<OrganizationFull, OrgsGetError>
[src]


Get an organization

To see many of the organization response values, you need to be an authenticated organization owner with the admin:org scope. When the value of two_factor_requirement_enabled is true, the organization requires all members, billing managers, and outside collaborators to enable two-factor authentication.

GitHub Apps with the Organization plan permission can use this endpoint to retrieve information about an organization’s GitHub plan. See “Authenticating with GitHub Apps” for details. For an example response, see ‘Response with GitHub plan information’ below.“

GitHub API docs for get

The get_async endpoint is enabled with the surtur cargo feature.


pub fn get(&self, org: &str) -> Result<OrganizationFull, OrgsGetError>[src]


Get an organization

To see many of the organization response values, you need to be an authenticated organization owner with the admin:org scope. When the value of two_factor_requirement_enabled is true, the organization requires all members, billing managers, and outside collaborators to enable two-factor authentication.

GitHub Apps with the Organization plan permission can use this endpoint to retrieve information about an organization’s GitHub plan. See “Authenticating with GitHub Apps” for details. For an example response, see ‘Response with GitHub plan information’ below.“

GitHub API docs for get

The get endpoint is enabled with the surtur cargo feature.


pub async fn get_audit_log_async(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsGetAuditLogParams<'api>>>
) -> Result<Vec<AuditLogEvent>, OrgsGetAuditLogError>
[src]


Get the audit log for an organization

Gets the audit log for an organization. For more information, see “Reviewing the audit log for your organization.”

To use this endpoint, you must be an organization owner, and you must use an access token with the admin:org scope. GitHub Apps must have the organization_administration read permission to use this endpoint.

GitHub API docs for get_audit_log


pub fn get_audit_log(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsGetAuditLogParams<'api>>>
) -> Result<Vec<AuditLogEvent>, OrgsGetAuditLogError>
[src]


Get the audit log for an organization

Gets the audit log for an organization. For more information, see “Reviewing the audit log for your organization.”

To use this endpoint, you must be an organization owner, and you must use an access token with the admin:org scope. GitHub Apps must have the organization_administration read permission to use this endpoint.

GitHub API docs for get_audit_log


pub async fn get_membership_for_authenticated_user_async(
    &self,
    org: &str
) -> Result<OrgMembership, OrgsGetMembershipForAuthenticatedUserError>
[src]

pub fn get_membership_for_authenticated_user(
    &self,
    org: &str
) -> Result<OrgMembership, OrgsGetMembershipForAuthenticatedUserError>
[src]

pub async fn get_membership_for_user_async(
    &self,
    org: &str,
    username: &str
) -> Result<OrgMembership, OrgsGetMembershipForUserError>
[src]


Get organization membership for a user

In order to get a user’s membership with an organization, the authenticated user must be an organization member. The state parameter in the response can be used to identify the user’s membership status.

GitHub API docs for get_membership_for_user


pub fn get_membership_for_user(
    &self,
    org: &str,
    username: &str
) -> Result<OrgMembership, OrgsGetMembershipForUserError>
[src]


Get organization membership for a user

In order to get a user’s membership with an organization, the authenticated user must be an organization member. The state parameter in the response can be used to identify the user’s membership status.

GitHub API docs for get_membership_for_user


pub async fn get_webhook_async(
    &self,
    org: &str,
    hook_id: i32
) -> Result<OrgHook, OrgsGetWebhookError>
[src]


Get an organization webhook

Returns a webhook configured in an organization. To get only the webhook config properties, see “Get a webhook configuration for an organization.”

GitHub API docs for get_webhook


pub fn get_webhook(
    &self,
    org: &str,
    hook_id: i32
) -> Result<OrgHook, OrgsGetWebhookError>
[src]


Get an organization webhook

Returns a webhook configured in an organization. To get only the webhook config properties, see “Get a webhook configuration for an organization.”

GitHub API docs for get_webhook


pub async fn get_webhook_config_for_org_async(
    &self,
    org: &str,
    hook_id: i32
) -> Result<WebhookConfig, OrgsGetWebhookConfigForOrgError>
[src]


Get a webhook configuration for an organization

Returns the webhook configuration for an organization. To get more information about the webhook, including the active state and events, use “Get an organization webhook .”

Access tokens must have the admin:org_hook scope, and GitHub Apps must have the organization_hooks:read permission.

GitHub API docs for get_webhook_config_for_org


pub fn get_webhook_config_for_org(
    &self,
    org: &str,
    hook_id: i32
) -> Result<WebhookConfig, OrgsGetWebhookConfigForOrgError>
[src]


Get a webhook configuration for an organization

Returns the webhook configuration for an organization. To get more information about the webhook, including the active state and events, use “Get an organization webhook .”

Access tokens must have the admin:org_hook scope, and GitHub Apps must have the organization_hooks:read permission.

GitHub API docs for get_webhook_config_for_org


pub async fn list_async(
    &self,
    query_params: Option<impl Into<OrgsListParams>>
) -> Result<Vec<OrganizationSimple>, OrgsListError>
[src]


List organizations

Lists all organizations, in the order that they were created on GitHub.

Note: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of organizations.

GitHub API docs for list


pub fn list(
    &self,
    query_params: Option<impl Into<OrgsListParams>>
) -> Result<Vec<OrganizationSimple>, OrgsListError>
[src]


List organizations

Lists all organizations, in the order that they were created on GitHub.

Note: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of organizations.

GitHub API docs for list


pub async fn list_app_installations_async(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListAppInstallationsParams>>
) -> Result<GetAppsListInstallationsForAuthenticatedUserResponse200, OrgsListAppInstallationsError>
[src]


List app installations for an organization

Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with admin:read scope to use this endpoint.

GitHub API docs for list_app_installations


pub fn list_app_installations(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListAppInstallationsParams>>
) -> Result<GetAppsListInstallationsForAuthenticatedUserResponse200, OrgsListAppInstallationsError>
[src]


List app installations for an organization

Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with admin:read scope to use this endpoint.

GitHub API docs for list_app_installations


pub async fn list_blocked_users_async(
    &self,
    org: &str
) -> Result<Vec<SimpleUser>, OrgsListBlockedUsersError>
[src]

pub fn list_blocked_users(
    &self,
    org: &str
) -> Result<Vec<SimpleUser>, OrgsListBlockedUsersError>
[src]

pub async fn list_failed_invitations_async(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListFailedInvitationsParams>>
) -> Result<Vec<OrganizationInvitation>, OrgsListFailedInvitationsError>
[src]


List failed organization invitations

The return hash contains failed_at and failed_reason fields which represent the time at which the invitation failed and the reason for the failure.

GitHub API docs for list_failed_invitations


pub fn list_failed_invitations(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListFailedInvitationsParams>>
) -> Result<Vec<OrganizationInvitation>, OrgsListFailedInvitationsError>
[src]


List failed organization invitations

The return hash contains failed_at and failed_reason fields which represent the time at which the invitation failed and the reason for the failure.

GitHub API docs for list_failed_invitations


pub async fn list_for_authenticated_user_async(
    &self,
    query_params: Option<impl Into<OrgsListForAuthenticatedUserParams>>
) -> Result<Vec<OrganizationSimple>, OrgsListForAuthenticatedUserError>
[src]


List organizations for the authenticated user

List organizations for the authenticated user.

OAuth scope requirements

This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org scope, you can publicize your organization membership with user scope, etc.). Therefore, this API requires at least user or read:org scope. OAuth requests with insufficient scope receive a 403 Forbidden response.

GitHub API docs for list_for_authenticated_user


pub fn list_for_authenticated_user(
    &self,
    query_params: Option<impl Into<OrgsListForAuthenticatedUserParams>>
) -> Result<Vec<OrganizationSimple>, OrgsListForAuthenticatedUserError>
[src]


List organizations for the authenticated user

List organizations for the authenticated user.

OAuth scope requirements

This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org scope, you can publicize your organization membership with user scope, etc.). Therefore, this API requires at least user or read:org scope. OAuth requests with insufficient scope receive a 403 Forbidden response.

GitHub API docs for list_for_authenticated_user


pub async fn list_for_user_async(
    &self,
    username: &str,
    query_params: Option<impl Into<OrgsListForUserParams>>
) -> Result<Vec<OrganizationSimple>, OrgsListForUserError>
[src]


List organizations for a user

List public organization memberships for the specified user.

This method only lists public memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the List organizations for the authenticated user API instead.

GitHub API docs for list_for_user


pub fn list_for_user(
    &self,
    username: &str,
    query_params: Option<impl Into<OrgsListForUserParams>>
) -> Result<Vec<OrganizationSimple>, OrgsListForUserError>
[src]


List organizations for a user

List public organization memberships for the specified user.

This method only lists public memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the List organizations for the authenticated user API instead.

GitHub API docs for list_for_user


pub async fn list_invitation_teams_async(
    &self,
    org: &str,
    invitation_id: i32,
    query_params: Option<impl Into<OrgsListInvitationTeamsParams>>
) -> Result<Vec<Team>, OrgsListInvitationTeamsError>
[src]


List organization invitation teams

List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.

GitHub API docs for list_invitation_teams


pub fn list_invitation_teams(
    &self,
    org: &str,
    invitation_id: i32,
    query_params: Option<impl Into<OrgsListInvitationTeamsParams>>
) -> Result<Vec<Team>, OrgsListInvitationTeamsError>
[src]


List organization invitation teams

List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.

GitHub API docs for list_invitation_teams


pub async fn list_members_async(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListMembersParams<'api>>>
) -> Result<Vec<SimpleUser>, OrgsListMembersError>
[src]


List organization members

List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.

GitHub API docs for list_members


pub fn list_members(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListMembersParams<'api>>>
) -> Result<Vec<SimpleUser>, OrgsListMembersError>
[src]


List organization members

List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.

GitHub API docs for list_members


pub async fn list_memberships_for_authenticated_user_async(
    &self,
    query_params: Option<impl Into<OrgsListMembershipsForAuthenticatedUserParams<'api>>>
) -> Result<Vec<OrgMembership>, OrgsListMembershipsForAuthenticatedUserError>
[src]

pub fn list_memberships_for_authenticated_user(
    &self,
    query_params: Option<impl Into<OrgsListMembershipsForAuthenticatedUserParams<'api>>>
) -> Result<Vec<OrgMembership>, OrgsListMembershipsForAuthenticatedUserError>
[src]

pub async fn list_outside_collaborators_async(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListOutsideCollaboratorsParams<'api>>>
) -> Result<Vec<SimpleUser>, OrgsListOutsideCollaboratorsError>
[src]


List outside collaborators for an organization

List all users who are outside collaborators of an organization.

GitHub API docs for list_outside_collaborators


pub fn list_outside_collaborators(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListOutsideCollaboratorsParams<'api>>>
) -> Result<Vec<SimpleUser>, OrgsListOutsideCollaboratorsError>
[src]


List outside collaborators for an organization

List all users who are outside collaborators of an organization.

GitHub API docs for list_outside_collaborators


pub async fn list_pending_invitations_async(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListPendingInvitationsParams>>
) -> Result<Vec<OrganizationInvitation>, OrgsListPendingInvitationsError>
[src]


List pending organization invitations

The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, hiring_manager, or reinstate. If the invitee is not a GitHub member, the login field in the return hash will be null.

GitHub API docs for list_pending_invitations


pub fn list_pending_invitations(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListPendingInvitationsParams>>
) -> Result<Vec<OrganizationInvitation>, OrgsListPendingInvitationsError>
[src]


List pending organization invitations

The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, hiring_manager, or reinstate. If the invitee is not a GitHub member, the login field in the return hash will be null.

GitHub API docs for list_pending_invitations


pub async fn list_public_members_async(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListPublicMembersParams>>
) -> Result<Vec<SimpleUser>, OrgsListPublicMembersError>
[src]


List public organization members

Members of an organization can choose to have their membership publicized or not.

GitHub API docs for list_public_members


pub fn list_public_members(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListPublicMembersParams>>
) -> Result<Vec<SimpleUser>, OrgsListPublicMembersError>
[src]


List public organization members

Members of an organization can choose to have their membership publicized or not.

GitHub API docs for list_public_members


pub async fn list_saml_sso_authorizations_async(
    &self,
    org: &str
) -> Result<Vec<CredentialAuthorization>, OrgsListSamlSsoAuthorizationsError>
[src]


List SAML SSO authorizations for an organization

Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see GitHub’s products.

An authenticated organization owner with the read:org scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see About authentication with SAML single sign-on.

GitHub API docs for list_saml_sso_authorizations


pub fn list_saml_sso_authorizations(
    &self,
    org: &str
) -> Result<Vec<CredentialAuthorization>, OrgsListSamlSsoAuthorizationsError>
[src]


List SAML SSO authorizations for an organization

Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see GitHub’s products.

An authenticated organization owner with the read:org scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see About authentication with SAML single sign-on.

GitHub API docs for list_saml_sso_authorizations


pub async fn list_webhooks_async(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListWebhooksParams>>
) -> Result<Vec<OrgHook>, OrgsListWebhooksError>
[src]

pub fn list_webhooks(
    &self,
    org: &str,
    query_params: Option<impl Into<OrgsListWebhooksParams>>
) -> Result<Vec<OrgHook>, OrgsListWebhooksError>
[src]

pub async fn ping_webhook_async(
    &self,
    org: &str,
    hook_id: i32
) -> Result<(), OrgsPingWebhookError>
[src]


Ping an organization webhook

This will trigger a ping event to be sent to the hook.

GitHub API docs for ping_webhook


pub fn ping_webhook(
    &self,
    org: &str,
    hook_id: i32
) -> Result<(), OrgsPingWebhookError>
[src]


Ping an organization webhook

This will trigger a ping event to be sent to the hook.

GitHub API docs for ping_webhook


pub async fn remove_member_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsRemoveMemberError>
[src]


Remove an organization member

Removing a user from this list will remove them from all teams and they will no longer have any access to the organization’s repositories.

GitHub API docs for remove_member


pub fn remove_member(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsRemoveMemberError>
[src]


Remove an organization member

Removing a user from this list will remove them from all teams and they will no longer have any access to the organization’s repositories.

GitHub API docs for remove_member


pub async fn remove_membership_for_user_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsRemoveMembershipForUserError>
[src]


Remove organization membership for a user

In order to remove a user’s membership with an organization, the authenticated user must be an organization owner.

If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.

GitHub API docs for remove_membership_for_user


pub fn remove_membership_for_user(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsRemoveMembershipForUserError>
[src]


Remove organization membership for a user

In order to remove a user’s membership with an organization, the authenticated user must be an organization owner.

If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.

GitHub API docs for remove_membership_for_user


pub async fn remove_outside_collaborator_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsRemoveOutsideCollaboratorError>
[src]


Remove outside collaborator from an organization

Removing a user from this list will remove them from all the organization’s repositories.

GitHub API docs for remove_outside_collaborator


pub fn remove_outside_collaborator(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsRemoveOutsideCollaboratorError>
[src]


Remove outside collaborator from an organization

Removing a user from this list will remove them from all the organization’s repositories.

GitHub API docs for remove_outside_collaborator


pub async fn remove_public_membership_for_authenticated_user_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsRemovePublicMembershipForAuthenticatedUserError>
[src]

pub fn remove_public_membership_for_authenticated_user(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsRemovePublicMembershipForAuthenticatedUserError>
[src]

pub async fn remove_saml_sso_authorization_async(
    &self,
    org: &str,
    credential_id: i32
) -> Result<(), OrgsRemoveSamlSsoAuthorizationError>
[src]


Remove a SAML SSO authorization for an organization

Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see GitHub’s products.

An authenticated organization owner with the admin:org scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone’s credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.

GitHub API docs for remove_saml_sso_authorization


pub fn remove_saml_sso_authorization(
    &self,
    org: &str,
    credential_id: i32
) -> Result<(), OrgsRemoveSamlSsoAuthorizationError>
[src]


Remove a SAML SSO authorization for an organization

Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see GitHub’s products.

An authenticated organization owner with the admin:org scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone’s credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.

GitHub API docs for remove_saml_sso_authorization


pub async fn set_membership_for_user_async(
    &self,
    org: &str,
    username: &str,
    body: PutOrgsSetMembershipForUser
) -> Result<OrgMembership, OrgsSetMembershipForUserError>
[src]


Set organization membership for a user

Only authenticated organization owners can add a member to the organization or update the member’s role.

  • If the authenticated user is adding a member to the organization, the invited user will receive an email inviting them to the organization. The user’s membership status will be pending until they accept the invitation.

  • Authenticated users can update a user’s membership by passing the role parameter. If the authenticated user changes a member’s role to admin, the affected user will receive an email notifying them that they’ve been made an organization owner. If the authenticated user changes an owner’s role to member, no email will be sent.

Rate limits

To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.

GitHub API docs for set_membership_for_user


pub fn set_membership_for_user(
    &self,
    org: &str,
    username: &str,
    body: PutOrgsSetMembershipForUser
) -> Result<OrgMembership, OrgsSetMembershipForUserError>
[src]


Set organization membership for a user

Only authenticated organization owners can add a member to the organization or update the member’s role.

  • If the authenticated user is adding a member to the organization, the invited user will receive an email inviting them to the organization. The user’s membership status will be pending until they accept the invitation.

  • Authenticated users can update a user’s membership by passing the role parameter. If the authenticated user changes a member’s role to admin, the affected user will receive an email notifying them that they’ve been made an organization owner. If the authenticated user changes an owner’s role to member, no email will be sent.

Rate limits

To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.

GitHub API docs for set_membership_for_user


pub async fn set_public_membership_for_authenticated_user_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsSetPublicMembershipForAuthenticatedUserError>
[src]


Set public organization membership for the authenticated user

The user can publicize their own membership. (A user cannot publicize the membership for another user.)

Note that you’ll need to set Content-Length to zero when calling out to this endpoint. For more information, see “HTTP verbs.”

GitHub API docs for set_public_membership_for_authenticated_user


pub fn set_public_membership_for_authenticated_user(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsSetPublicMembershipForAuthenticatedUserError>
[src]


Set public organization membership for the authenticated user

The user can publicize their own membership. (A user cannot publicize the membership for another user.)

Note that you’ll need to set Content-Length to zero when calling out to this endpoint. For more information, see “HTTP verbs.”

GitHub API docs for set_public_membership_for_authenticated_user


pub async fn unblock_user_async(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsUnblockUserError>
[src]

pub fn unblock_user(
    &self,
    org: &str,
    username: &str
) -> Result<(), OrgsUnblockUserError>
[src]

pub async fn update_async(
    &self,
    org: &str,
    body: PatchOrgsUpdate
) -> Result<OrganizationFull, OrgsUpdateError>
[src]


Update an organization

Parameter Deprecation Notice: GitHub will replace and discontinue members_allowed_repository_creation_type in favor of more granular permissions. The new input parameters are members_can_create_public_repositories, members_can_create_private_repositories for all organizations and members_can_create_internal_repositories for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the blog post.

Enables an authenticated organization owner with the admin:org scope to update the organization’s profile and member privileges.

GitHub API docs for update

The update_async endpoint is enabled with the surtur cargo feature.


pub fn update(
    &self,
    org: &str,
    body: PatchOrgsUpdate
) -> Result<OrganizationFull, OrgsUpdateError>
[src]


Update an organization

Parameter Deprecation Notice: GitHub will replace and discontinue members_allowed_repository_creation_type in favor of more granular permissions. The new input parameters are members_can_create_public_repositories, members_can_create_private_repositories for all organizations and members_can_create_internal_repositories for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the blog post.

Enables an authenticated organization owner with the admin:org scope to update the organization’s profile and member privileges.

GitHub API docs for update

The update endpoint is enabled with the surtur cargo feature.


pub async fn update_membership_for_authenticated_user_async(
    &self,
    org: &str,
    body: PatchOrgsUpdateMembershipForAuthenticatedUser
) -> Result<OrgMembership, OrgsUpdateMembershipForAuthenticatedUserError>
[src]

pub fn update_membership_for_authenticated_user(
    &self,
    org: &str,
    body: PatchOrgsUpdateMembershipForAuthenticatedUser
) -> Result<OrgMembership, OrgsUpdateMembershipForAuthenticatedUserError>
[src]

pub async fn update_webhook_async(
    &self,
    org: &str,
    hook_id: i32,
    body: PatchOrgsUpdateWebhook
) -> Result<OrgHook, OrgsUpdateWebhookError>
[src]


Update an organization webhook

Updates a webhook configured in an organization. When you update a webhook, the secret will be overwritten. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use “Update a webhook configuration for an organization.”

GitHub API docs for update_webhook


pub fn update_webhook(
    &self,
    org: &str,
    hook_id: i32,
    body: PatchOrgsUpdateWebhook
) -> Result<OrgHook, OrgsUpdateWebhookError>
[src]


Update an organization webhook

Updates a webhook configured in an organization. When you update a webhook, the secret will be overwritten. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use “Update a webhook configuration for an organization.”

GitHub API docs for update_webhook


pub async fn update_webhook_config_for_org_async(
    &self,
    org: &str,
    hook_id: i32,
    body: PatchOrgsUpdateWebhookConfigForOrg
) -> Result<WebhookConfig, OrgsUpdateWebhookConfigForOrgError>
[src]


Update a webhook configuration for an organization

Updates the webhook configuration for an organization. To update more information about the webhook, including the active state and events, use “Update an organization webhook .”

Access tokens must have the admin:org_hook scope, and GitHub Apps must have the organization_hooks:write permission.

GitHub API docs for update_webhook_config_for_org


pub fn update_webhook_config_for_org(
    &self,
    org: &str,
    hook_id: i32,
    body: PatchOrgsUpdateWebhookConfigForOrg
) -> Result<WebhookConfig, OrgsUpdateWebhookConfigForOrgError>
[src]


Update a webhook configuration for an organization

Updates the webhook configuration for an organization. To update more information about the webhook, including the active state and events, use “Update an organization webhook .”

Access tokens must have the admin:org_hook scope, and GitHub Apps must have the organization_hooks:write permission.

GitHub API docs for update_webhook_config_for_org


Auto Trait Implementations

impl<'api> RefUnwindSafe for Orgs<'api>

impl<'api> Send for Orgs<'api>

impl<'api> Sync for Orgs<'api>

impl<'api> Unpin for Orgs<'api>

impl<'api> UnwindSafe for Orgs<'api>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.