/// <summary> /// Retrieves all of the <see cref="Repository"/>(ies) watched by the specified user. /// </summary> /// <param name="user">The login of the user</param> /// <param name="options">Options for changing API's response.</param> /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception> /// <returns> /// A <see cref="IReadOnlyPagedCollection{Repository}"/>(ies) watched by the specified user. /// </returns> public Task <IReadOnlyList <Repository> > GetAllForUser(string user, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); Ensure.ArgumentNotNull(options, nameof(options)); return(ApiConnection.GetAll <Repository>(ApiUrls.WatchedByUser(user), options)); }
/// <summary> /// Retrieves all of the <see cref="Repository"/>(ies) watched 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) watched by the specified user. /// </returns> public Task <IReadOnlyList <Repository> > GetAllForUser(string user) { Ensure.ArgumentNotNullOrEmptyString(user, "user"); return(ApiConnection.GetAll <Repository>(ApiUrls.WatchedByUser(user))); }