thieleju / statsbot

Discord Bot to gather data from public APIs using node.js and discord.js! Hacktoberfest Event Project
MIT License
22 stars 44 forks source link

Add /apod command using NASA Astronomy Picture of the Day #53

Closed ethapar closed 2 years ago

ethapar commented 2 years ago

Command Name

/apod

Public API Resource

https://github.com/nasa/apod-api

Description

The bot should take query the NASA Astronomy Picture of the Day API to return whatever the current image of the day is, maybe including the short blurb/author credits/etc. Could potentially add extra flags for things like specifying a different day if a user wants to look at other days.

Implementation Details

Code of Conduct

ethapar commented 2 years ago

Hey @thieleju I would love to work on this if you want to assign it to me!

thieleju commented 2 years ago

Great idea! Sure, go ahead!

thieleju commented 2 years ago

Hey, @ethapar. There are about two more weeks to Hacktoberfest. Do you need any help setting up the project? Feel free to ask me :)

thieleju commented 2 years ago

Only a week left for Hacktoberfest, this issue is up for grabs again

hkmekala commented 2 years ago

Please Assign it to me @thieleju.

Serpent03 commented 2 years ago

Hi, can I have a try at it? If I can be assigned this, I have a PR ready to contribute :)

thieleju commented 2 years ago

@Serpent03 Sure, go ahead!

Serpent03 commented 2 years ago

@thieleju Thanks! One question. The APOD uses an API key, so what do you wish for me to do regarding that? Do I email it to you or anything so you can maintain it in your local storage?

thieleju commented 2 years ago

@Serpent03 Oh I did not notice that. Unfortunately only apis without api key are allowed :/ If you want you can do #9 instead :)

Serpent03 commented 2 years ago

@Serpent03 Oh I did not notice that. Unfortunately only apis without api key are allowed :/ If you want you can do #9 instead :)

It shouldn't be a problem, I think. There is a NASA demo API that you can use without generating a personal API key, so is it good if I put that in instead?

thieleju commented 2 years ago

@Serpent03 It has rate limits for 30 requests per hour and 50 requests per day, but I think that should work.

I reviewed your pr #146 and labeled it with the hacktoberfest-accepted label.

Keep contributing ❤️

Serpent03 commented 2 years ago

Thanks!

Serpent03 commented 2 years ago

An idea for the future, maybe. But with limited requests, you could perhaps cache the necessary information into a json file and reference it whenever needed directly