oops, i should double check before commit and publish

master
exsersewo 6 years ago
parent 0e69535bff
commit e3d6cbba3f
  1. 44
      SysEx.Net/Client.cs
  2. 2
      SysEx.Net/SysEx.Net.csproj

@ -15,28 +15,28 @@ namespace SysEx.Net
random = new Random();
}
public async Task<string> v1LlamaAsync() =>
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/llama.json"));
public async Task<string> GetLlamaAsync() =>
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/llama.json"));
public async Task<string> v1SealAsync() =>
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/seal.json"));
public async Task<string> GetSealAsync() =>
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/seal.json"));
public async Task<string> v1DuckAsync() =>
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/duck.json"));
public async Task<string> GetDuckAsync() =>
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/duck.json"));
public async Task<string> v1SquirrelAsync() =>
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/squirrel.json"));
public async Task<string> GetSquirrelAsync() =>
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/squirrel.json"));
public async Task<string> v1LizardAsync() =>
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/lizard.json"));
public async Task<string> GetLizardAsync() =>
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/lizard.json"));
public async Task<string> v1MorphAsync() =>
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/morphs.json"));
public async Task<string> GetMorphAsync() =>
await GetAnimalAsync(new Uri("https://api.systemexit.co.uk/v1/morphs.json"));
public async Task<string> v1SnakeAsync() =>
await v1AnimalAsync(new Uri("https://api.systemexit.co.uk/v1/snake.json"));
public async Task<string> GetSnakeAsync() =>
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 items = JsonConvert.DeserializeObject<List<Animal>>(resp);
@ -45,7 +45,7 @@ namespace SysEx.Net
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 items = JsonConvert.DeserializeObject<List<Roasts>>(resp);
@ -53,7 +53,7 @@ namespace SysEx.Net
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 items = JsonConvert.DeserializeObject<List<Joke>>(resp);
@ -61,7 +61,7 @@ namespace SysEx.Net
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 items = JsonConvert.DeserializeObject<List<Joke>>(resp);
@ -69,19 +69,19 @@ namespace SysEx.Net
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()));
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/"));
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"));
dynamic item = JObject.Parse(rawresp);
@ -89,7 +89,7 @@ namespace SysEx.Net
if (img == null) return null;
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"));
dynamic item = JObject.Parse(rawresp);

@ -15,7 +15,7 @@
<NeutralLanguage>en-GB</NeutralLanguage>
<RepositoryType>Library</RepositoryType>
<PackageLicenseUrl>https://github.com/exsersewo/SysEx.Net/blob/master/LICENSE</PackageLicenseUrl>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

Loading…
Cancel
Save