You have to be authenticated if you want to deal with our API, once you get an OAuth Access Token, you’ll be able to create, retrieve, update and delete events for the authentified user.
For the moment, only json format is supported.
We strongly encourage you to use our feeds if you’d like to retrieve latest events. Otherwise, if you know the event id, you can get it through our RESTful api, GETting the appropriated URL:
http://www.mixin.com/events/{id}/json/
Use the POST HTTP verb if you’d like to create an event with this URL:
http://www.mixin.com/events/json/
Use the PUT HTTP verb if you’d like to modify an event with this URL:
http://www.mixin.com/events/{id}/json/
Use the DELETE HTTP verb if you’d like to delete an event with this URL:
http://www.mixin.com/events/{id}/json/
Note
creation, modification and deletion will return a JSON response which contains informations about what happens (see infos, errors and event in your response).
Here is the schema of a basic event when you GET it, <values> are fake content:
{"events":
[{
"status": 1,
"choice_final": 0,
"what_choices_open": 1,
"event_type": 1,
"end_date": "<yyyy-mm-dd hh:mm:ss>",
"creation_date": "<yyyy-mm-dd hh:mm:ss>",
"last_modification_date": "<yyyy-mm-dd hh:mm:ss>",
"who_can_join": 3,
"special_time": "",
"admin_perm": true,
"duration": 2,
"id": <event_id>,
"where_choices_open": 1,
"write_perm": true,
"special_time_end": "",
"what": "private event",
"privacy": 3,
"when_choices_open": 1,
"description": "",
"choice_type": 0,
"when": "<date>",
"channel_source": 1,
"owner": "<username>",
"parent_id": null,
"score": {},
"location": {
"count": 0,
"display_name": "<location_name>",
"name": "<location_name>",
"region_name": "",
"source": 0,
"locality_name": "",
"owner": {
"username": "<username>",
"screen_name": "<screen_name>",
"url": "<user_relative_url>",
"large_icon_url": "<user_large_icon_relative_url>",
"small_icon_url": "<user_small_icon_relative_url>",
"is_guest": 0,
"id": <user_id>,
"medium_icon_url": "<user_medium_icon_relative_url>"
},
"longitude": "0E-7",
"latitude": "0E-7",
"matching_timezones": [],
"geocoding_type": 0,
"address": "",
"country_name": "",
"display_address": "<location_name>",
"country_code": 0,
"zip_code": "",
"dependent_locality_name": "",
"id": <location_id>,
"street_and_number": "",
"accuracy": 0
},
"location_is_set": 1,
"title": "",
"where": "@<location_name>",
"start_date": "<yyyy-mm-dd hh:mm:ss>",
"owner_id": <user_id>}
]
}
Notes:
- All dates are in UTC
There are two ways to create an event, the quick syntax one from the quickadd form and the detailed one from the detailed form.
You can use those arguments in order to create an event:
input (string): you must provide an input.
who (string, optional): invite users by email addresses, usernames or set names separated by ,.
- event_type (int, optional): you can specify the type of the event:
- 1: Plan
- 2: Wish
- 3: Availability
- 4: Proposition
- 5: Choice (not valid for creation). A proposition is made of serveral choices.
- 6: Location
The input argument must use quick syntax, required parts depends on the event type but the common pattern is who: what @where when. If input is provided but not event_type, we try to guess from the input. If both are are provided we do some basic validation. For example, the user cannot provide a what if the event type is set to Location.
If you want to let more flexibility to your users, you can provide fine-grained control on event creation thanks to the detailed arguments.
event_type (int): as defined above.
what (string, limited to 200 chars): title of the event. If multiple we create a proposition.
where (string, limited to 200 chars): location of the event. If multiple we create a proposition.
when (string): date of the event. If multiple we create a proposition.
who (string): invite users by email addresses, usernames or set names separated by ,.
what_choices_open (boolean): meaningfull for propositions only. If 1, let what choices open.
where_choices_open (boolean): meaningfull for propositions only. If 1, let where choices open.
when_choices_open (boolean): meaningfull for propositions only. If 1, let when choices open.
- privacy (int): who can have read access to the activity:
- 0: Default (defined by user’s settings)
- 1: Public
- 2: Friends
- 3: Private
- who_can_join (int): you can specify who can join and write:
- 0: Default (defined by user’s settings)
- 1: Public
- 2: Friends
- 3: Nobody
description (string, limited to 2000 chars): description of the event. Some html is ok
All arguments are optional given the type of event created.
All the arguments for detailed event creation except event_type are valid.
Footnotes
TODO Detail the proposition API which differs slightly from the event API