<?php
include('apibuilder/core/ApiApp.php');
include('apibuilder/language/pt-br.php');
/* formats */
include('apibuilder/formats/all_formats.php');
/* or */
//include('apibuilder/formats/json.php');
//include('apibuilder/formats/php_serialize.php');
//include('apibuilder/formats/var_export.php');
include('sampleclass.php');
$api = new APIApp("http://localhost/api", /*optional*/ new SampleKeyValidator());
$api->rewriteUrl = true;
$api->baseURI = "api";
$api->commandParam = "cmd"; // only for rewriteUrl = false
$api->methodParam = "do"; // only for rewriteUrl = false
$api->versionParam = "ver"; // default = ver
$api->keyParam = "key"; // default = key
$api->defaultVersion = 2;
$api->run();
/*
Exemplos de Chamadas / Call Samples
rewriteUrl = true;
http://rastreio.freeside.com.br/api/random/getNumber
http://rastreio.freeside.com.br/api/text/getSecureString/?key=75f42660c4109c3dc81101d3a45fa174
http://rastreio.freeside.com.br/api/text/getSecureString/?key=75f42660c4109c3dc81101d3a45fa174&out=serialize
rewriteUrl = false;
http://rastreio.freeside.com.br/api/apitest.php?cmd=random&do=getNumber
http://rastreio.freeside.com.br/api/apitest.php?cmd=text&do=getSecureString&key=75f42660c4109c3dc81101d3a45fa174
http://rastreio.freeside.com.br/api/apitest.php?cmd=text&do=getSecureString&key=75f42660c4109c3dc81101d3a45fa174&out=serialize
http://rastreio.freeside.com.br/api/random/getNumberRange/?min=1000&max=2000
*/
?>
|