Mabinogi World Wiki is brought to you by Coty C., 808idiotz, our other patrons, and contributors like you!!
Want to make the wiki better? Contribute towards getting larger projects done on our Patreon!

Forum - Weather API

Overview > Mabinogi World Wiki > Wiki Projects > Weather API
[#58]

This is a description for MabiWorld's Weather API.

You are free to use this API and make your own widgets. By request of the original author, the backend code/algorithm cannot be released.

The endpoint for this service is: http://mabi.world/api/forecast/

For now, all parameters can be placed in the query field (aka GET parameters). It may support prettier things in the future but it's not a high priority.

There are three main types of queries: Getting the forecast, getting the best weather, and getting the time of an upcoming type of weather.

Data types

Times

Times can support any format supported by this, but standard W3C (YYYY-MM-DDThh:mm:ss) format is recommended.

All input times use the tz parameter which defaults to the game's server time.

Weather Patterns

Weather patterns are the names given to a pattern. Multiple areas may use the same pattern. They are labeled with the form type# where # can be 1 through 13.

  • type1: Tir Chonaill, Dugald Aisle, Dugald Residential + Castle
  • type2: Dunbarton, Gairech, Port Cobh, Fiodh
  • type3: Bangor
  • type4: Emain Macha
  • type5: Sen Mag, Sen Mag Residential + Castle
  • type6: Port Cean, Morva Aisle
  • type7: Rano, Nubes
  • type8: Connous
  • type9: Courcle, Irai Falls
  • type10: Physis, Zardine
  • type11: Shadow Realm
  • type12: Taillteann, Tara, Corrib Valley, Blago Prairie, Sliab Cuilin, Abb Neagh
  • type13: Unused

Places that do not have weather (and thus are 0.500): Belvast, Scath, Shyllien, Avon, TNN, Solea, Sidhe (but always snowing), Osna, Coill, Ceo, Abb Neagh Residential, Sliab Cuilin Residential + Castle

Places that have not been confirmed: Doki Doki, Nekojima, Beginner zones, AW, Falias

Weather data

The float return can be considered the "raw" weather data, however we offer a integer version for convenience.

Type Int value Float range
Unknown* weather -9 -1.000 ~ -1.000
Sunny -8 0.000 ~ 0.700
Cloudy Slightly -7 0.700 ~ 0.850
Partly -6 0.850 ~ 1.000
Moderately -5 1.000 ~ 1.200
Cloudy -4 1.200 ~ 1.500
Very Cloudy -3 1.500 ~ 1.700
Extra Cloudy -2 1.700 ~ 1.900
Super Cloudy -1 1.900 ~ 1.950
Rainy 0% 0 1.950 ~ 1.9525
0% 1 1.9525 ~ 1.9549
10% 2 1.9549 ~ 1.9575
10% 3 1.9575 ~ 1.960
20% 4 1.960 ~ 1.9625
20% 5 1.9625 ~ 1.965
30% 6 1.965 ~ 1.9675
30% 7 1.9675 ~ 1.970
40% 8 1.970 ~ 1.9725
40% 9 1.9725 ~ 1.975
50% 10 1.975 ~ 1.9775
50% 11 1.9775 ~ 1.989
60% 12 1.980 ~ 1.9825
60% 13 1.9825 ~ 1.985
70% 14 1.985 ~ 1.9875
70% 15 1.9875 ~ 1.990
80% 16 1.990 ~ 1.9925
80% 17 1.9925 ~ 1.995
90% 18 1.995 ~ 1.9975
90% 19 1.9975 ~ 2.000
Thunder 110% 20 2.000 ~ 2.000

Common Parameters

All forms support a from param which defines the initial time. You may also specify that time's timezone with the tz param. You may also restrict the patterns in which it searches.

from

at is an alias of this param.

By default, the from time is now.

tz

If this field is not specified, the game's server time (Pacific) is assumed.

You may specify an offset in hours, such as -7:00, or as a location code, such as America/Los_Angeles. The difference is whether or not it respects DST, of course. You can find a list here.

example

of

Restrict the query to be within only the given weather patterns.

Example

of-all-except

A blacklist instead of a whitelist.

Example

type

The datatype to return weather data values in. If this is f, float, or floats the values are returned as floats. If it is i, int, ints, integer, or integers (the default) it will return integers.

Floats are returned as strings for precision concerns.

Example integer: 10
Example float: "0.943"

Common Reply {}

All replies contain the time of the from parameter and, if there are errors, a key called errors.

from

String of W3C time of the request in server time (Pacific). Keep in mind quests are cached for a short time.

Example: "2017-06-24T13:20:28-07:00"

errors

An array of error strings.

Example: [ "Unknown best \"water\"" ]

Forecast

In order to retrieve a forecast, you must specify either an end time or a duration.

to

To see the weather types between from and to, use this param. It is a date with the same parsing info as from. It will use the same timezone specified in tz.

Example

duration

This requests a sequence of forecast data of the given number long. For instance, if you request 2, it will return the current weather and the next weather.

Example

Reply {}

forecast

Each key is the name of a pattern. All of those selected in of will be returned, or all of those not selected in of-all-except will be returned. Of course the default is to return one for all patterns.

pattern

This is an array of the upcoming weather types in order. That is, the first entry is the weather at the from time, the second is the following weather, and so on. It will only return as many as you request and there is a limit of about 7 per type.

Example: [ -4, -8 ]

Best weather

There is only one option for this parameter right now, I don't know if there will ever be more.

best

Must be set to rain.

Example

Reply {}

best

rain
is

The weather data that is the best at time from of the available weather patterns.

Example: 10

in

An array of the patterns that are experiencing this weather.

Example: [ "type3" ]

Upcoming weather

next

Specify what weather type you're looking for. There are many values and aliases for next. You may specify an integer for a raw weather value, or you may specify a general weather type.

The values are:

  • unknown: unk, unknown
  • sunny: sun, sunny, sunshine, clear
  • cloudy: cloud, clouds, cloudy
  • rain: rain,
  • thunder: lightning, thunder, thunderstorm

The ranges can be seen in the weather data section.

for

Specify if you want the data return for all of the patterns or for each (default) of the patterns.

Examples: each, all

in

By default, times are returned in minutes but you may specify to return them as a string of hours:minutes by setting this to h, hr, hrs, hour, or hours.

Examples: minutes hours

Reply for=each {}

next

weather

The weather type requested, or if a range was requested, one of the weather types found. (Not helpful, I know.)

Example: 20

for

Each key returned is a weather pattern of the requested set.

pattern

The contents is an integer (or string) describing the time from the from field until this weather pattern next occurs.

Example (minutes): 1180
Example (hours): "0:20"

Reply for=all {}

next

weather

The weather type found for this.

Example: 20

for

A string of the pattern that is next to have this type of weather.

Example: "type1"

in

When this weather type will next occur for the returned pattern.

Example (minutes): 20
Example (hours): "0:20"

Posted by Kadalyn (administrator) on 23 June 2017 at 23:46.
Edited by Kadalyn (administrator) on 24 June 2017 at 14:09.