Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once "hf_api.php";
- // Initialize api instance
- $api = new HF_API();
- // Set the access token for the specific authorized member
- $api->setAccessToken("ACCESS_TOKEN_HERE");
- // What data do we want to retrieve from the API? Send an array and process the call.
- $read = $api->read([
- "me" => [ // Basic Info & Advanced Info Permissions
- 'uid',
- 'username',
- 'usergroup',
- 'displaygroup',
- 'additionalgroups',
- 'postnum',
- 'awards',
- 'myps',
- 'threadnum',
- 'avatar',
- 'avatardimensions',
- 'avatartype',
- 'lastvisit',
- 'usertitle',
- 'website',
- 'timeonline',
- 'reputation',
- 'referrals',
- 'lastactive',
- 'unreadpms',
- 'invisible',
- 'totalpms',
- 'warningpoints',
- 'lastactive', // Advanced Info Permission Only
- 'unreadpms', // Advanced Info Permission Only
- 'invisible', // Advanced Info Permission Only
- 'totalpms', // Advanced Info Permission Only
- 'warningpoints' // Advanced Info Permission Only
- ],
- "forums" => [ // Posts Permissions
- 'fid',
- 'name',
- 'description',
- 'type',
- ],
- "threads" => [ // Posts Permissions
- 'tid',
- 'uid',
- 'fid',
- 'subject',
- 'closed',
- 'numreplies',
- 'views',
- 'dateline',
- 'firstpost',
- 'lastpost',
- 'lastposter',
- 'lastposteruid',
- 'prefix',
- 'icon',
- 'poll',
- 'username',
- 'sticky',
- 'bestpid',
- 'firstpost' => [
- '<Post>',
- ]
- ],
- "posts" => [ // Posts Permissions
- 'pid',
- 'tid',
- 'uid',
- 'fid',
- 'dateline',
- 'message',
- 'subject',
- 'edituid',
- 'edittime',
- 'editreason',
- 'author' => [
- '<User>',
- ],
- ],
- "users" => [ // Users Permissions
- 'uid',
- 'username',
- 'usergroup',
- 'displaygroup',
- 'additionalgroups',
- 'postnum',
- 'awards',
- 'myps',
- 'threadnum',
- 'avatar',
- 'avatardimensions',
- 'avatartype',
- 'usertitle',
- 'website',
- 'timeonline',
- 'reputation',
- 'referrals'
- ]
- ]);
Add Comment
Please, Sign In to add comment