CoinMarketCap API for Laravel 5
Hello!
Anybody who is interested in cryptocurrencies, knows the website coinmarketcap.com! It's global rank at Alexa is 111! So ti's a valued source for now.
As a PHP & Laravel developer, I was looking for a repository to use in my project. I have found one, made for Laravel 5. But I wanted to make some changes. Here we go!
New Features
getTicker()
function
Actually, there was a function with the same name but this one is used for Ticker (Specific CryptoCurrency) now. For all currencies, you should use getTickers()
.
Improvements
CMC_SSL_VERIFYPEER
added as an env parameter
It's true
by default. So there is no security risk actually but it's friendly for Windows development platform. It's fixable. An example shown below, check your php.ini
file.
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo = D:\WAMP\bin\php\php7.1.9\cacert.pem
- PHPDoc lines fixed
It's always good to use PHPDoc because cool IDEs (such as PHPStorm) makes your code better when you use those lines (E.g. when your data types mismatch).
- Some changes to followPHP-FIG — PHP Framework Interop Group rules.
Retouch for FALSE
, "USD"
like codes, it's all fixed.
- Spacing fixes for better appearance
You can find my currently accepted pull-request here as proof of work with 78 additions and 36 deletions:
https://github.com/adman9000/laravel-coinmarketcap/pull/1
Posted on Utopian.io - Rewarding Open Source Contributors
Very useful contribution thank you ....
Hey @ikidnapmyself I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Thank you for the contribution. It has been approved.
I like how you explained why use PHPDoc, this shows other up and coming coders that it should not be neglected. PHPStorm is cool!
You can contact us on Discord.
[utopian-moderator]