cego / player-account-client
A library for interacting the player-account service.
Installs: 3 158
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- ext-json: *
- cego/service-client-base: ^0.1.1
- guzzlehttp/guzzle: ^6.5.5|^7.0.1
- illuminate/support: ^7.0|^8.0
- nbj/property-container: ^1.4.0
- nesbot/carbon: ^2.17
- vlucas/phpdotenv: ^5.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.4
- orchestra/testbench: ^6.13
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^9.0
Suggests
- cego/request-insurance: Allows for sending asynchronous requests
- dev-master
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.0
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-mawo/add-sent-mail-endpoint
- dev-niza/add-batch-endpoints
- dev-niza/add-user-show-endpoint
- dev-niza/add-paginated-user-endpoint
- dev-niza/add-sent_at-to-incident-method
- dev-thwo/update-readme
- dev-thwo/flag-endpoint
- dev-thwo/refactor-calls
- dev-thwo/use-payload-instead-of-function-params
This package is auto-updated.
Last update: 2022-01-22 09:41:49 UTC
README
This package is used as a standardized way to communicate with the Player Account service. The client implements a fluent interface.
Client setup
// Getting a client instance $playerAccount = PlayerAccount::create($playerAccountBaseURL); // Setting basic auth credentials $playerAccount->auth($username, $password); // Telling the client to use Request Insurance $playerAccount->useRequestInsurance();
Usage
// Updating attributes of a user $playerAccount->update($userId, [ 'admin_user_id' => 123, 'user_attribute_1' => 'Becomes this', 'user_attribute_2' => 'Becomes that' ]); // Adding a flag to a user $playerAccount->addFlag($userId, [ 'type' => 'TheFlagType', 'admin_user_id' => 123, 'reason' => 'The player needs the flag' ]); // Removing a flag from a user $playerAccount->removeFlag($userId, [ 'type' => 'TheFlagType', 'admin_user_id' => 123, 'reason' => 'The player must have the flag removed' ]); // Triggering a user incident $playerAccount->incident($userId, [ 'type' => 'TheIncidentType', 'admin_user_id' => 123, 'reason' => 'Something happened that triggered the incident' ]);
Project was initially created by:
- Thomas Wogelius (THWO)