|
Oddity
|
Represents an abstract base class for all builders. More...
Public Member Functions | |
| abstract TReturn | Execute () |
| Performs an synchronous request to the API and returns deserialized JSON. More... | |
| abstract bool | Execute (TReturn model) |
| Performs an synchronous request to the API and fills passed model in parameter with deserialized JSON. More... | |
| abstract Task< TReturn > | ExecuteAsync () |
| Performs an asynchronous request to the API and returns deserialized JSON. More... | |
| abstract Task< bool > | ExecuteAsync (TReturn model) |
| Performs an asynchronous request to the API and fills passed model in parameter with deserialized JSON. More... | |
Protected Member Functions | |
| BuilderBase (OddityCore context) | |
| async Task< string > | GetResponseFromEndpoint (string link, string postBody=null) |
| string | SerializeJson (object model) |
| TReturn | DeserializeJson (string content) |
| void | DeserializeJson (string content, TReturn model) |
Protected Attributes | |
| readonly OddityCore | Context |
Represents an abstract base class for all builders.
| TReturn | Type which will be returned after successful API request. |
|
protected |
|
protected |
|
protected |
|
pure virtual |
Performs an synchronous request to the API and returns deserialized JSON.
| ApiUnavailableException | Thrown when SpaceX API is unavailable and can't process any request. |
| ApiBadRequestException | Thrown when SpaceX API received an invalid request which cannot be processed. |
Implemented in Oddity.Builders.SimpleBuilder< TReturn >.
|
pure virtual |
Performs an synchronous request to the API and fills passed model in parameter with deserialized JSON.
| model | The model which will be filled with deserialized JSON. |
| ApiUnavailableException | Thrown when SpaceX API is unavailable and can't process any request. |
| ApiBadRequestException | Thrown when SpaceX API received an invalid request which cannot be processed. |
Implemented in Oddity.Builders.SimpleBuilder< TReturn >.
|
pure virtual |
Performs an asynchronous request to the API and returns deserialized JSON.
| ApiUnavailableException | Thrown when SpaceX API is unavailable and can't process any request. |
| ApiBadRequestException | Thrown when SpaceX API received an invalid request which cannot be processed. |
Implemented in Oddity.Builders.SimpleBuilder< TReturn >.
|
pure virtual |
Performs an asynchronous request to the API and fills passed model in parameter with deserialized JSON.
| model | The model which will be filled with deserialized JSON. |
| ApiUnavailableException | Thrown when SpaceX API is unavailable and can't process any request. |
| ApiBadRequestException | Thrown when SpaceX API received an invalid request which cannot be processed. |
Implemented in Oddity.Builders.SimpleBuilder< TReturn >.
|
protected |
|
protected |
|
protected |