public Task <IReadOnlyList <Repository> > GetAllRepositories(int id, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); var endpoint = ApiUrls.TeamRepositories(id); return(ApiConnection.GetAll <Repository>(endpoint, options)); }
/// <summary> /// Returns all team's repositories. /// </summary> /// <param name="id">Team Id.</param> /// <param name="options">Options to change API behaviour.</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>The team's repositories</returns> public Task <IReadOnlyList <Repository> > GetAllRepositories(int id, ApiOptions options) { Ensure.ArgumentNotNull(options, "options"); var endpoint = ApiUrls.TeamRepositories(id); return(ApiConnection.GetAll <Repository>(endpoint, null, AcceptHeaders.OrganizationPermissionsPreview, options)); }
/// <summary> /// Returns all <see cref="Repository"/>(ies) associated with the given team. /// </summary> /// <param name="id">The team identifier</param> /// <remarks> /// See the <a href="https://developer.github.com/v3/orgs/teams/#list-team-repos">API documentation</a> for more information. /// </remarks> /// <returns>A list of the team's <see cref="Repository"/>(ies).</returns> public Task <IReadOnlyList <Repository> > GetRepositories(int id) { var endpoint = ApiUrls.TeamRepositories(id); return(ApiConnection.GetAll <Repository>(endpoint)); }