Oddity
Oddity.OddityCore Class Reference

Represents an core of the library. Use it to retrieve data from the unofficial SpaceX API. More...

Inheritance diagram for Oddity.OddityCore:

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< CapsuleInfoCapsulesEndpoint [get]
 Gets the entry point of the /capsules endpoint. More...
 
CompanyEndpoint< CompanyInfoCompanyEndpoint [get]
 Gets the entry point of the /company endpoint. More...
 
CoresEndpoint< CoreInfoCoresEndpoint [get]
 Gets the entry point of the /cores endpoint. More...
 
CrewEndpoint< CrewInfoCrewEndpoint [get]
 Gets the entry point of the /crew endpoint. More...
 
DragonsEndpoint< DragonInfoDragonsEndpoint [get]
 Gets the entry point of the /dragons endpoint. More...
 
LandpadsEndpoint< LandpadInfoLandpadsEndpoint [get]
 Gets the entry point of the /landpads endpoint. More...
 
LaunchesEndpoint< LaunchInfoLaunchesEndpoint [get]
 Gets the entry point of the /launches endpoint. More...
 
LaunchpadsEndpoint< LaunchpadInfoLaunchpadsEndpoint [get]
 Gets the entry point of the /launchpads endpoint. More...
 
PayloadsEndpoint< PayloadInfoPayloadsEndpoint [get]
 Gets the entry point of the /payloads endpoint. More...
 
RoadsterEndpoint< RoadsterInfoRoadsterEndpoint [get]
 Gets the entry point of the /roadster endpoint. More...
 
RocketsEndpoint< RocketInfoRocketsEndpoint [get]
 Gets the entry point of the /rockets endpoint. More...
 
ShipsEndpoint< ShipInfoShipsEndpoint [get]
 Gets the entry point of the /ships endpoint. More...
 
StarlinkEndpoint< StarlinkInfoStarlinkEndpoint [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< RequestSendEventArgsOnRequestSend
 Event triggered when a request is just before send to the server. More...
 
EventHandler< ResponseReceiveEventArgsOnResponseReceive
 Event triggered when a response has been received. More...
 

Detailed Description

Represents an core of the library. Use it to retrieve data from the unofficial SpaceX API.

Constructor & Destructor Documentation

Oddity.OddityCore.OddityCore ( bool  cacheEnabled = true,
bool  statisticsEnabled = true 
)

Initializes a new instance of the OddityCore class.

Parameters
cacheEnabledFlag indicating if the cache should be enabled.
statisticsEnabledFlag indicating if the statistics should be enabled.

Member Function Documentation

void Oddity.OddityCore.Dispose ( )

Member Data Documentation

string Oddity.OddityCore.UserAgent => $"{LibraryConfiguration.LibraryName}/{Version} ({LibraryConfiguration.GitHubLink})"

Gets the user agent used when making requests to API.

string Oddity.OddityCore.Version
Initial value:
=> GetType().GetTypeInfo().Assembly
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
.InformationalVersion

Gets the library version used in user agent when making requests to API.

Property Documentation

bool Oddity.OddityCore.CacheEnabled
getset

Gets or sets the flag indicating if the cache is enabled.

CapsulesEndpoint<CapsuleInfo> Oddity.OddityCore.CapsulesEndpoint
get

Gets the entry point of the /capsules endpoint.

CompanyEndpoint<CompanyInfo> Oddity.OddityCore.CompanyEndpoint
get

Gets the entry point of the /company endpoint.

CoresEndpoint<CoreInfo> Oddity.OddityCore.CoresEndpoint
get

Gets the entry point of the /cores endpoint.

CrewEndpoint<CrewInfo> Oddity.OddityCore.CrewEndpoint
get

Gets the entry point of the /crew endpoint.

DragonsEndpoint<DragonInfo> Oddity.OddityCore.DragonsEndpoint
get

Gets the entry point of the /dragons endpoint.

LandpadsEndpoint<LandpadInfo> Oddity.OddityCore.LandpadsEndpoint
get

Gets the entry point of the /landpads endpoint.

LaunchesEndpoint<LaunchInfo> Oddity.OddityCore.LaunchesEndpoint
get

Gets the entry point of the /launches endpoint.

LaunchpadsEndpoint<LaunchpadInfo> Oddity.OddityCore.LaunchpadsEndpoint
get

Gets the entry point of the /launchpads endpoint.

PayloadsEndpoint<PayloadInfo> Oddity.OddityCore.PayloadsEndpoint
get

Gets the entry point of the /payloads endpoint.

RoadsterEndpoint<RoadsterInfo> Oddity.OddityCore.RoadsterEndpoint
get

Gets the entry point of the /roadster endpoint.

RocketsEndpoint<RocketInfo> Oddity.OddityCore.RocketsEndpoint
get

Gets the entry point of the /rockets endpoint.

ShipsEndpoint<ShipInfo> Oddity.OddityCore.ShipsEndpoint
get

Gets the entry point of the /ships endpoint.

StarlinkEndpoint<StarlinkInfo> Oddity.OddityCore.StarlinkEndpoint
get

Gets the entry point of the /starlink endpoint.

Statistics Oddity.OddityCore.Statistics
get

Gets the container with statistics (will be updated only if StatisticsEnabled is set to true).

bool Oddity.OddityCore.StatisticsEnabled
getset

Gets or sets the flag indicating if the statistics are enabled.

TimeSpan Oddity.OddityCore.Timeout
getset

Gets or sets the HTTP timeout when making requests to API.

Event Documentation

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.


The documentation for this class was generated from the following file: