diff --git a/index.html b/index.html index 38d3848..e4e33a0 100644 --- a/index.html +++ b/index.html @@ -214,7 +214,8 @@
-

Relai en cours :

+

Relay in progress : -

N°. - Temp - Heure + Chrono time + Time @@ -293,7 +294,8 @@
-

Relai en cours :

+

Relay in progress : -

N°. - Temp - Heure + Chrono time + Time @@ -366,13 +368,14 @@
-
Race params - OCK 1
+
Race params - OCK 3
-

Relai en cours :

+

Relay in progress : -

N°. - Temp - Heure + Chrono time + Time @@ -479,13 +482,15 @@ + - - + diff --git a/js/timelaps.js b/js/timelaps.js new file mode 100644 index 0000000..a468279 --- /dev/null +++ b/js/timelaps.js @@ -0,0 +1,44 @@ +var api_url = 'http://127.0.0.1:8000/api/v1/'; + +function getParams() { + +} + +function getKarts() { + console.log("getKarts"); + $.ajax({ + type: 'GET', + crossDomain: true, + url: api_url + 'karts/', + dataType: 'json', + success : function(data, status){ // code_html contient le HTML renvoyé + + console.log("OK!"); + console.log(data); + console.log(status); + }, + error : function(data, status){ // code_html contient le HTML renvoyé + + console.log("KO!"); + console.log(data); + console.log(status); + }, + }); +/* + $.get(api_url + 'karts', function (data, status) { + console.log("OK!"); + console.log(data); + console.log(status); + }); + */ + +} + +function getPilotsByKart() { + +} + +$(document).ready(function () { + console.log("ready!"); + getKarts(); +});