apod-api icon indicating copy to clipboard operation
apod-api copied to clipboard

Production Use

Open nicholasviscomi opened this issue 4 years ago • 8 comments

Is there any way I can pay for unlimited/really high usage rates? I have a cool iOS app and want it to be fully funcitonal

nicholasviscomi avatar Oct 20 '20 02:10 nicholasviscomi

You can generate multiple API keys, one for each user. This will reduce the server load too.

WARNING: I am not the staff here, refer to the staff's guidelines before making any decisions

akionsight avatar Oct 20 '20 05:10 akionsight

@akionsight Would you be able to tell me how I can generate a key for each user?

nicholasviscomi avatar Oct 20 '20 10:10 nicholasviscomi

I wouldn't do this without permission from the staff but you can do that with something like a puppeteer or selenium script running on the server-side that generates API keys by accessing the nasa open API's website. the generated API key can be sent to the app for use.

Warning: Do not do this without permission from the staff.

akionsight avatar Oct 20 '20 10:10 akionsight

or generate one key, and use that key once a day to refresh the content on your server and send back data from your server instead of each user accessing it from the apod-api server

akionsight avatar Oct 20 '20 11:10 akionsight

You can also host the API backend yourself. All it does is scrape apod.nasa.gov anyway. In fact, the README seems to recommend doing this when you need reliable access to APOD data.

nwunderly avatar Oct 21 '20 03:10 nwunderly

I won't recommend scraping because the scrapers might get blocked, hence generating a fairly large failure for the app

akionsight avatar Oct 21 '20 06:10 akionsight

It's possible, but considering both the fact that the official APOD API is in fact scraping the APOD site, and that the readme recommends hosting your own if you need "an extremely reliable version of this API", I suspect the site isn't too harsh against scrapers.

nwunderly avatar Oct 21 '20 16:10 nwunderly

Hi @nicholasviscomi , you can follow steps provided by Pawel and use deploy the modified API work to your server/heroku and use it. https://github.com/PawelPleskaczynski/apod_api

hemangshah avatar Oct 25 '20 06:10 hemangshah