-
Notifications
You must be signed in to change notification settings - Fork 5
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 an identify
command #FF
#7
Conversation
Haha I think Circle is lying to us about all that 🍏 |
identify
commandidentify
command #FF
identify
command #FFidentify
command #FF
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.
Got this working, once I figured out how to nock
correctly.
.get("/api/v1/artwork/abc123") | ||
.reply(200) | ||
.get("/api/v1/partner/abc123") | ||
.reply(404) |
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.
The second arg to .reply
could be an object representing the JSON response. But here we mainly care whether the request 404'd or not.
}) | ||
|
||
const gravityResponses = await Promise.all(gravityPromises) | ||
const foundIndex = gravityResponses.findIndex(r => r.status === 200) |
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.
The strategy here is to build up all the requests for the various collections, fire em off all at once, and look for one that succeeded.
Ok just had to update an assumption about the Gravity urls based on what @pepopowitz did over on #8. |
🚀 PR was released in v0.0.4 🚀 |
1 similar comment
🚀 PR was released in v0.0.4 🚀 |
🚀 PR was released in v0.0.4 🚀 |
2 similar comments
🚀 PR was released in v0.0.4 🚀 |
🚀 PR was released in v0.0.4 🚀 |
Adds an
identify
command to identify an Artist, Artwork or Partner based on its BSON id. This also demonstrates the oclif way of mocking network requests in the accompanying test.Still supplying the token as an env var, till we get logins wired up.