-
Notifications
You must be signed in to change notification settings - Fork 4
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
Replace popsicle with isomorphic-fetch #4
Conversation
Changes Unknown when pulling f7f8082 on radiovisual:fetch into ** on brh55:master**. |
Changes Unknown when pulling 3b3f567 on radiovisual:fetch into ** on brh55:master**. |
1 similar comment
Changes Unknown when pulling 3b3f567 on radiovisual:fetch into ** on brh55:master**. |
Changes Unknown when pulling a649039 on radiovisual:fetch into ** on brh55:master**. |
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.
Nice fetch is a great choice. Take a look at my comments and tell me what you think. 👏
cli.js
Outdated
@@ -26,7 +26,7 @@ const cli = meow(` | |||
USD: 261.91 | |||
`); | |||
|
|||
const input = cli.input.map(item => item.replace(/,|\s+/g, '')).join(','); | |||
const input = cli.input.map(item => item.replace(/,\s+/g, '')).join(','); |
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.
Looks like the same is logic is happening in the API(LOC 7), you should be able to just turn the array to a string and pass it to the API to format.
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.
yes, you are right. No need to do this in more than one place.
package.json
Outdated
@@ -27,9 +27,9 @@ | |||
"cryptocurrency" | |||
], | |||
"dependencies": { | |||
"isomorphic-fetch": "^2.2.1", |
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.
Looks like it needs a tab or space
Changes Unknown when pulling ff8060f on radiovisual:fetch into ** on brh55:master**. |
Changes Unknown when pulling 3988026 on radiovisual:fetch into ** on brh55:master**. |
I think I made all the changes you requested. GitHub is saying that there are still changes pending, but I think I covered everything. Let me know if I missed something. |
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.
Looks good!
I'm thinking we could strip out the API to a core module such as (crypto-price) and make several different CLI for different cryptos. Since I would like to do one for Lisk as well. |
I like this idea. I would like to be able to compare different crypto-currencies from the command line, but also have the freedom to write applications in node to consume this data as well. I am happy to help if you want me to extract the API. |
I'm thinking we could make an org? Something crypto related, and perhaps move this over to it? Thoughts? |
I would love that, and I would be happy to help building crypto-related modules. Please start the org and send me an invite! |
@radiovisual Have any good names to call the org? lol |
If not already taken:
Only if its cryptocoin-centric:
I also like:
Maybe I will think of something better later on... |
Available Options:
|
Dang, all the good names are taken. Looks like we will need to get creative. haha. I like |
Maybe we can find some cool keywords from the decentralized and cryptographic keyword space and find something unique that hasn't been taken yet, but still feels relevant. |
These are all available:
|
Yeah, we might need a interesting name completely different from "crypto". Also crypto-craft is an option |
|
Haha I just like the shortness of crypti 💃 |
I really like Makes us feel relevant and serious, but super hipster and cool at the same time. 🤣 |
I like |
Invited you for crypti 🍡 👍 , transferring this repo over now |
Alright! Now we can get to work. 🕺 🚀 |
Made you owner as well, feel free to re-word the org description and add a logo. 🎢 |
Ok, awesome. Thanks! |
So do you want a separate command line tool for each crypto currency, or one tool that can manage them all? It would be cool if we had a tool that could compare cryptocurrencies like we pair currencies in Forex:
Or something like:
Or even cooler, if you don't remember all the coin codes, you can have an interface that helps you decide:
|
Whew the last option is awesome. I'm thinking we have one core CLI / module that does both But we should also have a defaults, so when you run ccoin and it will always show your stored preferences.
as well as: |
The only downside is cryptocompare supports 100 different currencies (https://www.cryptocompare.com/api/data/coinlist/), so I can imagine that list being extremely long lol. |
Ok cool. I like that the ability to save preferences or profiles. So I could possibly do something like (assuming I had a profile saved called
where Or if I wanted to create a profile called
and then finally, the prompt could also ask if you want to save your settings as a profile:
Something like that? |
Yeah, baby-steps! 🍼 haha. |
@brh55 has work begun on crypti/ccoin? I see the repo has been made, but nothing has been committed? |
@radiovisual Ah yes, I was going to commit the base repo from the generator but got side-tracked. |
Ok, cool. I will monitor the progress and pitch in where needed. Are you going to make a separate module for the API calls to cryptocompare, or just hard-wire it into ccoin? |
I was thinking of making ccoin the core, but I could perhaps leverage this module? |
yeah, I like that plan. I would use that module you pointed to since it already has the API we need. 😎 |
This PR keeps the application running as expected, but also fixes the problem where running the tests is failing (possibly) due to nock + popsicle.
It also increases code coverage from 83% to
92%100%. 🎉