Using Octokit, I can traverse link rels
to get to "organization" and "members," but I can't seem to find "teams" anywhere.
I can get a representation of an org, but the link rels
don't include anything for team
curl -H "Authorization: token $OAUTHTOKEN" https://api.github.com/orgs/MY_ORG
gives me
{
"login": "…",
"id": …,
"url": "https://api.github.com/orgs/MY_ORG",
"repos_url": "https://api.github.com/orgs/MY_ORG/repos",
"events_url": "https://api.github.com/orgs/MY_ORG/events",
"members_url": "https://api.github.com/orgs/MY_ORG/members{/member}",
"public_members_url": "https://api.github.com/orgs/MY_ORG/public_members{/member}"
…
}
Octokit nets similar results:
client = Octokit::Client.new access_token: ENV['GITHUB_ACCESS_TOKEN']
my_org = client.org 'MY_ORG'
my_org.rels
{:self_url=>"https://api.github.com/orgs/MY_ORG",
:repos_url=>"https://api.github.com/orgs/MY_ORG/repos",
:events_url=>"https://api.github.com/orgs/MY_ORG/events",
:members_url=>"https://api.github.com/orgs/MY_ORG/members",
:public_members_url=>"https://api.github.com/orgs/MY_ORG/public_members",
:avatar_url=>"…",
:html_url=>"https://github.com/MY_ORG"}