TeamRepositories() public static method

returns the Uri for the repositories
public static TeamRepositories ( int id ) : Uri
id int The team id
return Uri
        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));
        }
Beispiel #2
0
        /// <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));
        }
Beispiel #3
0
        /// <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));
        }