oops, i should double check before commit and publish
This commit is contained in:
@@ -15,28 +15,28 @@ namespace SysEx.Net
|
|||||||
random = new Random();
|
random = new Random();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> v1LlamaAsync() =>
|
public async Task<string> GetLlamaAsync() =>
|
||||||
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/llama.json"));
|
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/llama.json"));
|
||||||
|
|
||||||
public async Task<string> v1SealAsync() =>
|
public async Task<string> GetSealAsync() =>
|
||||||
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/seal.json"));
|
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/seal.json"));
|
||||||
|
|
||||||
public async Task<string> v1DuckAsync() =>
|
public async Task<string> GetDuckAsync() =>
|
||||||
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/duck.json"));
|
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/duck.json"));
|
||||||
|
|
||||||
public async Task<string> v1SquirrelAsync() =>
|
public async Task<string> GetSquirrelAsync() =>
|
||||||
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/squirrel.json"));
|
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/squirrel.json"));
|
||||||
|
|
||||||
public async Task<string> v1LizardAsync() =>
|
public async Task<string> GetLizardAsync() =>
|
||||||
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/lizard.json"));
|
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/lizard.json"));
|
||||||
|
|
||||||
public async Task<string> v1MorphAsync() =>
|
public async Task<string> GetMorphAsync() =>
|
||||||
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/morphs.json"));
|
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/morphs.json"));
|
||||||
|
|
||||||
public async Task<string> v1SnakeAsync() =>
|
public async Task<string> GetSnakeAsync() =>
|
||||||
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/snake.json"));
|
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/snake.json"));
|
||||||
|
|
||||||
async Task<string> v1AnimalAsync(Uri url)
|
async Task<string> GetAnimalAsync(Uri url)
|
||||||
{
|
{
|
||||||
var resp = await WebRequest.ReturnStringAsync(url);
|
var resp = await WebRequest.ReturnStringAsync(url);
|
||||||
var items = JsonConvert.DeserializeObject<List<Animal>>(resp);
|
var items = JsonConvert.DeserializeObject<List<Animal>>(resp);
|
||||||
@@ -45,7 +45,7 @@ namespace SysEx.Net
|
|||||||
return animal;
|
return animal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> v1RoastAsync()
|
public async Task<string> GetRoastAsync()
|
||||||
{
|
{
|
||||||
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/v1/roasts.json"));
|
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/v1/roasts.json"));
|
||||||
var items = JsonConvert.DeserializeObject<List<Roasts>>(resp);
|
var items = JsonConvert.DeserializeObject<List<Roasts>>(resp);
|
||||||
@@ -53,7 +53,7 @@ namespace SysEx.Net
|
|||||||
return items[random.Next(0, items.Count)].Roast;
|
return items[random.Next(0, items.Count)].Roast;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Joke> v1DadJokeAsync()
|
public async Task<Joke> GetDadJokeAsync()
|
||||||
{
|
{
|
||||||
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/v1/dadjokes.json"));
|
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/v1/dadjokes.json"));
|
||||||
var items = JsonConvert.DeserializeObject<List<Joke>>(resp);
|
var items = JsonConvert.DeserializeObject<List<Joke>>(resp);
|
||||||
@@ -61,7 +61,7 @@ namespace SysEx.Net
|
|||||||
return items[random.Next(0, items.Count)];
|
return items[random.Next(0, items.Count)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Joke> v1PickupLineAsync()
|
public async Task<Joke> GetPickupLineAsync()
|
||||||
{
|
{
|
||||||
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/v1/pickuplines.json"));
|
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/v1/pickuplines.json"));
|
||||||
var items = JsonConvert.DeserializeObject<List<Joke>>(resp);
|
var items = JsonConvert.DeserializeObject<List<Joke>>(resp);
|
||||||
@@ -69,19 +69,19 @@ namespace SysEx.Net
|
|||||||
return items[random.Next(0, items.Count)];
|
return items[random.Next(0, items.Count)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> v1WeebActionGifAsync(GifType type)
|
public async Task<string> GetWeebActionGifAsync(GifType type)
|
||||||
{
|
{
|
||||||
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/actions/?action=" + type.ToString().ToLowerInvariant()));
|
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/actions/?action=" + type.ToString().ToLowerInvariant()));
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> v1WeebReactionGifAsync()
|
public async Task<string> GetWeebReactionGifAsync()
|
||||||
{
|
{
|
||||||
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/reactions/"));
|
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/reactions/"));
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> v1LewdKitsuneAsync()
|
public async Task<string> GetLewdKitsuneAsync()
|
||||||
{
|
{
|
||||||
var rawresp = await WebRequest.ReturnStringAsync(new Uri("https://kitsu.systemexit.co.uk/lewd"));
|
var rawresp = await WebRequest.ReturnStringAsync(new Uri("https://kitsu.systemexit.co.uk/lewd"));
|
||||||
dynamic item = JObject.Parse(rawresp);
|
dynamic item = JObject.Parse(rawresp);
|
||||||
@@ -89,7 +89,7 @@ namespace SysEx.Net
|
|||||||
if (img == null) return null;
|
if (img == null) return null;
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
public async Task<string> v1KitsuneAsync()
|
public async Task<string> GetKitsuneAsync()
|
||||||
{
|
{
|
||||||
var rawresp = await WebRequest.ReturnStringAsync(new Uri("https://kitsu.systemexit.co.uk/kitsune"));
|
var rawresp = await WebRequest.ReturnStringAsync(new Uri("https://kitsu.systemexit.co.uk/kitsune"));
|
||||||
dynamic item = JObject.Parse(rawresp);
|
dynamic item = JObject.Parse(rawresp);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<NeutralLanguage>en-GB</NeutralLanguage>
|
<NeutralLanguage>en-GB</NeutralLanguage>
|
||||||
<RepositoryType>Library</RepositoryType>
|
<RepositoryType>Library</RepositoryType>
|
||||||
<PackageLicenseUrl>https://github.com/exsersewo/SysEx.Net/blob/master/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/exsersewo/SysEx.Net/blob/master/LICENSE</PackageLicenseUrl>
|
||||||
<Version>1.0.2</Version>
|
<Version>1.0.3</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
Reference in New Issue
Block a user