anchor.diff:          {error, Reason} ->
               {error, Reason}
       end.
  +
  +%% Teams
  +
  +-spec teams(credentials(), string()) -> result().
  +teams(Cred, Org) ->
  +    Url = make_url(teams, {Org}),
  +    api_call_json_result(Cred, Url).
  +
  +-spec create_team(credentials(), string(), string(), string(), [string()]) ->
  +    result().
  +create_team(Cred, Org, Name, Permission, Repos) ->
  +    Url = make_url(teams, {Org}),
  +    BodyMap = #{name => list_to_binary(Name),
  +                 permission => list_to_binary(Permission),
  +                 repo_names => list_to_binary(Repos)},
  +    Body = jiffy:encode(BodyMap),
  +    case auth_req(Cred, Url, post, Body) of
  +        {ok, Result} ->
  +            JsonResult = jiffy:decode(Result, [return_maps]),
  +            {ok, JsonResult};
  +        {error, {"422", _, _}} ->
  +            {ok, already_exists};
  +        Other ->
  +            Other
  +    end.
  +
  +-spec add_team_member(credentials(), integer(), string()) -> result().
  +add_team_member(Cred, TeamId, Username) ->
  +    Url = make_url(teams, {TeamId, Username}),
  +    Body = [],
  +    case auth_req(Cred, Url, put, Body) of
  +        {ok, _} ->
  +            ok;
  +        Error ->
  +            Error
  +    end.
  +
  +-spec delete_team_member(credentials(), integer(), string()) -> result().
  +delete_team_member(Cred, TeamId, Username) ->
  +    Url = make_url(teams, {TeamId, Username}),
  +    Body = [],
  +    case auth_req(Cred, Url, delete, Body) of
  +        {ok, _} ->
  +            ok;
  +        Error ->
  +            Error
  +    end.
  +
  +%% Hooks
   
   -spec hooks(credentials(), repository()) -> result().
   hooks(Cred, Repo) ->
  
positive.code: orgs(Cred, User) ->
      Url = make_url(orgs, {User}),
      api_call_json_result(Cred, Url).
  
  -spec repos(credentials(), map()) -> result().
  repos(Cred, Opts) ->
  
negative.code:          orgs/2,
           org_repos/3,
           all_org_repos/3,
           %% Teams
           teams/2,
           create_team/5,
           add_team_member/3,
           delete_team_member/3,
           %% Hooks
           hooks/2,
           create_webhook/4,
  