Oddity
|
Represents an core of the library. Use it to retrieve data from the unofficial SpaceX API. More...
Public Member Functions | |
OddityCore (bool cacheEnabled=true, bool statisticsEnabled=true) | |
Initializes a new instance of the OddityCore class. More... | |
void | Dispose () |
Public Attributes | |
string | UserAgent => $"{LibraryConfiguration.LibraryName}/{Version} ({LibraryConfiguration.GitHubLink})" |
Gets the user agent used when making requests to API. More... | |
string | Version |
Gets the library version used in user agent when making requests to API. More... | |
Properties | |
bool | CacheEnabled [get, set] |
Gets or sets the flag indicating if the cache is enabled. More... | |
bool | StatisticsEnabled [get, set] |
Gets or sets the flag indicating if the statistics are enabled. More... | |
Statistics | Statistics [get] |
Gets the container with statistics (will be updated only if StatisticsEnabled is set to true). More... | |
CapsulesEndpoint< CapsuleInfo > | CapsulesEndpoint [get] |
Gets the entry point of the /capsules endpoint. More... | |
CompanyEndpoint< CompanyInfo > | CompanyEndpoint [get] |
Gets the entry point of the /company endpoint. More... | |
CoresEndpoint< CoreInfo > | CoresEndpoint [get] |
Gets the entry point of the /cores endpoint. More... | |
CrewEndpoint< CrewInfo > | CrewEndpoint [get] |
Gets the entry point of the /crew endpoint. More... | |
DragonsEndpoint< DragonInfo > | DragonsEndpoint [get] |
Gets the entry point of the /dragons endpoint. More... | |
LandpadsEndpoint< LandpadInfo > | LandpadsEndpoint [get] |
Gets the entry point of the /landpads endpoint. More... | |
LaunchesEndpoint< LaunchInfo > | LaunchesEndpoint [get] |
Gets the entry point of the /launches endpoint. More... | |
LaunchpadsEndpoint< LaunchpadInfo > | LaunchpadsEndpoint [get] |
Gets the entry point of the /launchpads endpoint. More... | |
PayloadsEndpoint< PayloadInfo > | PayloadsEndpoint [get] |
Gets the entry point of the /payloads endpoint. More... | |
RoadsterEndpoint< RoadsterInfo > | RoadsterEndpoint [get] |
Gets the entry point of the /roadster endpoint. More... | |
RocketsEndpoint< RocketInfo > | RocketsEndpoint [get] |
Gets the entry point of the /rockets endpoint. More... | |
ShipsEndpoint< ShipInfo > | ShipsEndpoint [get] |
Gets the entry point of the /ships endpoint. More... | |
StarlinkEndpoint< StarlinkInfo > | StarlinkEndpoint [get] |
Gets the entry point of the /starlink endpoint. More... | |
TimeSpan | Timeout [get, set] |
Gets or sets the HTTP timeout when making requests to API. More... | |
Events | |
EventHandler< ErrorEventArgs > | OnDeserializationError |
Event triggered when an error occurred during JSON deserialization. More... | |
EventHandler< RequestSendEventArgs > | OnRequestSend |
Event triggered when a request is just before send to the server. More... | |
EventHandler< ResponseReceiveEventArgs > | OnResponseReceive |
Event triggered when a response has been received. More... | |
Represents an core of the library. Use it to retrieve data from the unofficial SpaceX API.
Oddity.OddityCore.OddityCore | ( | bool | cacheEnabled = true , |
bool | statisticsEnabled = true |
||
) |
Initializes a new instance of the OddityCore class.
cacheEnabled | Flag indicating if the cache should be enabled. |
statisticsEnabled | Flag indicating if the statistics should be enabled. |
void Oddity.OddityCore.Dispose | ( | ) |
string Oddity.OddityCore.UserAgent => $"{LibraryConfiguration.LibraryName}/{Version} ({LibraryConfiguration.GitHubLink})" |
Gets the user agent used when making requests to API.
string Oddity.OddityCore.Version |
Gets the library version used in user agent when making requests to API.
|
getset |
Gets or sets the flag indicating if the cache is enabled.
|
get |
Gets the entry point of the /capsules endpoint.
|
get |
Gets the entry point of the /company endpoint.
|
get |
Gets the entry point of the /cores endpoint.
|
get |
Gets the entry point of the /crew endpoint.
|
get |
Gets the entry point of the /dragons endpoint.
|
get |
Gets the entry point of the /landpads endpoint.
|
get |
Gets the entry point of the /launches endpoint.
|
get |
Gets the entry point of the /launchpads endpoint.
|
get |
Gets the entry point of the /payloads endpoint.
|
get |
Gets the entry point of the /roadster endpoint.
|
get |
Gets the entry point of the /rockets endpoint.
|
get |
Gets the entry point of the /ships endpoint.
|
get |
Gets the entry point of the /starlink endpoint.
|
get |
Gets the container with statistics (will be updated only if StatisticsEnabled is set to true).
|
getset |
Gets or sets the flag indicating if the statistics are enabled.
|
getset |
Gets or sets the HTTP timeout when making requests to API.
EventHandler<ErrorEventArgs> Oddity.OddityCore.OnDeserializationError |
Event triggered when an error occurred during JSON deserialization.
EventHandler<RequestSendEventArgs> Oddity.OddityCore.OnRequestSend |
Event triggered when a request is just before send to the server.
EventHandler<ResponseReceiveEventArgs> Oddity.OddityCore.OnResponseReceive |
Event triggered when a response has been received.