GdtAdapter.php 852 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace app\adapter;
  3. // 广点通-适配器
  4. use GuzzleHttp\Client;
  5. class GdtAdapter
  6. {
  7. public function OAuth($info)
  8. {
  9. // 执行验证callback, 返回授权后的字段,跟数据库对应
  10. return [
  11. "advertiser_id" => "",
  12. "advertiser_name" => "",
  13. "access_token" => "",
  14. "refresh_token" => "",
  15. "expire_time" => "",
  16. ];
  17. }
  18. // 获取子账号列表
  19. public function getSubAccounts($pmid)
  20. {
  21. }
  22. // 刷新 token
  23. public function refreshToken($pmid)
  24. {
  25. }
  26. // 获取小时消耗
  27. public function getHourlyCost($advertiserId, $accessToken, $date): array
  28. {
  29. return [];
  30. }
  31. // 获取媒体消耗
  32. public function getVideoCost($advertiserId, $accessToken, $date): array
  33. {
  34. return [];
  35. }
  36. }