CoinMarketCap API for Laravel 5

in #utopian-io6 years ago (edited)

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).

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

POW.png



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Very useful contribution thank you ....

Hey @ikidnapmyself I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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]

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 67144.34
ETH 3517.40
USDT 1.00
SBD 2.69