Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/developerx-official/nasa_apod_api
A wrapper for NASA's APOD API
https://github.com/developerx-official/nasa_apod_api
csharp nasa-api nasa-apod nuget nuget-package
Last synced: 3 months ago
JSON representation
A wrapper for NASA's APOD API
- Host: GitHub
- URL: https://github.com/developerx-official/nasa_apod_api
- Owner: developerx-official
- License: mit
- Created: 2022-05-15T00:26:02.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-18T17:16:33.000Z (11 months ago)
- Last Synced: 2024-11-08T02:10:31.925Z (3 months ago)
- Topics: csharp, nasa-api, nasa-apod, nuget, nuget-package
- Language: C#
- Homepage: https://www.nuget.org/packages/NASA_APOD/
- Size: 40 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![issues](https://img.shields.io/github/issues/developerx-official/NASA_APOD_API) ![forks](https://img.shields.io/github/forks/developerx-official/NASA_APOD_API) ![stars](https://img.shields.io/github/stars/developerx-official/NASA_APOD_API) ![license](https://img.shields.io/github/license/developerx-official/NASA_APOD_API) ![codeql-analysis](https://github.com/developerx-official/NASA_APOD_API/actions/workflows/codeql-analysis.yml/badge.svg) ![codeql-analysis](https://img.shields.io/badge/dependabot-enabled-blue)
# NASA_APOD_API
## How to Install
Using nuget, install `NASA_APOD` ([link](https://www.nuget.org/packages/NASA_APOD/))
(`dotnet add package NASA_APOD`)
## How to Use
* Instantiate APOD_CLIENT (such as on app enter)
* Query with `yourClient.Query(your, parameters);`
* Dispose when no longer being used (such as on app exit)## Short Example
```csharp
// In practice try to use one client per application as it can stress socket connections
// This is just showing that it can be disposed (such as with a using statement)
// It also uses the demo key, please don't do this to yourself, getting an actual api key is painless on their website
// https://api.nasa.gov/#signUp
using (APOD_Client client = new APOD_Client("DEMO_KEY"))
{
var result = await client.QueryAsync();
Console.WriteLine($"TITLE: {result[0].title}\n" +
$"URL: {result[0].url}");
}
```