public function makeRequest($method, $endpoint, array $data = [])
    {
        $response = $this->client->request($method, $endpoint, $data);

        return json_decode((string) $response->getBody());
    }
public function makeRequest($method, $endpoint, array $data = [])
    {
        $response = $this->client->request($method, $endpoint, $data);

        return json_decode((string) $response->getBody());
    }
public function makeRequest ( $ method , $ endpoint , array $ data = [ ] ) { $ response = $ this -> client -> request ( $ method , $ endpoint , $ data ) ; return json_decode ( ( string ) $ response -> getBody ( ) ) ; }
Make a request to medium's api.

@param string $method
@param string $endpoint
@param array $data

@return StdClass
Make a request to medium s api .