Are you a user? This way please
We currently have a basic JSON API that will allow you to interact with the main elements of Bokzuy. All the API methods can return JSONP if you pass a callback parameter.
All calls to api must be directed to https://api.bokzuy.com
Every non-anonymous petition must authenticate through HTTP Basic Authentication.
To obtain the basic data for an authenticated user, you must perform a GET request to /me.
Example of a valid response:
{
"success": true,
"user": {
"id": 1,
"name": "Iván López",
"profile": "http://www.bokzuy.com/user/ivan-lopez",
"image": "http://www.bokzuy.com/images/avatars/1325023120062_1_bC6Z7wIHd0n"
}
}
To obtain the basic data of any other user, you must perform a GET request (anonymously optional) to /USER_ID, where USER_ID is the user's id from which we want to obtain the basic information.
Example of a valid response:
{
"success": true,
"user": {
"id": 2,
"name": "Juanfran",
"profile": "http://www.bokzuy.com/user/juanfran",
"image": "http://www.bokzuy.com/images/avatars/1326457442017_2_1FHo0IvmD3a"
}
}
To obtain an authenticated user's friends' list, you must perform a GET request to /me/friends.
Example of a valid response:
{
"success": true,
"friends": [
{
"id": 10,
"name": "Diacrítica",
"profile": "http://www.bokzuy.com/user/diacritica",
"image": "http://www.bokzuy.com/images/avatars/1324575694368_10_bPEft0W10I4"
},
{
"id": 11,
"name": "superalex",
"profile": "http://www.bokzuy.com/user/superalex",
"image": "http://www.bokzuy.com/images/avatars/1324558688039_11_iSHbV2NHxo1"
}
]
}
To obtain another authenticated user's friends' list, you must perform a GET petition (anonymously optional) to /USER_ID/friends, where USER_ID is the user's id from which we want to obtain the friends' list.
Example of a valid response:
{
"success": true,
"friends": [
{
"id": 1,
"name": "Iván López",
"profile": "http://www.bokzuy.com/user/ivan-lopez",
"image": "http://www.bokzuy.com/images/avatars/1325023120062_1_bC6Z7wIHd0n"
},
{
"id": 3,
"name": "yami",
"profile": "http://www.bokzuy.com/user/yami",
"image": "http://www.bokzuy.com/images/avatars/1324555922308_3_4RLBtNyPRrO"
}
]
}
To obtain the groups' list for an authenticated user you must perform a GET request to /me/groups.
Example of a valid response:
{
"success": true,
"groups": [
{
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
{
"id": 4,
"slug": "weather-prophet",
"permalink": "http://www.bokzuy.com/timeline/weather-prophet",
"description": "El equipo ganador de la Pi Week",
"name": "Weather Prophet"
}
]
}
To obtain another user's groups' list you must perform a GET request (anonymously optional) to /USER_ID/groups, where USER_ID is the user's id from which we want to obtain the groups' list.
Example of a valid response:
{
"success": true,
"groups": [
{
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
{
"id": 3,
"slug": "django-pollo",
"permalink": "http://www.bokzuy.com/timeline/django-pollo",
"description": "Django Fried Chicken",
"name": "Django Pollo"
}
]
}
To obtain the list of shared groups between the authenticated user and another user you must perform a GET request to /me/common-groups/USER_ID, where USER_ID is the user's id from which we want to obtain the shared groups.
Example of a valid response:
{
"success": true,
"groups": [
{
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
}
]
}
To obtain Bokzuy's badges list you must perform a GET request (anonymously optional) to /badges.
Optionally, you can pass the lang parameter along with the language we wish to obtain the badges information of. LValid values are "en" and "es".
Example of a valid response:
{
"success": true,
"badges": [
{
"id": 2,
"name": "Read the F****in Manual!",
"description": "There's a dark pleasure in reading manuals. Don't miss out",
"permalink": "http://www.bokzuy.com/badge/read-the-fuckin-manual",
"positive": false,
"image": "http://www.bokzuy.com/images/badges/4_chapa.png"
},
{
"id": 21,
"name": "Well documented!",
"description": "Jimmy Wales would be proud",
"permalink": "http://www.bokzuy.com/badge/well-documented",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/24_chapa.png"
},
{
"id": 29,
"name": "Inspector Gadget",
"description": "NASA wants their probe back",
"permalink": "http://www.bokzuy.com/badge/inspector-gadget",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/32_chapa.png"
},
{
"id": 30,
"name": "FAIL",
"description": "So, royally fucking up is a style a life, huh?",
"permalink": "http://www.bokzuy.com/badge/fail",
"positive": false,
"image": "http://www.bokzuy.com/images/badges/33_chapa.png"
},
{
"id": 19,
"name": "Mr. Wolf",
"description": "MacGyver called, he's got a problem and wants your advice",
"permalink": "http://www.bokzuy.com/badge/mr-wolf",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/22_chapa.png"
}
]
}
To obtain the list of last bokies for an authenticated user you must perform a GET request to /me/bokies. Being an authenticated request, you will receive all private information about the bokies: user that sent it, the reason behind, the list of comments and the "deserved/not deserved" list.
Optionally you can pass the following parameters:
Example of a valid response:
{
"success": true,
"bokies": [
{
"id": 294,
"bokyUrl": "http://www.bokzuy.com/294",
"badge": {
"id": 21,
"name": "¡Bien documentado!",
"description": "Jimmy Wales estaría orgulloso de ti",
"permalink": "http://www.bokzuy.com/badge/bien-documentado",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/24_chapa.png"
},
"date": "2012-03-16T13:10:46Z",
"group": {
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
"receiver": {
"id": 1,
"name": "Iván López",
"profile": "http://www.bokzuy.com/user/ivan-lopez",
"image": "http://www.bokzuy.com/images/avatars/1325023120062_1_bC6Z7wIHd0n"
},
"message": "Por hacer un tutorial.... que realmente no voy a usar nunca. :-P Es broma! https://redmine.kaleidos.net/projects/foss/wiki/TutTomcatVirtualHost",
"sender": {
"id": 13,
"name": "Toño",
"profile": "http://www.bokzuy.com/user/tono",
"image": "http://www.bokzuy.com/images/avatars/1326799284970_13_RxszXNUIoR0"
},
"comments": [],
"deserves": [
{
"user": {
"id": 5,
"name": "Jesús Espino",
"profile": "http://www.bokzuy.com/user/jesus-espino",
"image": "http://www.bokzuy.com/images/avatars/1324557379911_5_DRPfFmjTf58"
},
"date": "2012-03-16T14:07:42Z"
},
{
"user": {
"id": 11,
"name": "superalex",
"profile": "http://www.bokzuy.com/user/superalex",
"image": "http://www.bokzuy.com/images/avatars/1324558688039_11_iSHbV2NHxo1"
},
"date": "2012-03-16T21:23:06Z"
},
{
"user": {
"id": 3,
"name": "yami",
"profile": "http://www.bokzuy.com/user/yami",
"image": "http://www.bokzuy.com/images/avatars/1324555922308_3_4RLBtNyPRrO"
},
"date": "2012-03-16T13:11:00Z"
},
{
"user": {
"id": 8,
"name": "Pablo Alba",
"profile": "http://www.bokzuy.com/user/pablo-alba",
"image": "http://www.bokzuy.com/images/avatars/1324557958736_8_SEM5eIgI7MQ"
},
"date": "2012-03-16T13:35:30Z"
},
{
"user": {
"id": 34,
"name": "Andrei Antoukh",
"profile": "http://www.bokzuy.com/user/andrei-antoukh",
"image": "http://www.bokzuy.com/images/avatars/1326111844137_34_p5TXE4b2qtZ"
},
"date": "2012-03-16T13:46:57Z"
}
],
"noDeserves": []
},
{
"id": 282,
"bokyUrl": "http://www.bokzuy.com/282",
"badge": {
"id": 23,
"name": "You are my master now",
"description": "¡Eres el puto amo!",
"permalink": "http://www.bokzuy.com/badge/you-are-my-master-now",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/26_chapa.png"
},
"date": "2012-03-08T09:04:53Z",
"group": {
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
"receiver": {
"id": 1,
"name": "Iván López",
"profile": "http://www.bokzuy.com/user/ivan-lopez",
"image": "http://www.bokzuy.com/images/avatars/1325023120062_1_bC6Z7wIHd0n"
},
"message": "Por levantar el backup de redmine en 5 minutos para que podamos recuperar parte de la información. Thanks!!",
"sender": {
"id": 3,
"name": "yami",
"profile": "http://www.bokzuy.com/user/yami",
"image": "http://www.bokzuy.com/images/avatars/1324555922308_3_4RLBtNyPRrO"
},
"comments": [],
"deserves": [
{
"user": {
"id": 11,
"name": "superalex",
"profile": "http://www.bokzuy.com/user/superalex",
"image": "http://www.bokzuy.com/images/avatars/1324558688039_11_iSHbV2NHxo1"
},
"date": "2012-03-16T21:25:00Z"
},
{
"user": {
"id": 5,
"name": "Jesús Espino",
"profile": "http://www.bokzuy.com/user/jesus-espino",
"image": "http://www.bokzuy.com/images/avatars/1324557379911_5_DRPfFmjTf58"
},
"date": "2012-03-08T14:48:29Z"
}
],
"noDeserves": []
}
]
}
To obtain the list of last bokies for another user you must perform a GET request to /USER_ID/bokies, where USER_ID is the user's id from which we want to obtain the bokies. Depending on whether it's an authenticated request or not, the response will include the private information for the bokies.
Optionally you can pass the following parameters:
Example of a valid response:
{
"success": true,
"bokies": [
{
"id": 177,
"bokyUrl": "http://www.bokzuy.com/177",
"badge": {
"id": 17,
"name": "Proud Flag Waving",
"description": "Stand at the pulpit. We didn't vote for you and yet we'll follow!",
"permalink": "http://www.bokzuy.com/badge/proud-flag-waving",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/20_chapa.png"
},
"date": "2012-02-08T08:55:50Z",
"group": {
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
"receiver": {
"id": 2,
"name": "Juanfran",
"profile": "http://www.bokzuy.com/user/juanfran",
"image": "http://www.bokzuy.com/images/avatars/1326457442017_2_1FHo0IvmD3a"
}
},
{
"id": 134,
"bokyUrl": "http://www.bokzuy.com/134",
"badge": {
"id": 19,
"name": "Mr. Wolf",
"description": "MacGyver called, he's got a problem and wants your advice",
"permalink": "http://www.bokzuy.com/badge/mr-wolf",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/22_chapa.png"
},
"date": "2012-01-23T08:31:19Z",
"group": {
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
"receiver": {
"id": 2,
"name": "Juanfran",
"profile": "http://www.bokzuy.com/user/juanfran",
"image": "http://www.bokzuy.com/images/avatars/1326457442017_2_1FHo0IvmD3a"
}
}
]
}
To obtain the timeline's information for an authenticated user you must perform a GET request to /me/timeline.
Optionally you can pass the following parameters:
Example of a valid response:
{
"success": true,
"bokies": [
{
"id": 295,
"bokyUrl": "http://www.bokzuy.com/295",
"badge": {
"id": 18,
"name": "Ninja",
"description": "Silencioso, efectivo... letal. De gestos precisos y ejecución perfecta.",
"permalink": "http://www.bokzuy.com/badge/ninja",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/21_chapa.png"
},
"date": "2012-03-16T16:58:16Z",
"group": {
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
"receiver": {
"id": 34,
"name": "Andrei Antoukh",
"profile": "http://www.bokzuy.com/user/andrei-antoukh",
"image": "http://www.bokzuy.com/images/avatars/1326111844137_34_p5TXE4b2qtZ"
},
"message": "Se ha oído un sonoro \"challenge accepted\" esta mañana...",
"sender": {
"id": 3,
"name": "yami",
"profile": "http://www.bokzuy.com/user/yami",
"image": "http://www.bokzuy.com/images/avatars/1324555922308_3_4RLBtNyPRrO"
},
"deserves": [
{
"user": {
"id": 6,
"name": "David Barragán Merino",
"profile": "http://www.bokzuy.com/user/david-barragan-merino",
"image": "http://www.bokzuy.com/images/avatars/1328644740023_6_fbmTNKj52eF"
},
"date": "2012-03-16T20:21:02Z"
},
{
"user": {
"id": 5,
"name": "Jesús Espino",
"profile": "http://www.bokzuy.com/user/jesus-espino",
"image": "http://www.bokzuy.com/images/avatars/1324557379911_5_DRPfFmjTf58"
},
"date": "2012-03-16T21:07:05Z"
},
{
"user": {
"id": 1,
"name": "Iván López",
"profile": "http://www.bokzuy.com/user/ivan-lopez",
"image": "http://www.bokzuy.com/images/avatars/1325023120062_1_bC6Z7wIHd0n"
},
"date": "2012-03-16T18:03:45Z"
},
{
"user": {
"id": 11,
"name": "superalex",
"profile": "http://www.bokzuy.com/user/superalex",
"image": "http://www.bokzuy.com/images/avatars/1324558688039_11_iSHbV2NHxo1"
},
"date": "2012-03-16T21:22:56Z"
}
],
"noDeserves": []
},
{
"id": 294,
"bokyUrl": "http://www.bokzuy.com/294",
"badge": {
"id": 21,
"name": "¡Bien documentado!",
"description": "Jimmy Wales estaría orgulloso de ti",
"permalink": "http://www.bokzuy.com/badge/bien-documentado",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/24_chapa.png"
},
"date": "2012-03-16T13:10:46Z",
"group": {
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
"receiver": {
"id": 1,
"name": "Iván López",
"profile": "http://www.bokzuy.com/user/ivan-lopez",
"image": "http://www.bokzuy.com/images/avatars/1325023120062_1_bC6Z7wIHd0n"
},
"message": "Por hacer un tutorial.... que realmente no voy a usar nunca. :-P \nEs broma! https://redmine.kaleidos.net/projects/foss/wiki/TutTomcatVirtualHost",
"sender": {
"id": 13,
"name": "Toño",
"profile": "http://www.bokzuy.com/user/tono",
"image": "http://www.bokzuy.com/images/avatars/1326799284970_13_RxszXNUIoR0"
},
"deserves": [
{
"user": {
"id": 5,
"name": "Jesús Espino",
"profile": "http://www.bokzuy.com/user/jesus-espino",
"image": "http://www.bokzuy.com/images/avatars/1324557379911_5_DRPfFmjTf58"
},
"date": "2012-03-16T14:07:42Z"
},
{
"user": {
"id": 11,
"name": "superalex",
"profile": "http://www.bokzuy.com/user/superalex",
"image": "http://www.bokzuy.com/images/avatars/1324558688039_11_iSHbV2NHxo1"
},
"date": "2012-03-16T21:23:06Z"
},
{
"user": {
"id": 3,
"name": "yami",
"profile": "http://www.bokzuy.com/user/yami",
"image": "http://www.bokzuy.com/images/avatars/1324555922308_3_4RLBtNyPRrO"
},
"date": "2012-03-16T13:11:00Z"
},
{
"user": {
"id": 8,
"name": "Pablo Alba",
"profile": "http://www.bokzuy.com/user/pablo-alba",
"image": "http://www.bokzuy.com/images/avatars/1324557958736_8_SEM5eIgI7MQ"
},
"date": "2012-03-16T13:35:30Z"
},
{
"user": {
"id": 34,
"name": "Andrei Antoukh",
"profile": "http://www.bokzuy.com/user/andrei-antoukh",
"image": "http://www.bokzuy.com/images/avatars/1326111844137_34_p5TXE4b2qtZ"
},
"date": "2012-03-16T13:46:57Z"
}
],
"noDeserves": []
}
]
}
To obtain the boky's information for an authenticated user you must perform a GET request to /me/bokies/BOKY_ID, where BOKY_ID is the boky's id for the user we want to obtain the information.
Optionally you can pass the following parameters:
Example of a valid response:
{
"success": true,
"bokies": {
"id": 282,
"bokyUrl": "http://www.bokzuy.com/282",
"badge": {
"id": 23,
"name": "You are my master now",
"description": "You're the fucking overloard now!",
"permalink": "http://www.bokzuy.com/badge/you-are-my-master-now",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/26_chapa.png"
},
"date": "2012-03-08T09:04:53Z",
"group": {
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
"receiver": {
"id": 1,
"name": "Iván López",
"profile": "http://www.bokzuy.com/user/ivan-lopez",
"image": "http://www.bokzuy.com/images/avatars/1325023120062_1_bC6Z7wIHd0n"
},
"message": "Por levantar el backup de redmine en 5 minutos para que podamos recuperar parte de la información. Thanks!!",
"sender": {
"id": 3,
"name": "yami",
"profile": "http://www.bokzuy.com/user/yami",
"image": "http://www.bokzuy.com/images/avatars/1324555922308_3_4RLBtNyPRrO"
}
}
}
To obtain the boky's information for another user you must perform a GET request to /USER_ID/bokies/BOKY_ID, where USER_ID is the other user's id and BOKY_ID is the boky's id for the user we want to obtain the information.
Optionally you can pass the following parameters:
Example of a valid response:
{
"success": true,
"bokies": [
{
"id": 177,
"bokyUrl": "http://www.bokzuy.com/177",
"badge": {
"id": 17,
"name": "Proud Flag Waving",
"description": "Stand at the pulpit. We didn't vote for you and yet we'll follow!",
"permalink": "http://www.bokzuy.com/badge/proud-flag-waving",
"positive": true,
"image": "http://www.bokzuy.com/images/badges/20_chapa.png"
},
"date": "2012-02-08T08:55:50Z",
"group": {
"id": 1,
"slug": "kaleidos",
"permalink": "http://www.bokzuy.com/timeline/kaleidos",
"description": "Beautiful code",
"name": "Kaleidos"
},
"receiver": {
"id": 2,
"name": "Juanfran",
"profile": "http://www.bokzuy.com/user/juanfran",
"image": "http://www.bokzuy.com/images/avatars/1326457442017_2_1FHo0IvmD3a"
}
}
]
}
To send a boky to ourselves you must perform a POST request to /me/bokies with the following parameters:
Example of an invalid request:
{
"success": false,
"msg": "Mandatory parameters are missing"
}
Example of a valid response:
{
"success": true,
"msg": "Boky sent correctly"
}
To send a boky to another user you must perform a POST request to /USER_ID/bokies, where USER_ID is the other user's id, with the following parameters:
Example of an invalid request:
{
"success": false,
"msg": "Mandatory parameters are missing"
}
Example of a valid response:
{
"success": true,
"msg": "Boky sent correctly"
}
To publish a comment to a boky you must perform a POST request to /bokies/BOKY_ID/comment, where BOKY_ID is the identifier of the boky in which we want to publish the comment, with the following parameter:
Example of a valid response:
{
"success": true,
"msg": "Comment published correctly"
}
To add or remove a 'deserve' to a boky you must perform a POST request to /bokies/BOKY_ID/deserve, where BOKY_ID is the identifier of the boky in which we want to add or remove the 'deserve'.
Example of a valid response:
{
"success": true,
"msg": "Deserve sent correctly"
}
To add or remove a 'no-deserve' to a boky you must perform a POST request to /bokies/BOKY_ID/no-deserve, where BOKY_ID is the identifier of the boky in which we want to add or remove the 'no-deserve'.
Example of a valid response:
{
"success": true,
"msg": "No-deserve sent correctly"
}