maxtv-api for developpers


load the maxtv-api

<script src="//api.maxtv.fr/sdk/api-1.0.0.js"></script>
<script>
    var api = new maxtv_api_object();
    api.host = 'api.maxtv.fr';
    api.client_id = 'my_client_id';
    api.scope = 'user';
    api.key = 'my_api_key';
</script>   

query the maxtv-api with api.get method

<script>
    api.get('//' + api.host + '/user/ip.json', function(data){
        console.log(data);
    }, function(data){
        console.error(data);
    });
</script>

query the maxtv-api with api.call method

<script>
    api.call('user', 'ip', function(data){
        console.log(data);
    }, function(data){
        console.error(data);
    });
</script>