awe/blacklabel

awe blacklabel PHP SDK

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

This package is auto-updated.

Last update: 2024-04-08 17:36:50 UTC


README

StyleCI

The AWE PHP SDK is a PHP wrapper for the blacklabel API offering of AWEmpire API.

Requirements

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

Setup

Methods

Instantiation

 $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

Fetch the bios of models. EG:

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

getMorePerformers

Get extra model bios. EG:

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

getPerformerDetailsByName

Get more bio details of a specific model. EG:

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

getPerformerAlbum

Get album content of a model. EG:

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

getPerformerVideos

Get video only content of model EG:

coming soon ...

getAlbumItem

Get Album content of model. EG:

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

generalSearch

Search for models. EG:

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

getFilterList

Get list of categories and filters EG:

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

setLanguage

Change the language for data sent back EG:

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

refreshSession

Refresh and reuse an expired session. EG:

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

setSession

For requests where member sessions are required like the updateUser method you will have to set the session with what you get back from authenticateUser. EG:

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

getPerformerRecommendations

EG:

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

authenticateUser

Authenticate user and get back a purchase URL. EG:

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

updateUser

Update a member users profile. EG:

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

getChatScript

EG:

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

Run test

  • cd src
  • $ cp tests/.env-example tests/.env (Change credentials)
  • ./vendor/phpunit/phpunit/phpunit tests/test.php

TODO

  • Add puchase method
  • Test user update
  • Test session refresh
  • Test getPerformerVideos
  • Document getPerformerVideos

Support

Incase you need help with the SDK please contact your account manager :)