xerotic

HF API v2 Field List

Jun 9th, 2020
2,187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.23 KB | None | 0 0
  1. <?php
  2.  
  3. require_once "hf_api.php";
  4.  
  5. // Initialize api instance
  6. $api = new HF_API();
  7.  
  8. // Set the access token for the specific authorized member
  9. $api->setAccessToken("ACCESS_TOKEN_HERE");
  10.  
  11. // What data do we want to retrieve from the API? Send an array and process the call.
  12. $read = $api->read([
  13.     "me" => [ // Basic Info & Advanced Info Permissions
  14.         'vault' => true, // API Client Vault Balance
  15.         'uid' => true,
  16.         'username' => true,
  17.         'usergroup' => true,
  18.         'displaygroup' => true,
  19.         'additionalgroups' => true,
  20.         'postnum' => true,
  21.         'awards' => true,
  22.         'bytes' => true,
  23.         'threadnum' => true,
  24.         'avatar' => true,
  25.         'avatardimensions' => true,
  26.         'avatartype' => true,
  27.         'lastvisit' => true,
  28.         'usertitle' => true,
  29.         'website' => true,
  30.         'timeonline' => true,
  31.         'reputation' => true,
  32.         'referrals' => true,
  33.         'lastactive' => true,
  34.         'unreadpms' => true,
  35.         'invisible' => true,
  36.         'totalpms' => true,
  37.         'warningpoints' => true,
  38.         'lastactive' => true, // Advanced Info Permission Only
  39.         'unreadpms' => true, // Advanced Info Permission Only
  40.         'invisible' => true, // Advanced Info Permission Only
  41.         'totalpms' => true, // Advanced Info Permission Only
  42.         'warningpoints' => true // Advanced Info Permission Only
  43.     ],
  44.     "forums" => [ // Posts Permissions
  45.         '_fid' => [25],
  46.         'fid' => true,
  47.         'name' => true,
  48.         'description' => true,
  49.         'type' => true
  50.     ],
  51.     "threads" => [ // Posts Permissions
  52.         '_tid' => [6083719],
  53.         'tid' => true,
  54.         'uid' => true,
  55.         'fid' => true,
  56.         'subject' => true,
  57.         'closed' => true,
  58.         'numreplies' => true,
  59.         'views' => true,
  60.         'dateline' => true,
  61.         'firstpost' => true,
  62.         'lastpost' => true,
  63.         'lastposter' => true,
  64.         'lastposteruid' => true,
  65.         'prefix' => true,
  66.         'icon' => true,
  67.         'poll' => true,
  68.         'username' => true,
  69.         'sticky' => true,
  70.         'bestpid' => true,
  71.         'firstpost' => [
  72.             // '<Post>',
  73.         ]
  74.     ],
  75.     "posts" => [ // Posts Permissions
  76.         '_pid' => [59852261],
  77.         'pid' => true,
  78.         'tid' => true,
  79.         'uid' => true,
  80.         'fid' => true,
  81.         'dateline' => true,
  82.         'message' => true,
  83.         'subject' => true,
  84.         'edituid' => true,
  85.         'edittime' => true,
  86.         'editreason' => true,
  87.         'author' => [
  88.             // '<User>',
  89.         ],
  90.     ],
  91.     "users" => [ // Users Permissions
  92.         '_uid' => [42221],
  93.         'uid' => true,
  94.         'username' => true,
  95.         'usergroup' => true,
  96.         'displaygroup' => true,
  97.         'additionalgroups' => true,
  98.         'postnum' => true,
  99.         'awards' => true,
  100.         'myps' => true,
  101.         'threadnum' => true,
  102.         'avatar' => true,
  103.         'avatardimensions' => true,
  104.         'avatartype' => true,
  105.         'usertitle' => true,
  106.         'website' => true,
  107.         'timeonline' => true,
  108.         'reputation' => true,
  109.         'referrals' => true
  110.     ],
  111.     "bytes" => [ // Bytes Permissions
  112.         '_id' => [123], // Access directly by ID...
  113.         '_uid' => [123], // ...or search by UID and optional _page/_perpage parameters
  114.         '_from' => [123], // ...or search by FROM UID and optional _page/_perpage parameters
  115.         '_to' => [123], // ...or search by TO UID and optional _page/_perpage parameters
  116.         '_page' => [123],
  117.         '_perpage' => [123],
  118.         'id',
  119.         'amount',
  120.         'dateline',
  121.         'type',
  122.         'reason',
  123.         'from' => [
  124.             // '<User>',
  125.         ],
  126.         'to' => [
  127.             // '<User>',
  128.         ],
  129.         'post' => [
  130.             // '<Post>'
  131.         ]
  132.     ],
  133.     "contracts" => [ // Contracts Permissions
  134.         '_cid' => [123], // Access directly by Contract ID...
  135.         '_uid' => [123], // ...or search by UID and optional _page/_perpage parameters
  136.         '_page' => [123],
  137.         '_perpage' => [123],
  138.         'cid',
  139.         'dateline',
  140.         'otherdateline',
  141.         'public',
  142.         'timeout_days',
  143.         'timeout',
  144.         'status',
  145.         'istatus',
  146.         'ostatus',
  147.         'cancelstatus',
  148.         'type',
  149.         'tid',
  150.         'inituid',
  151.         'otheruid',
  152.         'muid',
  153.         'iprice',
  154.         'oprice',
  155.         'iproduct',
  156.         'oproduct',
  157.         'icurrency',
  158.         'ocurrency',
  159.         'terms',
  160.         'template_id',
  161.         'oaddress',
  162.         'iaddress',
  163.         'inituser' => [
  164.             // '<User>',
  165.         ],
  166.         'otheruser' => [
  167.             // '<User>',
  168.         ],
  169.         'escrow' => [
  170.             // '<User>',
  171.         ],
  172.         'thread' => [
  173.             // '<Thread>',
  174.         ],
  175.         'idispute' => [
  176.             // '<Dispute>'
  177.         ],
  178.         'odispute' => [
  179.             // '<Dispute>'
  180.         ],
  181.         'ibrating' => [
  182.             // '<Brating>'
  183.         ],
  184.         'obrating' => [
  185.             // '<Brating>'
  186.         ]
  187.     ],
  188.     "disputes" => [ // Contracts Permissions
  189.         '_cdid' => [123], // Access directly by Dispute ID...
  190.         '_cid' => [123], // ...or search by Contract ID...
  191.         '_uid' => [123], // ...or search by UID and optional _page/_perpage parameters
  192.         '_claimantuid' => [123], // ...or search by Claimant UID and optional _page/_perpage parameters
  193.         '_defendantuid' => [123], // ...or search by Defendant UID and optional _page/_perpage parameters
  194.         '_page' => [123],
  195.         '_perpage' => [123],
  196.         'cdid',
  197.         'contractid',
  198.         'claimantuid',
  199.         'defendantuid',
  200.         'dateline',
  201.         'status',
  202.         'dispute_tid',
  203.         'claimantnotes',
  204.         'defendantnotes',
  205.         'contract' => [
  206.             // '<Contract>',
  207.         ],
  208.         'claimant' => [
  209.             // '<User>',
  210.         ],
  211.         'defendant' => [
  212.             // '<User>',
  213.         ],
  214.         'dispute_thread' => [
  215.             // '<Thread>',
  216.         ]
  217.     ],
  218.     "bratings" => [ // Contracts Permissions
  219.         '_crid' => [123], // Access directly by Brating ID...
  220.         '_cid' => [123], // ...or search by Contract ID...
  221.         '_uid' => [123], // ...or search by UID and optional _page/_perpage parameters
  222.         '_from' => [123], // ...or search by FROM UID and optional _page/_perpage parameters
  223.         '_to' => [123], // ...or search by TO UID and optional _page/_perpage parameters
  224.         '_page' => [123],
  225.         '_perpage' => [123],
  226.         'crid',
  227.         'contractid',
  228.         'fromid',
  229.         'toid',
  230.         'dateline',
  231.         'amount',
  232.         'message',
  233.         'contract' => [
  234.             // '<Contract>',
  235.         ],
  236.         'from' => [
  237.             // '<User>',
  238.         ],
  239.         'to' => [
  240.             // '<User>',
  241.         ]
  242.     ]
  243. ]);
Add Comment
Please, Sign In to add comment