-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb6f979
commit 7cd95be
Showing
7 changed files
with
297 additions
and
2 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# RestEaseDemo | ||
RestEase demo repo | ||
# RestEase demo project | ||
This repo is a simple application to practice [RestEase](https://github.com/canton7/RestEase) project possibilities. | ||
|
||
## How to run | ||
Working in progress... |
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,50 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace Swapi.Models | ||
{ | ||
public class Film | ||
{ | ||
[JsonProperty("characters")] | ||
public Uri[] Characters { get; set; } | ||
|
||
[JsonProperty("created")] | ||
public DateTimeOffset Created { get; set; } | ||
|
||
[JsonProperty("director")] | ||
public string Director { get; set; } | ||
|
||
[JsonProperty("edited")] | ||
public DateTimeOffset Edited { get; set; } | ||
|
||
[JsonProperty("episode_id")] | ||
public long EpisodeId { get; set; } | ||
|
||
[JsonProperty("opening_crawl")] | ||
public string OpeningCrawl { get; set; } | ||
|
||
[JsonProperty("planets")] | ||
public Uri[] Planets { get; set; } | ||
|
||
[JsonProperty("producer")] | ||
public string Producer { get; set; } | ||
|
||
[JsonProperty("release_date")] | ||
public DateTimeOffset ReleaseDate { get; set; } | ||
|
||
[JsonProperty("species")] | ||
public Uri[] Species { get; set; } | ||
|
||
[JsonProperty("starships")] | ||
public Uri[] Starships { get; set; } | ||
|
||
[JsonProperty("title")] | ||
public string Title { get; set; } | ||
|
||
[JsonProperty("url")] | ||
public Uri Url { get; set; } | ||
|
||
[JsonProperty("vehicles")] | ||
public Uri[] Vehicles { 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,59 @@ | ||
using Newtonsoft.Json; | ||
using Swapi.Converters; | ||
using System; | ||
|
||
namespace Swapi.Models | ||
{ | ||
public class People | ||
{ | ||
[JsonProperty("birth_year")] | ||
public string BirthYear { get; set; } | ||
|
||
[JsonProperty("eye_color")] | ||
public string EyeColor { get; set; } | ||
|
||
[JsonProperty("films")] | ||
public Uri[] Films { get; set; } | ||
|
||
[JsonProperty("gender")] | ||
public string Gender { get; set; } | ||
|
||
[JsonProperty("hair_color")] | ||
public string HairColor { get; set; } | ||
|
||
[JsonProperty("height")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long Height { get; set; } | ||
|
||
[JsonProperty("homeworld")] | ||
public Uri Homeworld { get; set; } | ||
|
||
[JsonProperty("mass")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long Mass { get; set; } | ||
|
||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("skin_color")] | ||
public string SkinColor { get; set; } | ||
|
||
[JsonProperty("created")] | ||
public DateTimeOffset Created { get; set; } | ||
|
||
[JsonProperty("edited")] | ||
public DateTimeOffset Edited { get; set; } | ||
|
||
[JsonProperty("species")] | ||
public Uri[] Species { get; set; } | ||
|
||
[JsonProperty("starships")] | ||
public Uri[] Starships { get; set; } | ||
|
||
[JsonProperty("url")] | ||
public Uri Url { get; set; } | ||
|
||
[JsonProperty("vehicles")] | ||
public Uri[] Vehicles { 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,55 @@ | ||
using Newtonsoft.Json; | ||
using Swapi.Converters; | ||
using System; | ||
|
||
namespace Swapi.Models | ||
{ | ||
public class Specie | ||
{ | ||
[JsonProperty("average_height")] | ||
public string AverageHeight { get; set; } | ||
|
||
[JsonProperty("average_lifespan")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long AverageLifespan { get; set; } | ||
|
||
[JsonProperty("classification")] | ||
public string Classification { get; set; } | ||
|
||
[JsonProperty("created")] | ||
public DateTimeOffset Created { get; set; } | ||
|
||
[JsonProperty("designation")] | ||
public string Designation { get; set; } | ||
|
||
[JsonProperty("edited")] | ||
public DateTimeOffset Edited { get; set; } | ||
|
||
[JsonProperty("eye_colors")] | ||
public string EyeColors { get; set; } | ||
|
||
[JsonProperty("hair_colors")] | ||
public string HairColors { get; set; } | ||
|
||
[JsonProperty("homeworld")] | ||
public Uri Homeworld { get; set; } | ||
|
||
[JsonProperty("language")] | ||
public string Language { get; set; } | ||
|
||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("people")] | ||
public Uri[] People { get; set; } | ||
|
||
[JsonProperty("films")] | ||
public Uri[] Films { get; set; } | ||
|
||
[JsonProperty("skin_colors")] | ||
public string SkinColors { get; set; } | ||
|
||
[JsonProperty("url")] | ||
public Uri Url { 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,66 @@ | ||
using Newtonsoft.Json; | ||
using Swapi.Converters; | ||
using System; | ||
|
||
namespace Swapi.Models | ||
{ | ||
public class Starship | ||
{ | ||
[JsonProperty("MGLT")] | ||
public string Mglt { get; set; } | ||
|
||
[JsonProperty("cargo_capacity")] | ||
public string CargoCapacity { get; set; } | ||
|
||
[JsonProperty("consumables")] | ||
public string Consumables { get; set; } | ||
|
||
[JsonProperty("cost_in_credits")] | ||
public string CostInCredits { get; set; } | ||
|
||
[JsonProperty("created")] | ||
public DateTimeOffset Created { get; set; } | ||
|
||
[JsonProperty("crew")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long Crew { get; set; } | ||
|
||
[JsonProperty("edited")] | ||
public DateTimeOffset Edited { get; set; } | ||
|
||
[JsonProperty("hyperdrive_rating")] | ||
public string HyperdriveRating { get; set; } | ||
|
||
[JsonProperty("length")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long Length { get; set; } | ||
|
||
[JsonProperty("manufacturer")] | ||
public string Manufacturer { get; set; } | ||
|
||
[JsonProperty("max_atmosphering_speed")] | ||
public string MaxAtmospheringSpeed { get; set; } | ||
|
||
[JsonProperty("model")] | ||
public string Model { get; set; } | ||
|
||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("passengers")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long Passengers { get; set; } | ||
|
||
[JsonProperty("films")] | ||
public Uri[] Films { get; set; } | ||
|
||
[JsonProperty("pilots")] | ||
public object[] Pilots { get; set; } | ||
|
||
[JsonProperty("starship_class")] | ||
public string StarshipClass { get; set; } | ||
|
||
[JsonProperty("url")] | ||
public Uri Url { 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,62 @@ | ||
using Newtonsoft.Json; | ||
using Swapi.Converters; | ||
using System; | ||
|
||
namespace Swapi.Models | ||
{ | ||
public class Vehicle | ||
{ | ||
[JsonProperty("cargo_capacity")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long CargoCapacity { get; set; } | ||
|
||
[JsonProperty("consumables")] | ||
public string Consumables { get; set; } | ||
|
||
[JsonProperty("cost_in_credits")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long CostInCredits { get; set; } | ||
|
||
[JsonProperty("created")] | ||
public DateTimeOffset Created { get; set; } | ||
|
||
[JsonProperty("crew")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long Crew { get; set; } | ||
|
||
[JsonProperty("edited")] | ||
public DateTimeOffset Edited { get; set; } | ||
|
||
[JsonProperty("length")] | ||
public string Length { get; set; } | ||
|
||
[JsonProperty("manufacturer")] | ||
public string Manufacturer { get; set; } | ||
|
||
[JsonProperty("max_atmosphering_speed")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long MaxAtmospheringSpeed { get; set; } | ||
|
||
[JsonProperty("model")] | ||
public string Model { get; set; } | ||
|
||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("passengers")] | ||
[JsonConverter(typeof(ParseStringConverter))] | ||
public long Passengers { get; set; } | ||
|
||
[JsonProperty("pilots")] | ||
public object[] Pilots { get; set; } | ||
|
||
[JsonProperty("films")] | ||
public Uri[] Films { get; set; } | ||
|
||
[JsonProperty("url")] | ||
public Uri Url { get; set; } | ||
|
||
[JsonProperty("vehicle_class")] | ||
public string VehicleClass { get; set; } | ||
} | ||
} |