1. Go to this page and download the library: Download nickurt/blendle 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/ */
nickurt / blendle example snippets
ent = new \Blendle\Client\StandardClient(new \Blendle\Options\StandardBlendleOptions());
$request = new \Blendle\Request\AuthorizationRequest();
$request->setUsername('username');
$request->setPassword('password');
$response = $client->send($request);
print_r($response->getToken());
ent = new \Blendle\Client\StandardClient(new \Blendle\Options\StandardBlendleOptions());
$authorization = new \Blendle\Model\Authorization();
$authorization->setToken('dSwD*xFss8df58s7dfsdfd77872');
$request = new \Blendle\Request\MeRequest();
$request->setAuthorization($authorization);
$response = $client->send($request);
print_r($response->getUsername());
ent = new \Blendle\Client\StandardClient(new \Blendle\Options\StandardBlendleOptions());
$response = $client->send(new \Blendle\Request\PopularRequest());
foreach($response->getItem() as $items) {
print_r($items->getTitle());
}
ent = new \Blendle\Client\StandardClient(new \Blendle\Options\StandardBlendleOptions());
$response = $client->send(new \Blendle\Request\RealtimeRequest());
foreach($response->getItem() as $items) {
print_r($items->getTitle());
}
ent = new \Blendle\Client\StandardClient(new \Blendle\Options\StandardBlendleOptions());
$item = new \Blendle\Model\Item();
$item->setId('bnl-trn-20140705-3353927');
$request = new \Blendle\Request\ItemRequest();
$request->setItem($item);
// Authorization to read the whole article?
// Default the Authorization Token will be saved in a cookie after the AuthRequest
$request->setAuthorization(new \Blendle\Model\Authorization());
$response = $client->send($request);
print_r($response->getTitle());
ent = new \Blendle\Client\StandardClient(new \Blendle\Options\StandardBlendleOptions());
$request = new \Blendle\Request\UserPostsRequest();
$request->setUsername('marten');
$response = $client->send($request);
foreach($response->getItem() as $items) {
print_r($items->getTitle());
}
ions = new \Blendle\Options\StandardBlendleOptions();
$options->setBaseUrl('https://internal.blendle.nl');
$options->setMeUrl('https://internal.blendle.nl/me');
$options->setTokensUrl('https://internal.blendle.nl/tokens');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.