GitHub get organization members
examples/github-rest/rest_get_org_members.py
import json from github_rest_api import get_from_github orgid = 'github' data = get_from_github(f"https://api.github.com/orgs/{orgid}/members") with open("out.json", 'w') as fh: json.dump(data, fh, indent=4) print(data)
python examples/github-rest/rest_get_org_members.py
examples/github-graphql/get_org_members.gql
query { organization(login:"github"){ membersWithRole(first: 10) { edges { node { name avatarUrl } } } } }
python examples/github-graphql/run_query_requests.py examples/github-graphql/get_org_members.gql out.json