Skip to content

newQuery/hf-php-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hackforums API PHP Client

Hackforums API PHP Client by newQuery from the Sociopaths

Requirements

Supported endpoints

  • User info (GET /user/:id)
  • Multiple users info (GET /users/:ids)
  • Forum navigation (GET /category/:id)
  • Forum info (GET /forum/:id)
  • Thread info (GET /thread/:id)
  • Post info (GET /post/:id)
  • Private message info (GET /pm/:id)
  • List of PMs in inbox and other pm boxes (GET /pmbox/:id or GET /inbox)
  • Group info (GET /group/:id)
  • Get total of inbox (custom)

Install

composer require newquery/hf-php-client

Usage

Initialize client
<?php

require 'vendor/autoload.php';

$client = new \HFClient\Client("YOUR_API_KEY");
Get total pm
$totalInbox = $client->getTotalInbox()
Get user infos
$user = $client->getUser(2602549);
Get users infos
$users = $client->getUsers([2602549, 2015410]);
Get inbox
$user = $client->inbox();
Get thread
$thread = $client->getThread(6018226);
Get post
$post = $client->getPost(59077447);
Get group
$sociopaths = $client->getGroup(49);
Get forum
$phpSubForum = $client->getForum(154);