ManiaCalendar - API

Moderators: Xymph, NADEO

User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

ManiaCalendar - API

Post by toffe »

Image
ManiaCalendar
Click here for the topic about ManiaCalendar itself.

API
Along with the Calendar itself we created an API for using on your own site's. You can display the dates of your event on your website.

The current API has basic features:
  • Get events, update events.
  • Search for upcoming dates.
  • Add, edit and delete event dates. (v2 only)
  • Add and delete event admins. (v2 only)
  • Get single event with details.
  • Get dates for an event.
  • Get styles (filter on title). (v1 only)
  • Get titles. (v1 only)
There are currently two verisons of the API:
- Version 1, Deprecated. Also the subdomain is deprecated.
- Version 2, New since 18-08-2017.

Documentation and Keys
More information about the versioning, api keys and (swagger) documentation can be found here: https://maniacalendar.com/my/api
For using the API you need to login with ManiaConnect and get a key. You can obtain the key on the same site.

SDK for PHP (DEPRECATED) (Version 1 only)
The PHP SDK is available now, installing using composer is recommended:

Code: Select all

composer require 'tomvlk/maniacalendar-php-sdk:dev-master'
Or stick to a version by replacing dev-master to any version.

Github page for the SDK: https://github.com/tomvlk/maniacalendar-php-sdk


For questions or suggestions reply or send a PM if it's more key related (like higher request rate).

Toffe
Last edited by toffe on 19 Aug 2017, 15:48, edited 4 times in total.
zocka
Posts: 205
Joined: 15 Jun 2010, 17:56

Re: ManiaCalendar - API

Post by zocka »

I would suggest a method to get the filter options. The API mentions a style ID for example.
Something that would return possible filters like style etc. in categories with name and ID - maybe the color used on the website - would be really nice imo.

Maybe even like

Code: Select all

filters: {
titles: [ ... ],
<titleId>: { styles: [ {id: ... , name: ... , color: ... } ] },
...
}
Would be less requests than /filters/<titleId> (could still be a valid endpoint though).
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: ManiaCalendar - API

Post by toffe »

zocka wrote:I would suggest a method to get the filter options.
Indeed, thats in the planning, at the first place! I keep you updated!

:thumbsup:
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: ManiaCalendar - API

Post by toffe »

I updated the API, added new methods to get Titles and Styles.
http://api.maniacalendar.com/doc/styles
http://api.maniacalendar.com/doc/titles
:thumbsup:

Toffe
User avatar
ReDiX
Posts: 162
Joined: 15 Jul 2011, 13:38
Location: OISE
Contact:

Re: ManiaCalendar - API

Post by ReDiX »

I have a problem !

When I use the API with my personnal server : no problem (ip : 176.31.123.16)

BUT when i wish use the API with the PMC/WTC/TMPLUS server I cannot connect to api (ip : 5.135.165.229)

For test, try to open this page : http://api.maniacalendar.com/v1/events?key=XXX

My server cannot establish a connect HTTP to api.maniacalendar.com.

Please, help me :) i would like use your api for get the next events on my titlepack TMPLUS.

:D :D :D :D :D
TMPLUS !
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: ManiaCalendar - API

Post by toffe »

Hey, I opened the log's, cant find the ip starting with 5. in the logs.
Do you have command line access to the server? (e.g. ssh)?
Can you try to ping to the server (ping api.maniacalendar.com) and show the output.
User avatar
ReDiX
Posts: 162
Joined: 15 Jul 2011, 13:38
Location: OISE
Contact:

Re: ManiaCalendar - API

Post by ReDiX »

Hey,

root@ns317863:.# ping api.maniacalendar.com
PING api.maniacalendar.com (81.4.106.77) 56(84) bytes of data.
64 bytes from s.tvalk.net (81.4.106.77): icmp_req=1 ttl=58 time=8.12 ms
64 bytes from s.tvalk.net (81.4.106.77): icmp_req=2 ttl=58 time=8.00 ms
64 bytes from s.tvalk.net (81.4.106.77): icmp_req=3 ttl=58 time=7.85 ms
64 bytes from s.tvalk.net (81.4.106.77): icmp_req=4 ttl=58 time=8.02 ms
TMPLUS !
User avatar
ReDiX
Posts: 162
Joined: 15 Jul 2011, 13:38
Location: OISE
Contact:

Re: ManiaCalendar - API

Post by ReDiX »

For fun,

I typed this command :
root@ns317863# lynx http://api.maniacalendar.com/v1/events?key=XXXXXXXX

And i stay block at this step : "Making HTTP connection to api.maniacalendar.com"
TMPLUS !
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: ManiaCalendar - API

Post by toffe »

I will reply on your mail, this is specific issue, at least for now.

EDIT: Solved, was specific problem
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: ManiaCalendar - API

Post by gouxim »

Kudos for the quality of your api docs. Out of curiosity, would you mind sharing the tools you are using ?

A small feedback: i was a little confused by the format of the parameters in the examples, eg. http://api.maniacalendar.com/doc/events#events1:

Code: Select all

GET /events HTTP/1.1
key=[APIKEY]
I was wondering if the "?" was missing, or if it was a POST request and the verb was not the right one
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
Post Reply

Return to “General Tools”

Who is online

Users browsing this forum: No registered users and 1 guest