mcred/FeedMeNow-PHP

View on GitHub
src/FeedMeNow/Api/Provider.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace FeedMeNow\Api;

use Webmozart\Assert\Assert;
use FeedMeNow\Mapper\ProviderMapper;
use Psr\Http\Message\ResponseInterface;

class Provider extends HttpApi
{
    public function get($address)
    {
        Assert::stringNotEmpty($address);
        $params = [
            'address' => $address
        ];
        $response = $this->httpGet('providers', $params);
        return $this->hydrateResponse($response, ProviderMapper::class);
    }
}