mirage / ocaml-github

GitHub APIv3 OCaml bindings
ISC License
100 stars 61 forks source link

Support retrieving the public organizations for a user. #130

Closed yallop closed 8 years ago

yallop commented 8 years ago

[API call here: https://developer.github.com/v3/orgs/#list-user-organizations]

Example:

# Lwt_unix.run @@ Monad.run @@ Stream.to_list @@ Organization.user_orgs ~user:"amirmc" ();;
- : Github_t.org list =
[{Github_t.org_login = "mirage"; org_id = 131943L;
  org_url = "https://api.github.com/orgs/mirage";
  org_avatar_url = Some "https://avatars.githubusercontent.com/u/131943?v=3"};
 {Github_t.org_login = "horizon-institute"; org_id = 167906L;
  org_url = "https://api.github.com/orgs/horizon-institute";
  org_avatar_url = Some "https://avatars.githubusercontent.com/u/167906?v=3"};
 {Github_t.org_login = "signposts"; org_id = 1529467L;
  org_url = "https://api.github.com/orgs/signposts";
  org_avatar_url = Some "https://avatars.githubusercontent.com/u/1529467?v=3"};
 {Github_t.org_login = "nymote"; org_id = 1618865L;
  org_url = "https://api.github.com/orgs/nymote";
  org_avatar_url = Some "https://avatars.githubusercontent.com/u/1618865?v=3"};
 {Github_t.org_login = "ocaml"; org_id = 1841483L;
  org_url = "https://api.github.com/orgs/ocaml";
  org_avatar_url = Some "https://avatars.githubusercontent.com/u/1841483?v=3"};
 {Github_t.org_login = "ocamllabs"; org_id = 2475115L;
  org_url = "https://api.github.com/orgs/ocamllabs";
  org_avatar_url = Some "https://avatars.githubusercontent.com/u/2475115?v=3"};
 {Github_t.org_login = "ocaml-attic"; org_id = 6136894L;
  org_url = "https://api.github.com/orgs/ocaml-attic";
  org_avatar_url = Some "https://avatars.githubusercontent.com/u/6136894?v=3"}]
dsheets commented 8 years ago

Thanks!