定制 kriosmane/coinmarketcap-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kriosmane/coinmarketcap-api

Composer 安装命令:

composer require kriosmane/coinmarketcap-api

包简介

Laravel package for interacting with CoinMarketCap API

README 文档

README

Latest Version on Packagist Total Downloads

A Laravel package for interacting with the CoinMarketCap API.

🚀 Installation

Laravel 11 requires PHP 8.1+ and Composer.

To install the latest version, run:

composer require kriosmane/coinmarketcap-api

📌 Service Provider & Facade (Not Required for Laravel 11)

From Laravel 11, service providers and facades are auto-discovered. However, if you need to register them manually, add the following to your config/app.php file:

Service Provider (Only if required)

'providers' => [
    KriosMane\CoinMarketCap\Providers\CoinMarketCapServiceProvider::class,
],

Facade (Only if required)

'aliases' => [
    'CoinMarketCapApi' => KriosMane\CoinMarketCap\Facades\CoinMarketCap::class,
],

⚙️ Configuration

Publish the configuration file using:

php artisan vendor:publish --provider="KriosMane\CoinMarketCap\Providers\CoinMarketCapServiceProvider"

This will create a coinmarketcap.php file in your config directory.

Get your CoinMarketCap API Key from:

🔗 CoinMarketCap API

Then, add the key to your .env file:

CMC_API_KEY=your-api-key-here

📖 Usage

You can start using the API in your controllers or services:

use CoinMarketCap;

// Get latest cryptocurrency listings
$cryptos = CoinMarketCap::listCryptos();

// Get latest market quotes for a specific cryptocurrency
$quotes = CoinMarketCap::getQuotes(['symbol' => 'BTC,ETH']);

🤝 Contributing

Feel free to fork this repository and submit a pull request to enhance its functionality.

☕ How can I thank you?

If you found this package helpful, consider buying me a coffee!
☕ Buy me a coffee

⭐ Star the repo, share it on Twitter, or post about it on HackerNews. Spread the word!

Thank you!
Krios Mane

📜 License

Please see License File for more information.

统计信息

  • 总下载量: 1.17k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-01-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固