| @@ 36-49 (lines=14) @@ | ||
| 33 | /** |
|
| 34 | * @method __construct |
|
| 35 | */ |
|
| 36 | public function __construct(string $username, string $passwordApi, string $idSite='') |
|
| 37 | { |
|
| 38 | $this->_network = new \Oara\Network\Publisher\CommissionJunction; |
|
| 39 | $this->_username = $username; |
|
| 40 | $this->_password = $passwordApi; |
|
| 41 | $this->_passwordApi = $passwordApi; |
|
| 42 | $idSite = $this->_website_id; |
|
| 43 | ||
| 44 | if (trim($idSite)!=''){ |
|
| 45 | $this->addAllowedSite($idSite); |
|
| 46 | } |
|
| 47 | ||
| 48 | $this->login( $this->_username, $this->_password ,$this->_website_id); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * @return bool |
|
| @@ 35-46 (lines=12) @@ | ||
| 32 | /** |
|
| 33 | * @method __construct |
|
| 34 | */ |
|
| 35 | public function __construct(string $username, string $password, string $idSite = '', string $country = '') |
|
| 36 | { |
|
| 37 | $this->_network = new \Oara\Network\Publisher\Skimlinks; |
|
| 38 | $this->_username = $username; |
|
| 39 | $this->_password = $password; |
|
| 40 | $this->login( $this->_username, $this->_password, $idSite, $this->_country); |
|
| 41 | $this->_apiClient = null; |
|
| 42 | ||
| 43 | if (trim($idSite)!=''){ |
|
| 44 | $this->addAllowedSite($idSite); |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||
| 48 | public function login(string $username, string $password, string $idSite = '', string $country = ''): bool{ |
|
| 49 | $this->_logged = false; |
|