/// <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())); }
/// <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)); }
/// <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)); }
/// <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))); }
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)); }
/// <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)); }
/// <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)); }