Esempio n. 1
0
 /// <summary>
 /// Gets all repositories owned by the current user.
 /// </summary>
 /// <remarks>
 /// See the <a href="http://developer.github.com/v3/repos/#list-your-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> > GetAllForCurrent()
 {
     return(ApiConnection.GetAll <Repository>(ApiUrls.Repositories()));
 }
Esempio n. 2
0
        /// <summary>
        /// Gets all  labels for the repository.
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository">API documentation</a> for more information.
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="options">Options for changing the API response</param>
        public Task <IReadOnlyList <Label> > GetAllForRepository(int repositoryId, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Label>(ApiUrls.Labels(repositoryId), options));
        }
Esempio n. 3
0
        /// <summary>
        /// Gets all  labels for the issue.
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#list-labels-on-an-issue">API documentation</a> for more information.
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="number">The number of the issue</param>
        /// <param name="options">Options for changing the API response</param>
        public Task <IReadOnlyList <Label> > GetAllForIssue(int repositoryId, int number, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Label>(ApiUrls.IssueLabels(repositoryId, number), options));
        }
Esempio n. 4
0
        /// <summary>
        /// Retrieves all of the <see cref="Repository"/>(ies) starred by the specified user.
        /// </summary>
        /// <param name="user">The login of the user</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        /// <returns>
        /// A <see cref="IReadOnlyPagedCollection{Repository}"/>(ies) starred by the specified user.
        /// </returns>
        public Task <IReadOnlyList <Repository> > GetAllForUser(string user)
        {
            Ensure.ArgumentNotNullOrEmptyString(user, "user");

            return(ApiConnection.GetAll <Repository>(ApiUrls.StarredByUser(user)));
        }
Esempio n. 5
0
        public Task <IReadOnlyList <Repository> > GetAllForCurrent(StarredRequest request)
        {
            Ensure.ArgumentNotNull(request, "request");

            return(ApiConnection.GetAll <Repository>(ApiUrls.Starred(), request.ToParametersDictionary()));
        }
        /// <summary>
        /// Gets all the collaborators on a repository.
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/repos/collaborators/#list">API documentation</a> for more information.
        /// </remarks>
        /// <param name="repositoryId">The id of the repository</param>
        /// <param name="options">Options for changing the API response</param>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        public Task <IReadOnlyList <User> > GetAll(long repositoryId, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <User>(ApiUrls.RepoCollaborators(repositoryId), options));
        }
Esempio n. 7
0
        /// <summary>
        /// Gets all the public events
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/activity/events/#list-public-events
        /// </remarks>
        /// <param name="options">Options for changing the API response</param>
        /// <returns>All the public <see cref="Activity"/>s for the particular user.</returns>
        public Task <IReadOnlyList <Activity> > GetAll(ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Activity>(ApiUrls.Events(), options));
        }
Esempio n. 8
0
        /// <summary>
        /// Gets all the issue events for a given repository
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
        /// </remarks>
        /// <param name="repositoryId">The ID of the repository</param>
        /// <param name="options">Options for changing the API response</param>
        public Task <IReadOnlyList <Activity> > GetAllIssuesForRepository(int repositoryId, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Activity>(ApiUrls.IssuesEvents(repositoryId), options));
        }