There have been a minor change to the whole TibiaData API regarding CORS (Cross-Origin Resource Sharing).
This means, that you now can run requests with for example ajax towards the API right from your website.
The allowed HTTP methods are GET and OPTIONS.
Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell browsers to give a web application running at one origin, access to selected resources from a different origin. A web application executes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, or port) from its own.
I’ve received a lot of questions regarding realtime data and the cache we use on our side.. so I thought that I will give you some more details!
As from v2 of the API, we’ve implemented a cache, to minimize the resources that we use in for example CPU usage and to lower the amount of requests that poll our service on a seconds bases. We at TibiaData understand that you want the latest latest data, but when receiving that amount of similar requests, we had to limit it somehow.
The cache we use is a memcached daemon, which stores data in the memory to serve the information faster to you.
Here is a list of the different API requests and the corresponding memcached timeouts.
In order to continue to provide great API to you all while implementing new features without breaking things, we need to deprecate the TibiaData API v1.
TibiaData API v1 will be deprecated the 30rd april 2018!
Because the changes and improvements we do can be disruptive, we provide as much advance notice as we can so that you can be ready to make any necessary transition.
So go check out the documentation for the API v2 to see, which those changes are.
In the update the 15th december 2017, you can see a full changelog comparing the v1 and v2. Go check it out here.
Thank you for all the support and love to our API!