-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add project structure #1
Conversation
1adda32
to
7d5928b
Compare
{ | ||
"name": "bitreserve/bitreserve-sdk-php", | ||
"type": "library", | ||
"description": "Bitreserve SDK PHP for Bitreserve API v0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove v0
.
5e9bea7
to
5f3b094
Compare
* | ||
* @param null|HttpClientInterface $httpClient Bitreserve http client | ||
*/ | ||
public function __construct($personalAccessToken = null, HttpClientInterface $httpClient = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to get the client in the constructor?
@nunorafaelrocha please add an |
*/ | ||
class ErrorException extends \ErrorException implements ExceptionInterface | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
{ | ||
$data = $this->get('/ticker'); | ||
|
||
return array_reduce($data, function($tickers, $ticker) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a map, not a reduce.
ae94db8
to
867d5f1
Compare
->with('/me/transactions') | ||
->will($this->returnValue($data)); | ||
|
||
$user = new User($client, array('username' => 'han.solo')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
foobar
867d5f1
to
0e82d57
Compare
public function getHeader($header = null) | ||
{ | ||
if ($this->loopCount) { | ||
$header = sprintf('<https://api.bitreserve.org/%d>; rel="next"', $this->loopCount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope
0e82d57
to
4c089e5
Compare
4c089e5
to
bdd423e
Compare
No description provided.