Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pepabo/muumuu.php

🐘 API Client for MuumuuDomain.
https://github.com/pepabo/muumuu.php

client muumuu-domain php

Last synced: about 1 month ago
JSON representation

🐘 API Client for MuumuuDomain.

Awesome Lists containing this project

README

        

# muumuu.php

API Client for MuumuuDomain.

[![Build Status](https://travis-ci.org/pepabo/muumuu.php.svg?branch=master)](https://travis-ci.org/pepabo/muumuu.php)

## Installation

```console
$ composer require muumuu-domain/muumuu.php
```

## Usage

```php
'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
'MUUMUU DOMAIN API ENDPOINT',
]);
$response = $client->getDomainMaster();
$response->body();
```

Authentication with JWT.

```php
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
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
```