public static List <JsonEntities.Release> GetReleases(JsonEntities.Repository repository) { var task = getReleases(repository); task.Wait(); return(task.Result); }
public static JsonEntities.Release GetLatestRelease(JsonEntities.Repository repository) { var task = getLatestRelease(repository); task.Wait(); return(task.Result); }
private static async Task <List <JsonEntities.Release> > getReleases(JsonEntities.Repository repository) { return(await "https://api.github.com/repos" .AppendPathSegment(repository.Owner.Name) .AppendPathSegment(repository.Name) .AppendPathSegment("releases") .WithHeader("Accept", "application / vnd.github.v3 + json") .WithHeader("User-Agent", "Anything") .GetJsonListAsync() as List <JsonEntities.Release>); }