PHP code example of xvilo / hackernews-client

1. Go to this page and download the library: Download xvilo/hackernews-client 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/ */

    

xvilo / hackernews-client example snippets



declare(strict_types=1);   

// This file is generated by Composer
 Call endpoint
var_dump(
    $client->item()->getItem(8863)
);

//array(9) {
//    'by' =>
//    string(8) "dhouston"
//    'descendants' =>
//    int(71)
//    'id' =>
//    int(8863)
//    [...]


xvilo/hackernews-client 1.0.0