New: RestSharp to 106.6.10

Co-Authored-By: taloth <taloth@users.noreply.github.com>
pull/6/head
Qstick 5 years ago committed by ta264
parent a5d4d1c6a1
commit cbff5e1c5a

@ -10,7 +10,7 @@
<PackageReference Include="NLog" Version="4.5.4" /> <PackageReference Include="NLog" Version="4.5.4" />
<PackageReference Include="OAuth" Version="1.0.3" /> <PackageReference Include="OAuth" Version="1.0.3" />
<PackageReference Include="Prowlin" Version="0.9.4456.26422" /> <PackageReference Include="Prowlin" Version="0.9.4456.26422" />
<PackageReference Include="RestSharp" Version="105.2.3" /> <PackageReference Include="RestSharp" Version="106.6.10" />
<PackageReference Include="System.IO.Abstractions" Version="4.0.11" /> <PackageReference Include="System.IO.Abstractions" Version="4.0.11" />
<PackageReference Include="TagLibSharp-Lidarr" Version="2.2.0.19" /> <PackageReference Include="TagLibSharp-Lidarr" Version="2.2.0.19" />
<PackageReference Include="xmlrpcnet" Version="2.5.0" /> <PackageReference Include="xmlrpcnet" Version="2.5.0" />

@ -21,7 +21,7 @@ namespace NzbDrone.Integration.Test.ApiTests
body.Add("publishDate", DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ssZ", CultureInfo.InvariantCulture)); body.Add("publishDate", DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ssZ", CultureInfo.InvariantCulture));
var request = ReleasePush.BuildRequest(); var request = ReleasePush.BuildRequest();
request.AddBody(body); request.AddJsonBody(body);
var result = ReleasePush.Post<ReleaseResource>(request, HttpStatusCode.OK); var result = ReleasePush.Post<ReleaseResource>(request, HttpStatusCode.OK);
result.Should().NotBeNull(); result.Should().NotBeNull();

@ -14,15 +14,15 @@ namespace NzbDrone.Integration.Test.Client
public List<ArtistResource> Lookup(string term) public List<ArtistResource> Lookup(string term)
{ {
var request = BuildRequest("lookup?term={term}"); var request = BuildRequest("lookup");
request.AddUrlSegment("term", term); request.AddQueryParameter("term", term);
return Get<List<ArtistResource>>(request); return Get<List<ArtistResource>>(request);
} }
public List<ArtistResource> Editor(ArtistEditorResource artist) public List<ArtistResource> Editor(ArtistEditorResource artist)
{ {
var request = BuildRequest("editor"); var request = BuildRequest("editor");
request.AddBody(artist); request.AddJsonBody(artist);
return Put<List<ArtistResource>>(request); return Put<List<ArtistResource>>(request);
} }

@ -111,14 +111,14 @@ namespace NzbDrone.Integration.Test.Client
public TResource Post(TResource body, HttpStatusCode statusCode = HttpStatusCode.Created) public TResource Post(TResource body, HttpStatusCode statusCode = HttpStatusCode.Created)
{ {
var request = BuildRequest(); var request = BuildRequest();
request.AddBody(body); request.AddJsonBody(body);
return Post<TResource>(request, statusCode); return Post<TResource>(request, statusCode);
} }
public TResource Put(TResource body, HttpStatusCode statusCode = HttpStatusCode.Accepted) public TResource Put(TResource body, HttpStatusCode statusCode = HttpStatusCode.Accepted)
{ {
var request = BuildRequest(); var request = BuildRequest();
request.AddBody(body); request.AddJsonBody(body);
return Put<TResource>(request, statusCode); return Put<TResource>(request, statusCode);
} }
@ -149,14 +149,14 @@ namespace NzbDrone.Integration.Test.Client
public object InvalidPost(TResource body, HttpStatusCode statusCode = HttpStatusCode.BadRequest) public object InvalidPost(TResource body, HttpStatusCode statusCode = HttpStatusCode.BadRequest)
{ {
var request = BuildRequest(); var request = BuildRequest();
request.AddBody(body); request.AddJsonBody(body);
return Post<object>(request, statusCode); return Post<object>(request, statusCode);
} }
public object InvalidPut(TResource body, HttpStatusCode statusCode = HttpStatusCode.BadRequest) public object InvalidPut(TResource body, HttpStatusCode statusCode = HttpStatusCode.BadRequest)
{ {
var request = BuildRequest(); var request = BuildRequest();
request.AddBody(body); request.AddJsonBody(body);
return Put<object>(request, statusCode); return Put<object>(request, statusCode);
} }

@ -40,7 +40,7 @@ namespace NzbDrone.Integration.Test.Client
public SimpleCommandResource PostAndWait<T>(T command) where T : Command, new() public SimpleCommandResource PostAndWait<T>(T command) where T : Command, new()
{ {
var request = BuildRequest(); var request = BuildRequest();
request.AddBody(command); request.AddJsonBody(command);
var result = Post<SimpleCommandResource>(request); var result = Post<SimpleCommandResource>(request);
result.Id.Should().NotBe(0); result.Id.Should().NotBe(0);

@ -10,7 +10,7 @@
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="NLog" Version="4.5.4" /> <PackageReference Include="NLog" Version="4.5.4" />
<PackageReference Include="NUnit" Version="3.11.0" /> <PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="RestSharp" Version="105.2.3" /> <PackageReference Include="RestSharp" Version="106.6.10" />
<PackageReference Include="System.IO.Abstractions" Version="4.0.11" /> <PackageReference Include="System.IO.Abstractions" Version="4.0.11" />
<PackageReference Include="Unity" Version="4.0.1" /> <PackageReference Include="Unity" Version="4.0.1" />
</ItemGroup> </ItemGroup>

Loading…
Cancel
Save