1. Go to this page and download the library: Download mediapost/api-client-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mediapost / api-client-php example snippets
// Autoloading do composer ou outro à sua escolha
' /* $ConsumerKey */,
'' /* $ConsumerSecret */,
'' /* $Token */,
'' /* $TokenSecret */
);
// Inicialização do cliente ...
// Retorna a quantidade de registros que o recurso pode retornar (desconsiderando a paginação)
var_dump($response->getTotalCount());
// Essa classe se comporta como um array...
// ... podendo ser iterada...
foreach ($response as $key => $value) {
var_dump($key, $value);
}
// ... e também acessada
var_dump(count($response));
var_dump($response['key']);
// Se preferir lidar realmente com um array, basta invocar o método toArray()
$arr = $response->toArray();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.