PHP code example of muumuu-domain / muumuu.php

1. Go to this page and download the library: Download muumuu-domain/muumuu.php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

muumuu-domain / muumuu.php example snippets



uu\Client::configure([
    'endpoint' => 'MUUMUU DOMAIN API ENDPOINT',
]);

$client = new Muumuu\Client();
$response = $client->getDomainMaster();

$response->statusCode();  // 200
$response->body();        // JSON body


$client = new Muumuu\Client([
    'endpoint' => 'MUUMUU DOMAIN API ENDPOINT',
]);
$response = $client->getDomainMaster();
$response->body();


$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();


$client = new Muumuu\Client();

// authenticate
$client->authenticate('id', 'password');  // POST /authenticate
$client->me();                            // GET /me

// without authentication
$client->getDomainMaster();               // GET /domain_master

//