The official source code for Serenum API. https://api.serenum.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Airikr d159a8461e The Wiki has been released 3 weeks ago
.gitignore Minor update 1 month ago
.htaccess The Wiki has been released 3 weeks ago
LICENSE Initial commit 2 months ago
README.md Update 'README.md' 3 weeks ago
class-geotimezone.php Release 2 months ago
class-moonphase.php Release 2 months ago
class-suncalc.php Release 2 months ago
diff.php Minor update 1 month ago
functions.php Minor update 1 month ago
index.php The Wiki has been released 3 weeks ago
wiki.css The Wiki has been released 3 weeks ago
wiki.php The Wiki has been released 3 weeks ago

README.md

Serenum API

This is the official source code for the API that will be used for the upcoming update for Serenum.

If you want to see all of our plans and the issues we have encountered, please go to quire.io/w/serenum. You can also see the todos for Serenum API only by clicking here. For any issues, create a new issue or write to us on Telegram.

The Ambee Pollen API can be slow

We are currently waiting for Ambee for a solution on this.

Bugs

  • The timezone in the API shows wrong timezone. When the correct timezone should be Europe/Stockholm when viewing the weather from for an example Karlstad, SE, it shows Europe/Oslo.
  • class-suncalc.php shows wrong hours for the Sun. Please see https://quire.io/w/serenum/26/The_API_shows_wrong_hours_for_the_Sun?view=tree
  • The regex for validating the coordinates do validates 592697,14.10089 which is wrong

How to get started

  1. Clone the repo or download the files.
  2. Change [your-api-key] with your own API key from OpenWeatherMap or append &key=[your-key-from-owm] to the address. If you have an API key from Ambee, uncomment the cURL for Ambee Pollen API and replace [your-api-key] with your API key from Ambee.
  3. Visit http://localhost/api in your browser and follow the instructions.

How to get started with the difference page

  1. Clone the repo or download the files.
  2. Change [your-api-key] with your own API key from OpenWeatherMap or append &key=[your-key-from-owm] to the address.
  3. Visit http://localhost/api/diff.php in your browser and follow the instructions.

What's in the API

  • Current timezone, date, and time for the given place
  • Detailed overview for the given place
    • Direct link to OpenStreetMap to the coordinates
  • Current weather
    • Current weather's id, icon, and description
    • Probability of rain and/or snow
    • Temperature with feels like temperature + dew point
    • Wind speed and direction
    • Cloud cover
    • Humidity
    • Pressure
    • UV index
    • Grams of H2O per kg of air
    • Risk of pollen (requires secondary API key from Ambee)
    • Air pollution
  • Global weather map from yr.no (clouds only)
  • Weather forecast
    • Minutely for 1 hour (probability only)
    • Hourly for 24 hours
    • Daily for 7 days
  • Astronomy data
    • Sun and Moon hours
    • Sun and Moon positions
    • Moon's distance to Earth
    • Moon's distance to the Sun
    • The current phase of the Moon
    • Forecast of Moon phases
      • Countdowns to the Moon phases
    • Moon's angle, age, and fraction
    • If the Sun are up or not
    • If the Moon are always up or always down
    • Daylight and night time
  • Compare 2 places with diff.php
    • See the current weather for both of the places
    • See the distance (bird's eye view) and the difference between both places. Is it for an example warmer on the first place compared to the second place?

Plans

  • Add thunderstorm data for the current weather and maybe also for the forecast
  • Show if the Sun are always up or always down