定制 arnaudleroy-studio/coffeetrove 二次开发

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

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

arnaudleroy-studio/coffeetrove

最新稳定版本:v0.1.1

Composer 安装命令:

composer require arnaudleroy-studio/coffeetrove

包简介

Access 440K+ cafes, brewing guides, and coffee data from CoffeeTrove.

README 文档

README

Packagist Version PHP Version License

PHP toolkit for accessing cafe, roaster, and coffee knowledge data from CoffeeTrove. The platform indexes over 440,000 cafes worldwide alongside brewing guides, bean origin profiles, and a scoring system called the Golden Drop that rates establishments on data completeness and quality signals.

Installation

composer require arnaudleroy-studio/coffeetrove

Quick Start

Look up cafes by location

use CoffeeTrove\Client;

$client = new Client();

// Find cafes near a coordinate pair
$cafes = $client->searchCafes(
    latitude: 48.8566,
    longitude: 2.3522,
    radiusKm: 2,
    limit: 10,
);

foreach ($cafes as $cafe) {
    echo "{$cafe['name']} — score: {$cafe['score']}/100\n";
}

Inspect scoring tiers

// Golden Drop tier thresholds
$tiers = Client::SCORE_TIERS;
// ['exceptional' => 90, 'excellent' => 80, 'notable' => 70, 'common' => 0]

$cafe = $client->getCafe(slug: 'blue-bottle-shinjuku');
$tier = $client->getTier(score: $cafe?->score ?? 0);

echo "{$cafe?->name}: {$tier} tier";

Work with brewing methods

// Retrieve all brewing method profiles
$methods = $client->getBrewingMethods();

// Array destructuring for clean iteration
foreach ($methods as ['slug' => $slug, 'name' => $name, 'grind' => $grind]) {
    echo "{$name} requires {$grind} grind\n";
}

// Arrow function to extract just the names
$names = array_map(fn(array $m) => $m['name'], $methods);

Filter by bean origin

$origins = $client->getOrigins(region: 'africa');

// Null-safe chaining on optional tasting notes
foreach ($origins as $origin) {
    $notes = $origin?->getData('tasting_notes') ?? 'no tasting notes available';
    echo "{$origin['name']}: {$notes}\n";
}

Available Data

CoffeeTrove covers the full specialty coffee landscape. The cafe dataset spans 50+ countries with addresses, hours, chain classification (independent, local chain, or global chain), and Golden Drop scores computed from data completeness and review signals. Brewing guides cover 15+ methods from pour-over to espresso with grind size, water temperature, and ratio recommendations. Origin profiles document growing regions, altitude ranges, processing methods, and characteristic flavor notes. The bean encyclopedia catalogs 160+ entries across varietals, blends, and single-origin roasts.

Links

License

MIT License. See LICENSE for details.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固