LatestRelease() public static method

Returns the Uri that returns the latest release for the specified repository
public static LatestRelease ( long repositoryId ) : Uri
repositoryId long The Id of the repository
return System.Uri
        /// <summary>
        /// Gets the latest <see cref="Release"/> for the specified repository.
        /// </summary>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/repos/releases/#get-the-latest-release">API documentation</a> for more information.
        /// </remarks>
        /// <param name="owner">The repository's owner</param>
        /// <param name="name">The repository's name</param>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        public Task<Release> GetLatest(string owner, string name)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            var endpoint = ApiUrls.LatestRelease(owner, name);
            return ApiConnection.Get<Release>(endpoint);
        }
Example #2
0
        /// <summary>
        /// Gets the latest <see cref="Release"/> for the specified repository.
        /// </summary>
        /// <remarks>
        /// See the <a href="https://developer.github.com/v3/repos/releases/#get-the-latest-release">API documentation</a> for more information.
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
        public Task <Release> GetLatest(long repositoryId)
        {
            var endpoint = ApiUrls.LatestRelease(repositoryId);

            return(ApiConnection.Get <Release>(endpoint));
        }