master
exsersewo 6 years ago
parent 30606f9f0c
commit 047466ee0c
  1. 15
      SysEx.Net/Client.cs
  2. 7
      SysEx.Net/SysEx.Net.csproj

@ -69,19 +69,16 @@ namespace SysEx.Net
return items[random.Next(0, items.Count)];
}
public async Task<WeebGif> GetWeebActionGifAsync(GifType type)
public async Task<string> GetWeebActionGifAsync(GifType type)
{
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/get/actions/type/" + type + ".json"));
var items = JsonConvert.DeserializeObject<IReadOnlyList<WeebGif>>(resp);
return items[random.Next(0, items.Count)];
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/actions/?action=" + type.ToString().ToLowerInvariant()));
return resp;
}
public async Task<WeebGif> GetWeebReactionGifAsync()
public async Task<string> GetWeebReactionGifAsync()
{
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/get/reactions.json"));
var items = JsonConvert.DeserializeObject<List<WeebGif>>(resp);
if (items == null) return null;
return items[random.Next(0, items.Count)];
var resp = await WebRequest.ReturnStringAsync(new Uri("https://api.systemexit.co.uk/reactions/"));
return resp;
}
public async Task<string> GetLewdKitsuneAsync()

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Authors>exsersewo</Authors>
<Company />
<PackageProjectUrl>https://github.com/exsersewo/SysEx.Net</PackageProjectUrl>
@ -11,6 +11,11 @@
<SignAssembly>false</SignAssembly>
<Description>A .Net Wrapper for utilties hosted at: https://api.systemexit.co.uk/ &amp; https://kitsu.systemexit.co.uk/</Description>
<Copyright>exsersewo</Copyright>
<PackageReleaseNotes>Initial Release</PackageReleaseNotes>
<NeutralLanguage>en-GB</NeutralLanguage>
<RepositoryType>Library</RepositoryType>
<PackageLicenseUrl>https://github.com/exsersewo/SysEx.Net/blob/master/LICENSE</PackageLicenseUrl>
<Version>1.0.15</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

Loading…
Cancel
Save