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