traviskuhl/hn-php

This package is abandoned and no longer maintained. No replacement package was suggested.

HackerNews PHP Client

dev-master 2014-10-09 15:44 UTC

This package is not auto-updated.

Last update: 2022-07-04 16:10:11 UTC


README

Build Status

https://github.com/HackerNews/API

Use

{
    "require": {
        "traviskuhl/hn-php": "dev-master"
    }
}

Example

 $client = new hn\Client();

 // fetch a story
 $story = $client->item(8243523);
 echo $story->title; // Yahoo stopping all new development of YUI

 // same for a poll
 $poll = $client->item(126809);
 echo $poll->title; // Poll: What would happen if News.YC had explicit support for polls?

 // fetch a user
 $user = $client->user('pg');
 echo $user->bio; // Bug fixer.