Interface IApodClient
An interface for a client that interfaces with NASA's Astronomy Picture of the Day API.
Namespace: Apod
Assembly: Apod.dll
Syntax
public interface IApodClient
Remarks
See ApodClient for the default implementation.
NASA's Astronomy Picture of the Day API can be found at https://api.nasa.gov#apod.
Methods
| Improve this Doc View SourceFetchApodAsync()
Fetch the Astronomy Picture of the Day for today's date.
Declaration
ValueTask<ApodResponse> FetchApodAsync()
Returns
Type | Description |
---|---|
ValueTask<ApodResponse> | The response. |
FetchApodAsync(DateTime)
Fetch the Astronomy Picture of the Day for a specific date.
Declaration
ValueTask<ApodResponse> FetchApodAsync(DateTime dateTime)
Parameters
Type | Name | Description |
---|---|---|
DateTime | dateTime | The date to request the APOD for. Must be between June 16th 1995 and today's date (inclusive). |
Returns
Type | Description |
---|---|
ValueTask<ApodResponse> | The response. |
FetchApodAsync(DateTime, DateTime)
Fetch all the Astronomy Pictures of the Day between two dates (inclusive).
Declaration
ValueTask<ApodResponse> FetchApodAsync(DateTime startDate, DateTime endDate)
Parameters
Type | Name | Description |
---|---|---|
DateTime | startDate | The start date. Must be between June 16th 1995 and today's date (inclusive). |
DateTime | endDate | The end date. Must be between the |
Returns
Type | Description |
---|---|
ValueTask<ApodResponse> | The response. |
FetchApodAsync(Int32)
Fetch an amount of random Astronomy Pictures of the Day.
Declaration
ValueTask<ApodResponse> FetchApodAsync(int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | count | The amount of APODs to fetch. Must be positive and cannot exceed 100. |
Returns
Type | Description |
---|---|
ValueTask<ApodResponse> | The response. |
GetPermalink(ApodContent)
Get the apod.nasa.gov permalink for an Astronomy Picture of the Day. Example format: https://apod.nasa.gov/apod/apYYMMDD.html.
Declaration
string GetPermalink(ApodContent apodContent)
Parameters
Type | Name | Description |
---|---|---|
ApodContent | apodContent | The Astronomy Picture of the Day to get the permalink for. |
Returns
Type | Description |
---|---|
String | The permalink URL to this APOD. |