Created
December 19, 2014 21:28
-
-
Save dashohoxha/a6fb4d8bc02a48311be2 to your computer and use it in GitHub Desktop.
B-Translator API Examples // source http://jsbin.com/giweta
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<link rel="stylesheet" href="http://info.btranslator.org/api-examples-js/style.css" type="text/css" /> | |
<script src="http://info.btranslator.org/api-examples-js/config.js"></script> | |
<script src="http://info.btranslator.org/api-examples-js/http_request.js"></script> | |
<script src="http://info.btranslator.org/api-examples-js/get_access_token.js"></script> | |
<script> | |
// Write a debug message on the output area. | |
var debug = function(msg) { | |
$('#output').append(msg); | |
}; | |
</script> | |
<meta charset="utf-8"> | |
<title>B-Translator API Examples</title> | |
<style id="jsbin-css"> | |
#div-output { | |
float: left; | |
margin: 2px 10px 5px 15px; | |
width: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="div-output"> | |
<pre id="output"> output </pre> | |
</div> | |
<script id="jsbin-javascript"> | |
$(document).ready(function(){ | |
// GET public/btr/report/statistics | |
var request = http_request(base_url + '/public/btr/report/statistics?lng=sq'); | |
request.done(function(response) { | |
console.log(response); // response is an Object | |
}); | |
request.fail(function(jqXHR, textStatus, errorThrown ) { | |
console.log(textStatus + ' ' + jqXHR.status + ': ' + errorThrown); | |
}); | |
}); | |
</script> | |
<script id="jsbin-source-css" type="text/css">#div-output { | |
float: left; | |
margin: 2px 10px 5px 15px; | |
width: 100%; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">$(document).ready(function(){ | |
// GET public/btr/report/statistics | |
var request = http_request(base_url + '/public/btr/report/statistics?lng=sq'); | |
request.done(function(response) { | |
console.log(response); // response is an Object | |
}); | |
request.fail(function(jqXHR, textStatus, errorThrown ) { | |
console.log(textStatus + ' ' + jqXHR.status + ': ' + errorThrown); | |
}); | |
}); | |
</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#div-output { | |
float: left; | |
margin: 2px 10px 5px 15px; | |
width: 100%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
// GET public/btr/report/statistics | |
var request = http_request(base_url + '/public/btr/report/statistics?lng=sq'); | |
request.done(function(response) { | |
console.log(response); // response is an Object | |
}); | |
request.fail(function(jqXHR, textStatus, errorThrown ) { | |
console.log(textStatus + ' ' + jqXHR.status + ': ' + errorThrown); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment