<commit_before><?php

/**
 * FurryBear
 * 
 * PHP Version 5.3
 * 
 * @category Congress_API
 * @package  FurryBear
 * @author   lobostome <<EMAIL>>
 * @license  http://opensource.org/licenses/MIT MIT License
 * @link     https://github.com/lobostome/FurryBear
 */

namespace FurryBear\Provider;

use FurryBear\HttpAdapter\HttpAdapterInterface;

/**
 * A concrete provider based on Sunlight Foundation Congress API v3.
 * 
 * @category Congress_API
 * @package  FurryBear
 * @author   lobostome <<EMAIL>>
 * @license  http://opensource.org/licenses/MIT MIT License
 * @link     http://sunlightlabs.github.com/congress/
 */
class SunlightFoundationProvider extends AbstractProvider
{
    /**
     * The domain of the API.
     */
    const SERVICE_URL = 'http://congress.api.sunlightfoundation.com';
    
    /**
     * The resource directory.
     */
    const RESOURCE_DIR = 'SunlightFoundation';
    
    /**
     * The Sunlight API key.
     * 
     * @var string
     */
    protected $apiKey;
    
    /**
     * Construct the provider and bind to a HTTP adapter.
     * 
     * @param \FurryBear\HttpAdapter\HttpAdapterInterface $adapter The HTTP adapter
     * @param string                                      $apiKey  The service API key.
     */
    public function __construct(HttpAdapterInterface $adapter, $apiKey)
    {
        parent::__construct($adapter);
        $this->apiKey = $apiKey;
    }
    
    /**
     * Get the domain of the API.
     * 
     * @return string
     */
    public function getServiceUrl()
    {
        return self::SERVICE_URL;
    }
    
    /**
     * Set the API key.
     * <commit_msg>Set default empty string for api key of SunlightFoundationProvider<commit_after><?php

/**
 * FurryBear
 * 
 * PHP Version 5.3
 * 
 * @category Congress_API
 * @package  FurryBear
 * @author   lobostome <<EMAIL>>
 * @license  http://opensource.org/licenses/MIT MIT License
 * @link     https://github.com/lobostome/FurryBear
 */

namespace FurryBear\Provider;

use FurryBear\HttpAdapter\HttpAdapterInterface;

/**
 * A concrete provider based on Sunlight Foundation Congress API v3.
 * 
 * @category Congress_API
 * @package  FurryBear
 * @author   lobostome <<EMAIL>>
 * @license  http://opensource.org/licenses/MIT MIT License
 * @link     http://sunlightlabs.github.com/congress/
 */
class SunlightFoundationProvider extends AbstractProvider
{
    /**
     * The domain of the API.
     */
    const SERVICE_URL = 'http://congress.api.sunlightfoundation.com';
    
    /**
     * The resource directory.
     */
    const RESOURCE_DIR = 'SunlightFoundation';
    
    /**
     * The Sunlight API key.
     * 
     * @var string
     */
    protected $apiKey = '';
    
    /**
     * Construct the provider and bind to a HTTP adapter.
     * 
     * @param \FurryBear\HttpAdapter\HttpAdapterInterface $adapter The HTTP adapter
     * @param string                                      $apiKey  The service API key.
     */
    public function __construct(HttpAdapterInterface $adapter, $apiKey)
    {
        parent::__construct($adapter);
        $this->apiKey = $apiKey;
    }
    
    /**
     * Get the domain of the API.
     * 
     * @return string
     */
    public function getServiceUrl()
    {
        return self::SERVICE_URL;
    }
    
    /**
     * Set the API key.
     * 
{'fraction_non_alphanumeric': 0.1102764423076923, 'fraction_numerical': 0.0018028846153846155, 'mean_word_length': 2.2040423484119347, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7054850', 'n_tokens_mistral': 1016, 'n_tokens_neox': 1001, 'n_words': 244}