AllPublicRepositories() public static method

Returns the Uri that returns all public repositories in response to a GET request.
public static AllPublicRepositories ( ) : Uri
return System.Uri
Example #1
0
        /// <summary>
        /// Gets all public repositories since the integer ID of the last Repository that you've seen.
        /// </summary>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/repos/#list-all-public-repositories">API documentation</a> for more information.
        /// The default page size on GitHub.com is 30.
        /// </remarks>
        /// <param name="request">Search parameters of the last repository seen</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
        public Task <IReadOnlyList <Repository> > GetAllPublic(PublicRepositoryRequest request)
        {
            Ensure.ArgumentNotNull(request, "request");

            var url = ApiUrls.AllPublicRepositories(request.Since);

            return(ApiConnection.GetAll <Repository>(url));
        }
        /// <summary>
        /// Gets all public repositories since the integer Id of the last Repository that you've seen.
        /// </summary>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/repos/#list-all-public-repositories">API documentation</a> for more information.
        /// The default page size on GitHub.com is 30.
        /// </remarks>
        /// <param name="request">Search parameters of the last repository seen</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
        public Task <IReadOnlyList <Repository> > GetAllPublic(PublicRepositoryRequest request)
        {
            Ensure.ArgumentNotNull(request, "request");

            var url = ApiUrls.AllPublicRepositories(request.Since);

            return(ApiConnection.GetAll <Repository>(url, null, AcceptHeaders.LicensesApiPreview));
        }
Example #3
0
 /// <summary>
 /// Gets all public repositories.
 /// </summary>
 /// <remarks>
 /// See the <a href="https://developer.github.com/v3/repos/#list-all-public-repositories">API documentation</a> for more information.
 /// The default page size on GitHub.com is 30.
 /// </remarks>
 /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
 /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
 /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
 public Task <IReadOnlyList <Repository> > GetAllPublic()
 {
     return(ApiConnection.GetAll <Repository>(ApiUrls.AllPublicRepositories()));
 }
 /// <summary>
 /// Gets all public repositories.
 /// </summary>
 /// <remarks>
 /// See the <a href="https://developer.github.com/v3/repos/#list-all-public-repositories">API documentation</a> for more information.
 /// The default page size on GitHub.com is 30.
 /// </remarks>
 /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
 /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
 /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
 public Task <IReadOnlyList <Repository> > GetAllPublic()
 {
     return(ApiConnection.GetAll <Repository>(ApiUrls.AllPublicRepositories(), null, AcceptHeaders.LicensesApiPreview));
 }
Example #5
0
        /// <summary>
        /// Gets all public repositories since the integer ID of the last Repository that you've seen.
        /// </summary>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/repos/#list-all-public-repositories">API documentation</a> for more information.
        /// The default page size on GitHub.com is 30.
        /// </remarks>
        /// <param name="request">Search parameters of the last repository seen</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
        public Task <IReadOnlyList <Repository> > GetAllPublic(PublicRepositoryRequest request)
        {
            Ensure.ArgumentNotNull(request, "request");

            return(ApiConnection.GetAll <Repository>(ApiUrls.AllPublicRepositories(), request.ToParametersDictionary()));
        }