Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/githubocto/flat-demo-nasa-photo-of-the-day
A Flat Data GitHub Action demo repo
https://github.com/githubocto/flat-demo-nasa-photo-of-the-day
demo flat flat-data spaceship
Last synced: 1 day ago
JSON representation
A Flat Data GitHub Action demo repo
- Host: GitHub
- URL: https://github.com/githubocto/flat-demo-nasa-photo-of-the-day
- Owner: githubocto
- License: mit
- Created: 2021-04-06T18:17:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-01T00:12:25.000Z (14 days ago)
- Last Synced: 2024-11-13T00:04:42.988Z (2 days ago)
- Topics: demo, flat, flat-data, spaceship
- Language: TypeScript
- Homepage: https://octo.github.com/projects/flat-data
- Size: 95.5 MB
- Stars: 18
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flat Data Demo: NASA Image of the Day
This demo is part of a larger Flat Data project created by [GitHub OCTO](https://octo.github.com/). Read more about the project [here](https://octo.github.com/projects/flat-data).
## What this demo does
This repository uses a [Flat Data Action](https://github.com/githubocto/flat) to fetch a JSON file with information about [NASA's image of the day](https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY) every day at 8 am UTC. Using a postprocessing script, Flat grabs the image URL within the JSON data and downloads the image as well.
Inside `.github/workflows/flat.yaml`:
```yaml
- name: Fetch data
uses: githubocto/flat@v3
with:
http_url: https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY # The data to fetch every day
downloaded_filename: data.json # The http_url gets saved and renamed in our repository as data.json
postprocess: postprocess.ts # A postprocessing javascript or typescript file written in Deno
```## Postprocessing
Refer to the [Flat postprocessing library](https://github.com/githubocto/flat-postprocessing) for more helper functions and examples for writing postprocessing scripts.
## License
[MIT](LICENSE)