excusemyfrench is the application beyond https://excusemyfrench.herokuapp.com/
will return you a random French insult
https://excusemyfrench.herokuapp.com/
will include not only a random French insult *but also* a random picture of an authentic French person.
https://excusemyfrench.herokuapp.com/img
will include a specific insult/picture (based of the index in fixed tables)
https://excusemyfrench.herokuapp.com/img/<number>/<number> like https://excusemyfrench.herokuapp.com/img/127/1
will refresh automatically the insult ( with image ) every second
https://excusemyfrench.herokuapp.com/series
will return a JSON response of the insult ( see [Detail of the API] )
https://excusemyfrench.herokuapp.com/api
Returns json data of a single insult.
-
URL
/api/v1
-
Method:
GET
-
URL Params
Required:
None
-
Data Params
None
-
Success Response:
-
Code: 200
Content: Sucessful Response will return the insult as a STRING and its index number in the base used.{ "insult": { "text": "Playboy De Superette" , "index": 356 } }
-
-
Error Response:
- Code: 401 UNAUTHORIZED
Content:{ error : "You are unauthorized to make this request." }
- Code: 401 UNAUTHORIZED
-
Sample Call:
$.ajax({ url: "/api/v1", dataType: "json", type : "GET", success : function(r) { console.log(r); } });
or a simple
curl https://excusemyfrench.herokuapp.com/api/v1
will return{"insult": { "text": "Playboy De Superette" , "index": 356} }
Returns json data of an insult and the base64 encoded image
-
URL
/api/v1/img
-
Method:
GET
-
URL Params
Required:
None
-
Data Params
None
-
Success Response:
-
Code: 200
Content: Sucessful Response will return the insult as a STRING and its index number in the base used. In Addition it will return an image with its base64 encoded data, its mimetype and its index number in the base used.{ "insult": { "text": "Loutre Analphabète", "index": 254 }, "image": { "data": "/9j/4AA*****", "mimetype": "image/jpg", "indexImg": 10 } }
-
-
Error Response:
- Code: 401 UNAUTHORIZED
Content:{ error : "You are unauthorized to make this request." }
- Code: 401 UNAUTHORIZED
-
Sample Call:
$.ajax({ url: "/api/v1/img", dataType: "json", type : "GET", success : function(r) { console.log(r); } });