public IEnumerable <GitHubRepository> GetTeamRepositories(GitHubTeam team)
        {
            JArray repos = GetJsonCollectionAuthenticated(team.URL + "/repos", true);

            foreach (var repo in repos)
            {
                yield return(new GitHubRepository(repo["full_name"].Value <string>(), repo["private"].Value <bool>()));
            }
        }
        public IEnumerable <GitHubUser> GetTeamMembers(GitHubTeam team)
        {
            JArray members = GetJsonCollectionAuthenticated(team.URL + "/members", true);

            foreach (var member in members)
            {
                yield return(new GitHubUser(member["login"].Value <string>()));
            }
        }
Example #3
0
 public void RemoveTeamMember(GitHubTeam team, string username)
 {
     PushAuthenticatedJson("DELETE", Path.Combine(team.URL, "members", username), null);
 }
Example #4
0
 public IEnumerable<GitHubUser> GetTeamMembers(GitHubTeam team)
 {
     JArray members = GetJsonCollectionAuthenticated(team.URL + "/members", true);
     foreach (var member in members)
         yield return new GitHubUser(member["login"].Value<string>());
 }
Example #5
0
 public void AddTeamToRepository(GitHubRepository repo, GitHubTeam team)
 {
     PushAuthenticatedJson("PUT", Path.Combine(team.URL, "repos", Organisation, repo.Name), null);
 }
Example #6
0
 public IEnumerable<GitHubRepository> GetTeamRepositories(GitHubTeam team)
 {
     JArray repos = GetJsonCollectionAuthenticated(team.URL + "/repos", true);
     foreach (var repo in repos)
         yield return new GitHubRepository(repo["full_name"].Value<string>(), repo["private"].Value<bool>());
 }
 public void AddTeamToRepository(GitHubRepository repo, GitHubTeam team)
 {
     PushAuthenticatedJson("PUT", Path.Combine(team.URL, "repos", Organisation, repo.Name), null);
 }
 public void RemoveTeamMember(GitHubTeam team, string username)
 {
     PushAuthenticatedJson("DELETE", Path.Combine(team.URL, "members", username), null);
 }