-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from lucassklp/develop
Version 0.9.7
- Loading branch information
Showing
44 changed files
with
625 additions
and
571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Models; | ||
using Rx.Http; | ||
using Rx.Http.Interceptors; | ||
using Rx.Http.Requests; | ||
using System; | ||
|
||
namespace Samples.Consumers | ||
{ | ||
public class TheMovieDatabaseConsumer : RxConsumer | ||
{ | ||
public TheMovieDatabaseConsumer(IConsumerConfiguration<TheMovieDatabaseConsumer> config) : base(config) | ||
{ | ||
config.AddInterceptors(new TheMovieDatabaseInterceptor()); | ||
} | ||
|
||
public IObservable<Result> ListMovies() => Get<Result>("movie/popular"); | ||
} | ||
|
||
public class TheMovieDatabaseInterceptor : RxInterceptor | ||
{ | ||
public void Intercept(RxHttpRequest request) | ||
{ | ||
request.QueryStrings.Add("api_key", "key"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Rx.Http\Rx.Http.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Models | ||
{ | ||
public class Movie | ||
{ | ||
public string post_path { get; set; } | ||
public bool adult { get; set; } | ||
public string overview { get; set; } | ||
public string release_date { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Models | ||
{ | ||
public class Identifiable | ||
{ | ||
public int Id { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace Models.Postman | ||
{ | ||
public class PostmanEchoResponse | ||
{ | ||
[JsonProperty("args")] | ||
public Dictionary<string, string> Args { get; set; } | ||
|
||
[JsonProperty("headers")] | ||
public Dictionary<string, string> Headers { get; set; } | ||
|
||
[JsonProperty("url")] | ||
public string Url { get; set; } | ||
|
||
[JsonProperty("files")] | ||
public Dictionary<string, string> Files { get; set; } | ||
|
||
[JsonProperty("data")] | ||
public Dictionary<string, string> Data { get; set; } | ||
|
||
[JsonProperty("json")] | ||
public Dictionary<string, string> Json { get; set; } | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Models | ||
{ | ||
public class Result | ||
{ | ||
public int page { get; set; } | ||
|
||
public List<Movie> results { get; set; } | ||
|
||
public int total_result { get; set; } | ||
public int total_pages { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Models | ||
{ | ||
public class Todo | ||
{ | ||
public int userId { get; set; } | ||
public int id { get; set; } | ||
public string title { get; set; } | ||
public bool completed { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.