view_memberships: View membership of organizations or teams

Description Usage Arguments Details Value Examples

View source: R/memberships.R

Description

view_memberships() summarises the authenticate user's membership in organizations in a table with the properties as columns and a row for each organization. view_membership() returns a list of all membership properties for a user in a single organization or team.

Usage

1
2
3
view_memberships(state, n_max = 1000, ...)

view_membership(user, org, team, ...)

Arguments

state

(string, optional) Filter results depending on the state of the membership. Can be either "active" or "pending". If not supplied, all memberships are returned for the authenticated user.

n_max

(integer, optional) Maximum number to return. Default: 1000.

...

Parameters passed to gh_page() or gh_request().

user

(string) The login of the user.

org

(string) The login of the organization.

team

(integer or string, optional) The ID or name of the team.

Details

Note: you can only view another user's membership in an organization or team if the authenticate user is also a member.

For more details see the GitHub API documentation:

Value

view_memberships() returns a tibble of membership properties. view_membership() returns a list of membership properties for a single organization or team.

Membership Properties:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

  # View membership of all organizations for the authenticated user
  view_memberships()

  # View only active memberships for the authenticated user
  view_memberships(state = "active")

  # View the membership of a user in an organization
  view_membership("ChadGoymer", "HairyCoos")

  # View the membership of a user in a team
  view_membership(user = "ChadGoymer", org = "HairyCoos", team = "HeadCoos")


## End(Not run)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.