<commit_before><?php namespace Paxx\Telldus;

use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Subscriber\Oauth\Oauth1;
use Paxx\Telldus\Api\BaseApi;
use Paxx\Telldus\Exception\ApiException;

class Api extends BaseApi {
    const ENDPOINT = 'http://api.telldus.com/json/';

    private $identifier;
    private $secret;
    private $token;
    private $token_secret;

    private $client;

    private $required_params = array(
        'identifier',
        'secret',
        'user_identifier',
        'user_secret',
    );

    public function __construct(array $params = array()) {
        $this->hydrateParams($params);

        $config = array(
            'consumer_key'    => $this->identifier,
            'consumer_secret' => $this->secret,
            'token'           => $this->token,
            'token_secret'    => $this->token_secret,
            'request_method'  => 'query'
        );

        // Create a stack so we can add the oauth-subscriber
        $stack = HandlerStack::create();
        $stack->push(new Oauth1($config));

        $this->client = new Client([
            'base_uri' => static::ENDPOINT,<commit_msg>I can't believe I didn't notice this. Stupid mistake fixed<commit_after><?php namespace Paxx\Telldus;

use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Subscriber\Oauth\Oauth1;
use Paxx\Telldus\Api\BaseApi;
use Paxx\Telldus\Exception\ApiException;

class Api extends BaseApi {
    const ENDPOINT = 'http://api.telldus.com/json/';

    private $identifier;
    private $secret;
    private $user_identifier;
    private $user_secret;

    private $client;

    private $required_params = array(
        'identifier',
        'secret',
        'user_identifier',
        'user_secret',
    );

    public function __construct(array $params = array()) {
        $this->hydrateParams($params);

        $config = array(
            'consumer_key'    => $this->identifier,
            'consumer_secret' => $this->secret,
            'token'           => $this->user_identifier,
            'token_secret'    => $this->user_secret,
            'request_method'  => 'query'
        );

        // Create a stack so we can add the oauth-subscriber
        $stack = HandlerStack::create();
        $stack->push(new Oauth1($config));

        $this->client = new Client([
            'base_uri' => static::ENDPOINT,
{'fraction_non_alphanumeric': 0.12722751761292997, 'fraction_numerical': 0.0016576875259013675, 'mean_word_length': 2.4834054834054835, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6240848', 'n_tokens_mistral': 752, 'n_tokens_neox': 719, 'n_words': 158}