Watchers() public static method

Returns the Uri that lists the watched repositories for the authenticated user.
public static Watchers ( long repositoryId ) : Uri
repositoryId long The Id of the repository
return Uri
Esempio n. 1
0
        /// <summary>
        /// Retrieves all of the watchers for the passed repository.
        /// </summary>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        /// <returns>A <see cref="IReadOnlyPagedCollection{User}"/> of <see cref="User"/>s watching the passed repository.</returns>
        public Task <IReadOnlyList <User> > GetAllWatchers(string owner, string name)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.GetAll <User>(ApiUrls.Watchers(owner, name)));
        }
Esempio n. 2
0
        /// <summary>
        /// Retrieves all of the watchers for the passed repository.
        /// </summary>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="options">Options for changing API's response.</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        public Task <IReadOnlyList <User> > GetAllWatchers(string owner, string name, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <User>(ApiUrls.Watchers(owner, name), options));
        }
Esempio n. 3
0
        /// <summary>
        /// Retrieves all of the watchers for the passed repository.
        /// </summary>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="options">Options for changing API's response.</param>
        /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
        public Task <IReadOnlyList <User> > GetAllWatchers(long repositoryId, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <User>(ApiUrls.Watchers(repositoryId), options));
        }