|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Net.Http;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Ombi.Api.Github.Models;
|
|
|
|
@ -15,11 +16,12 @@ namespace Ombi.Api.Github
|
|
|
|
|
private readonly IApi _api;
|
|
|
|
|
private const string BaseUrl = "https://api.github.com/";
|
|
|
|
|
|
|
|
|
|
public async Task<CakeThemesContainer> GetCakeThemes()
|
|
|
|
|
public async Task<List<CakeThemes>> GetCakeThemes()
|
|
|
|
|
{
|
|
|
|
|
var request = new Request("repos/leram84/layer.Cake/contents/Themes", BaseUrl, HttpMethod.Get);
|
|
|
|
|
|
|
|
|
|
return await _api.Request<CakeThemesContainer>(request);
|
|
|
|
|
var request = new Request("repos/leram84/layer.Cake/contents/ombi/themes", BaseUrl, HttpMethod.Get);
|
|
|
|
|
request.AddHeader("Accept", "application/vnd.github.v3+json");
|
|
|
|
|
request.AddHeader("User-Agent", "Ombi");
|
|
|
|
|
return await _api.Request<List<CakeThemes>>(request);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|