for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/** Namespace */
namespace MatheusBastos\CafeApi;
/**
* Me Api class
* @package MatheusBastos\CafeApi
*/
class Me extends CafeApi
{
* Me constructor
* @param string $api_url
* @param string $email
* @param string $password
public function __construct(string $api_url, string $email, string $password)
parent::__construct($api_url, $email, $password);
}
* Me
* @return Me
public function me(): Me
$this->request('GET', '/me');
return $this;
* Update
* @param array $fields
public function update(array $fields): Me
$this->request('PUT', '/me', $fields);
* Photo
* @param array $files
public function photo(array $files): Me
$this->request('POST', '/me/photo', [
'files' => true,
'photo' => curl_file_create($files['tmp_name'], $files['type']),
]);