Skip to content

Commit

Permalink
Merge pull request #16 from ok6245/ok6245-create-wrapper-version-2.1.0
Browse files Browse the repository at this point in the history
Update PHP wrapper version number to 2.1.0
  • Loading branch information
bradbarkhouse authored Jan 8, 2023
2 parents e939b16 + 83941fc commit 0baa3ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Free for Non-Commercial Use.
Using composer, simply add it to the "require" section of your composer.json:

"require": {
"mysportsfeeds/mysportsfeeds-php": ">=2.0.0"
"mysportsfeeds/mysportsfeeds-php": ">=2.1.0"
}

If you haven't signed up for API access, do so here [https://www.mysportsfeeds.com/index.php/register/](https://www.mysportsfeeds.com/index.php/register/)
Expand Down
12 changes: 6 additions & 6 deletions src/MySportsFeeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@

class MySportsFeeds {

public $buildVersion = "2.0.0";
public $buildVersion = "2.1.0"; // PHP Wrapper version

private $version;
private $api_version;
private $verbose;
private $storeType;
private $storeLocation;

private $apiInstance;

public function __construct($version = "1.2", $verbose = false, $storeType = "file",
public function __construct($api_version = "1.2", $verbose = false, $storeType = "file",
$storeLocation = "results/") {

$this->__verifyStore($storeType, $storeLocation);

$this->version = $version;
$this->api_version = $api_version;
$this->verbose = $verbose;
$this->storeType = $storeType;
$this->storeLocation = $storeLocation;
$this->apiInstance = ApiFactory::create($this->version, $this->verbose, $this->storeType, $this->storeLocation);
$this->apiInstance = ApiFactory::create($this->api_version, $this->verbose, $this->storeType, $this->storeLocation);
}

# Verify the type and location of the stored data
Expand All @@ -46,7 +46,7 @@ private function __verifyStore($storeType, $storeLocation) {
# Authenticate against the API (for v1.x, v2.x)
public function authenticate($apikey, $password) {
if ( !$this->apiInstance->supportsBasicAuth() ) {
throw new \ErrorException("BASIC authentication not supported for version " + $this->version);
throw new \ErrorException("BASIC authentication not supported for API version " + $this->api_version);
}

$this->apiInstance->setAuthCredentials($apikey, $password);
Expand Down

0 comments on commit 0baa3ef

Please sign in to comment.