Update tests and fix errors with Endpoints being null due to api update

master
exsersewo 6 years ago
parent 7f1ec8264d
commit 5fb9634519
  1. 2
      SysEx.Net.Tests/Program.cs
  2. 6
      SysEx.Net/Models/MemeEndpoints.cs
  3. 4
      SysEx.Net/Models/MemeResponse.cs
  4. 2
      SysEx.Net/SysEx.Net.csproj

@ -15,7 +15,7 @@ namespace SysEx.Net.Tests
{
var client = new SysExClient();
var resp = await client.GetMemeImageAsync("22million", "https://cdn.discordapp.com/avatars/270047199184945152/e6a23a1c72703edb5e178411bba9190c.png");
var resp = await client.GetMemeImageAsync();
if(resp is Stream)
{

@ -1,8 +1,12 @@
namespace SysEx.Net.Models
using Newtonsoft.Json;
namespace SysEx.Net.Models
{
public struct MemeEndpoints
{
[JsonProperty("Name")]
public string Name;
[JsonProperty("RequiredSources")]
public int RequiredSources;
}
}

@ -5,10 +5,12 @@ namespace SysEx.Net.Models
{
public struct MemeResponse
{
[JsonProperty("Successful")]
public bool Successful;
[JsonProperty("example")]
public string Example;
[JsonProperty(PropertyName = "availabletemplates")]
[JsonProperty("available-templates")]
public List<MemeEndpoints> Endpoints;
}
}

@ -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.6</Version>
<Version>1.0.7</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

Loading…
Cancel
Save