Auroras-live / issues

Issue tracker for Auroras.live (including mobile, web and watch apps)
1 stars 0 forks source link

API v2 #20

Closed Grayda closed 5 years ago

Grayda commented 7 years ago

This issue will be for the discussion of v2 of the API. v2 is still in the planning / early development stages, but feedback is sought

Reasoning:

v1 of the API is good, but is slow, inflexible and lacks many pieces of data other sites have. v2 aims to speed things up with more modular code and making use of PHP and browser tactics.

Ideas / planned features:

These ideas are NOT final, and are in the planning stages. Feedback welcome.

These changes will eventually culminate in v2 of the Auroras.live app, rewritten from the ground up. There's no timeline for either of these yet, but I'd rather it be sooner than later, as there's a need for better aurora hunting data that the current API doesn't easily make available.

Grayda commented 7 years ago

Over a month on, and I think it's time for a status update.

v2 of the API is ongoing. Right now the following data is implemented:

This is all still in development, and will change, expand and shrink as it goes on. No ETA, but I hope to have some documentation written up in the near future.

Photogad commented 6 years ago

By any chance can you provide weather via the Dark Sky API? I've found it to be more accurate than OWM, faster, and it's probably cheaper for you too. The first 1,000 calls per day on dark sky are free and then remaining calls are only 0.001 per call

Grayda commented 6 years ago

I've coded support into v2 as an optional thing, and I'm currently emailing Dark Sky to find out some finer points of their terms and services before making that an enabled feature.

I'm a little hesitant when it comes to paid services, because I had a DDoS at the end of last year that coloured my world map a nice shade of green, and I shudder to think what that would have been like at $0.0001 per call. That's why api.met.no was the data source initially, and then OWM (because of it's 60 calls a minute thing).

So once I hear back from Dark Sky, I'll let you know. Best case scenario, there'll be limits on how often the DS source can be accessed in the API, worst case, you'll need to sign up for your own API key and use that.

Photogad commented 6 years ago

It was just a suggestion, trying to help you out. :) you can manually limit daily calls with day sky too in event if ddos

On Aug 27, 2017 4:33 AM, "David Gray" notifications@github.com wrote:

I've coded support into v2 as an optional thing, and I'm currently emailing Dark Sky to find out some finer points of their terms and services before making that an enabled feature.

I'm a little hesitant when it comes to paid services, because I had a DDoS at the end of last year that coloured my world map a nice shade of green, and I shudder to think what that would have been like at $0.0001 per call. That's why api.met.no was the data source initially, and then OWM (because of it's 60 calls a minute thing).

So once I hear back from Dark Sky, I'll let you know. Best case scenario, there'll be limits on how often the DS source can be accessed in the API, worst case, you'll need to sign up for your own API key and use that.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Auroras-live/issues/issues/20#issuecomment-325184788, or mute the thread https://github.com/notifications/unsubscribe-auth/ARpg5GrkbZBHAiUjo5N7LmGwJKbm2G2hks5scSnQgaJpZM4MxBhG .

Grayda commented 6 years ago

Oh, I completely missed that setting in the dashboard. In which case, it'll be enabled in v2. It'll still be opt-in, as OWM is "close enough" for most people, but you'd just need to add in "provider": "darksky" to the request and it'll use that.

I'll also leave in the "key": "abcd" bit so if a user wants to use their own key, they can.

Grayda commented 6 years ago

Time for another update:

I've been rewriting v2 from scratch. Everything is now separated into modules (code-wise) to make updates and management easier. I'm aiming for a July release, but that's dependent on a whole bunch of factors, but programmatic and personal.

So far the following has been completed:

In progress:

Upcoming:

Future:

I'll provide more information as the API progresses.

Photogad commented 6 years ago

Thank you for the update and all of your hard work! You still need to take my recommendation of charging a monthly subscription for your API.

Question: When you release v2, will v1 still be live? If you can leave v1 live for a few months after v2 is released, that would be great so it's a smooth transition without any interruption.

Photogad commented 6 years ago

also this probably isn't the right place to ask so feel free to delete this but -

have you noticed any issues with getting moonrise and moonset times for certain locations? For some reason I am sometimes getting no moonrise or moonset times (or sometimes just one) from the API. Usually it's the moonset time. It seems to be happening the most in Canada.

What weather service do you use for moonrise and moonset times?

Grayda commented 6 years ago

@photog0411: v1 will remain active for quite a while. There'll be adequate notice before it's deactivated, and will probably only be deactivated if the amount of resources it consumes gets to be too much (though most of the resources in use are from background scripts, and those are being rewritten and migrated to v2 in a way that won't affect users).

Moonrise and moonset come from met.no, but v2 will do local calculations via a fork of the SunCalc library (the moon and sun times can now be obtained without having to get the weather).

As for your issue with no moonrise or moonset times appearing, you might get partial data if the moon doesn't rise and / or set at all on that particular day. If that happens again, check with another site to ensure what met.no is reporting, is correct.

Grayda commented 5 years ago

I'm closing this issue in anticipation of a (beta) v2 release coming soon (and as a clean up thing). The API has been completely rewritten since the last update, and all the useful things such as Darksky / OWM integration have been added