xerotic

HF API v2 Field List

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