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

Add support for top-level offers end-point with account, selling, and buying filter. #485

Merged
merged 3 commits into from
Feb 4, 2020

Conversation

abuiles
Copy link
Contributor

@abuiles abuiles commented Feb 3, 2020

This pull request extends the offers builder to support requests at the top level /offers route.

You can list all offers by doing server.offers() or use any of the following filters:

  • seller: server.offers().accountId(accountId)
  • buying: server.offers().buying(asset)
  • selling: server.offers().selling(asset)

This change introduces a breaking change since it changes the signature for the function server.offers().

Before if you wanted to list all the offers for a given account, you'll do server.offers('accounts', accountID), now you need to do server.offers().accountId(accountId).

@@ -239,9 +239,7 @@ export class FederationServer {
} else {
return Promise.reject(
new BadResponseError(
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 think this is not related with the PR, but came because of prettier. @tyvdh do you have prettier locally?

Copy link
Contributor

Choose a reason for hiding this comment

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

Like in my ide? I don’t think so.

this.url.segment("offers");
}

/**
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rice2000 can you check the copy on the functions? thanks!

@abuiles abuiles requested review from rice2000 and a team February 3, 2020 23:25
@abuiles abuiles merged commit b530386 into master Feb 4, 2020
@abuiles abuiles deleted the offers-support branch February 4, 2020 16:22
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.

2 participants