-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
191 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace GW2Treasures\GW2Api\V2\Endpoint\Account; | ||
|
||
use GW2Treasures\GW2Api\GW2Api; | ||
use GW2Treasures\GW2Api\V2\Authentication\AuthenticatedEndpoint; | ||
use GW2Treasures\GW2Api\V2\Authentication\IAuthenticatedEndpoint; | ||
use GW2Treasures\GW2Api\V2\Endpoint; | ||
|
||
class BankEndpoint extends Endpoint implements IAuthenticatedEndpoint { | ||
use AuthenticatedEndpoint; | ||
|
||
public function __construct( GW2Api $api, $apiKey ) { | ||
parent::__construct( $api ); | ||
|
||
$this->apiKey = $apiKey; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function url() { | ||
return 'v2/account/bank'; | ||
} | ||
|
||
public function get() { | ||
return $this->request()->json(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace GW2Treasures\GW2Api\V2\Endpoint\Account; | ||
|
||
use GW2Treasures\GW2Api\GW2Api; | ||
use GW2Treasures\GW2Api\V2\Authentication\AuthenticatedEndpoint; | ||
use GW2Treasures\GW2Api\V2\Authentication\IAuthenticatedEndpoint; | ||
use GW2Treasures\GW2Api\V2\Endpoint; | ||
|
||
class MaterialEndpoint extends Endpoint implements IAuthenticatedEndpoint { | ||
use AuthenticatedEndpoint; | ||
|
||
public function __construct( GW2Api $api, $apiKey ) { | ||
parent::__construct( $api ); | ||
|
||
$this->apiKey = $apiKey; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function url() { | ||
return 'v2/account/materials'; | ||
} | ||
|
||
public function get() { | ||
return $this->request()->json(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace GW2Treasures\GW2Api\V2\Endpoint\Character; | ||
|
||
use GW2Treasures\GW2Api\GW2Api; | ||
use GW2Treasures\GW2Api\V2\Authentication\AuthenticatedEndpoint; | ||
use GW2Treasures\GW2Api\V2\Authentication\IAuthenticatedEndpoint; | ||
use GW2Treasures\GW2Api\V2\Endpoint; | ||
|
||
class EquipmentEndpoint extends Endpoint implements IAuthenticatedEndpoint { | ||
use AuthenticatedEndpoint; | ||
|
||
protected $character; | ||
|
||
public function __construct( GW2Api $api, $apiKey, $character ) { | ||
parent::__construct( $api ); | ||
|
||
$this->apiKey = $apiKey; | ||
$this->character = $character; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function url() { | ||
return 'v2/characters/' . urlencode( $this->character ) . '/equipment'; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function get() { | ||
return $this->request()->json()->equipment; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace GW2Treasures\GW2Api\V2\Endpoint\Character; | ||
|
||
use GW2Treasures\GW2Api\GW2Api; | ||
use GW2Treasures\GW2Api\V2\Authentication\AuthenticatedEndpoint; | ||
use GW2Treasures\GW2Api\V2\Authentication\IAuthenticatedEndpoint; | ||
use GW2Treasures\GW2Api\V2\Endpoint; | ||
|
||
class InventoryEndpoint extends Endpoint implements IAuthenticatedEndpoint { | ||
use AuthenticatedEndpoint; | ||
|
||
protected $character; | ||
|
||
public function __construct( GW2Api $api, $apiKey, $character ) { | ||
parent::__construct( $api ); | ||
|
||
$this->apiKey = $apiKey; | ||
$this->character = $character; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function url() { | ||
return 'v2/characters/' . urlencode( $this->character ) . '/inventory'; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function get() { | ||
return $this->request()->json()->bags; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace GW2Treasures\GW2Api\V2\Endpoint\Material; | ||
|
||
use GW2Treasures\GW2Api\V2\Bulk\BulkEndpoint; | ||
use GW2Treasures\GW2Api\V2\Bulk\IBulkEndpoint; | ||
use GW2Treasures\GW2Api\V2\Endpoint; | ||
use GW2Treasures\GW2Api\V2\Localization\ILocalizedEndpoint; | ||
use GW2Treasures\GW2Api\V2\Localization\LocalizedEndpoint; | ||
|
||
class MaterialEndpoint extends Endpoint implements IBulkEndpoint, ILocalizedEndpoint { | ||
use BulkEndpoint, LocalizedEndpoint; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function url() { | ||
return 'v2/materials'; | ||
} | ||
} |