Skip to content
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

Support Result as class to enable access to full property list #2

Merged
merged 1 commit into from
Jul 27, 2016
Merged

Support Result as class to enable access to full property list #2

merged 1 commit into from
Jul 27, 2016

Conversation

djmarland
Copy link
Contributor

Sometimes the Fixer.io result may have been generated on a date earlier than what you ask for. For example: https://api.fixer.io/2016-07-10
This change creates a Result object out of the whole feed, so that the date can be compared to what was expected, and then the rates read.
This is a new method, so everything is backwards compatible with what existed before.

@fadion fadion merged commit a8a47ed into fadion:master Jul 27, 2016
The last option is to return the response as a `Result` class. This allows access to the full set of properties returned from the feed.

```php
$result = (new Exchange())->symbols(Currency::USD, Currency::GBP)->getAsObject();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be getResult(), right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, so it should

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed this upstream, but this is merged now. Shall I open a new PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #4 to include fixing that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants