<?php require_once '../vendor/autoload.php'; require_once '../src/Rapid/Photos.php'; require_once '../src/Rapid/Rapid.php'; require_once '../src/Rapid/Response.php'; use Rapid\Rapid; use Rapid\Photos; Rapid::init("5b107695161b40780be8e1d3e4c17da4c8820244"); ////GET ALL ALBUMS //echo "<h3>GET ALL ALBUMS</h3>"; //$response = Photos::getAlbums(); //print_r($response->headers()); // //echo "<br/>"; // //echo $response->paginate(); // //foreach ($response->data() as $response) { // echo "<hr/>"; // echo $response->_id . "<br/>"; // echo $response->title . "<br/>"; // echo "<hr/>"; //} ////GET ALL BY ALBUM //echo "<h3>GET ALL By Album Example</h3>"; //$response = Photos::getAllByAlbum("first-album"); //print_r($response->headers()); // //echo "<br/>"; //
<?php require_once '../vendor/autoload.php'; require_once '../src/Rapid/News.php'; require_once '../src/Rapid/Rapid.php'; require_once '../src/Rapid/Response.php'; use Rapid\Rapid; use Rapid\News; Rapid::init("c09488fe9421b97eff3cbfeaa553db8f034777bb"); ////GET ALL CATEGORIES //echo "<h3>GET ALL CATEGORIES</h3>"; //$response = News::getCategories(); //print_r($response->headers()); // //echo "<br/>"; // //echo $response->paginate(); // //foreach ($response->data() as $response) { // echo "<hr/>"; // echo $response->_id . "<br/>"; // echo $response->title . "<br/>"; // echo "<hr/>"; //} //GET ALL BY CATEGORY echo "<h3>GET ALL By Category Example</h3>"; $response = News::getAllByCategory("test-1", ['test' => 'in:xxxtt,dede', 'title' => 'my fourth poST']); print_r($response->headers()); echo "<br/>"; echo $response->paginate(); foreach ($response->data() as $response) {