WatchedByUser() public static method

Returns the Uri that lists the watched repositories for the specified user.
public static WatchedByUser ( string user ) : Uri
user string The user that has the watches
return Uri
Beispiel #1
0
        /// <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));
        }
Beispiel #2
0
        /// <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)));
        }