muumuu-domain / muumuu.php
API Client for MuumuuDomain.
Installs: 6 365
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 23
Forks: 0
Open Issues: 0
Requires
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.11
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2024-12-04 09:07:58 UTC
README
API Client for MuumuuDomain.
Installation
$ composer require muumuu-domain/muumuu.php
Usage
<?php require_once 'vendor/autoload.php'; Muumuu\Client::configure([ 'endpoint' => 'MUUMUU DOMAIN API ENDPOINT', ]); $client = new Muumuu\Client(); $response = $client->getDomainMaster(); $response->statusCode(); // 200 $response->body(); // JSON body
Possible to specify it with constructor arguments.
<?php $client = new Muumuu\Client([ 'endpoint' => 'MUUMUU DOMAIN API ENDPOINT', ]); $response = $client->getDomainMaster(); $response->body();
Authentication with JWT.
<?php $client = new Muumuu\Client(); if ($client->authenticate('id' /* muumuu id */, 'password' /* login password */)) { $client->getCarts(); } // get token $client = new Muumuu\Client(); if ($client->authenticate('id', 'password')) { $token = $client->getToken(); } // set token $client = new Muumuu\Client(); $client->setToken($token); $client->getCarts();
Support APIs
<?php $client = new Muumuu\Client(); // authenticate $client->authenticate('id', 'password'); // POST /authenticate $client->me(); // GET /me // without authentication $client->getDomainMaster(); // GET /domain_master // required authentication $client->getCarts(); // GET /carts $client->calculate([]); // POST /calculate $client->createWordpress([]); // POST /wordpress