awe/blacklabel

awe blacklabel PHP SDK

dev-master 2020-09-02 06:04 UTC

This package is auto-updated.

Last update: 2024-09-08 18:29:26 UTC


README

StyleCI

AWE PHP SDK 是 AWEmpire API 提供的 blacklabel API 的 PHP 封装,AWEmpire API

要求

  • PHP: >=7.1
  • phpunit/phpunit: 6.* (开发)

设置

方法

实例化

 $this->config = [
            'clientIP'         => '104.198.14.52',
            'applicationSecret'=> 'secret goes here',
            'userAgent'        => 'Gecko',
            'language'         => 'en',
            'whiteLabelURL'    => 'URL goes here',
          ];
$this->SDKInstance = new SDK($this->config);

getPerformers

获取模型的个人资料。例如

$output = $this
            ->SDKInstance
              ->getPerformers(['pageSize' => 10, 'category' => 'girls']);

getMorePerformers

获取更多模型的个人资料。例如

$output = $this
            ->SDKInstance
              ->getMorePerformers($performer['data']['listPageId']);

getPerformerDetailsByName

获取特定模型的更多个人资料。例如

$output = $this
            ->SDKInstance
              ->getPerformerDetailsByName('MaiRare');

getPerformerAlbum

获取模型的专辑内容。例如

$output = $this
            ->SDKInstance
              ->getPerformerAlbum('PrivateObsession', ['type' => 'image', 'privacy' => 'exclusive']);

getPerformerVideos

获取模型的视频内容。例如

coming soon ...

getAlbumItem

获取模型的专辑内容。例如

$output = $this
            ->SDKInstance
              ->getAlbumItem('PrivateObsession', '5c897e0136b31ae756dc3afd');

generalSearch

搜索模型。例如

$output = $this
            ->SDKInstance
              ->generalSearch('adeleB');

getFilterList

获取类别和筛选列表。例如

$output = $this
            ->SDKInstance
              ->getFilterList();

setLanguage

更改返回数据的语言。例如

$output = $this
            ->SDKInstance
              ->setLanguage('fr');

refreshSession

刷新和重用已过期的会话。例如

$output = $this
            ->SDKInstance
              ->refreshSession('<session goes here>');

setSession

对于需要成员会话的请求,如 updateUser 方法,您必须使用 authenticateUser 返回的内容设置会话。例如

$output = $this
            ->SDKInstance
             ->setSession('<session goes here>');

getPerformerRecommendations

例如

 $output = $this
            ->SDKInstance
              ->getPerformerRecommendations('girls');

authenticateUser

认证用户并返回购买 URL。例如

$output = $this
            ->SDKInstance
              ->authenticateUser(['partnerUserId' => '101', 'displayName' => 'John Doe', 'email' => 'test@test.com']);

updateUser

更新成员用户的资料。例如

$output = $this
            ->SDKInstance
             ->updateUser(['partnerUserId' => '8689', 'displayName' => 'John Doe', 'email' => 'test@test.com']);

getChatScript

例如

  $response = $SDKInstance->getChatscript("AdeleBlake", "vid", 'g5679b10435a7ff3449c76e44aa1d27a1',
        $primaryButtonBg = null, $primaryButtonColor = null, $inputBg = null, $inputColor = null);

运行测试

  • cd src
  • $ cp tests/.env-example tests/.env (更改凭据)
  • ./vendor/phpunit/phpunit/phpunit tests/test.php

待办事项

  • 添加购买方法
  • 测试用户更新
  • 测试会话刷新
  • 测试 getPerformerVideos
  • 记录 getPerformerVideos

支持

如果您需要关于 SDK 的帮助,请联系您的账户经理 :)