承接 codefit/wolt-api-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

codefit/wolt-api-client

最新稳定版本:1.0.0

Composer 安装命令:

composer require codefit/wolt-api-client

包简介

PHP client for Wolt API integration

README 文档

README

PHP client for Wolt API integration. This package provides easy access to Wolt's Order API and Menu API.

Installation

composer require codefit/wolt-api-client

Usage

Authentication

First, you'll need to obtain your client credentials from Wolt. Then you can initialize the clients:

use Wolt\Api\OrderClient;
use Wolt\Api\MenuClient;

// Initialize Order client
$orderClient = new OrderClient('your-client-id', 'your-client-secret');

// Initialize Menu client
$menuClient = new MenuClient('your-client-id', 'your-client-secret');

Order API Examples

// Get order details
$order = $orderClient->getOrder('order-id');

// Mark order as ready
$orderClient->markOrderReady('order-id');

// Mark order as delivered
$orderClient->markOrderDelivered('order-id');

// Reject order
$orderClient->rejectOrder('order-id', 'Out of stock');

Menu API Examples

// Get menu for a venue
$menu = $menuClient->getMenu('venue-id');

// Update menu
$menuClient->updateMenu('venue-id', [
    // Menu data structure
]);

// Update item availability
$menuClient->updateItemAvailability('venue-id', 'item-id', false);

// Update item price
$menuClient->updateItemPrice('venue-id', 'item-id', 9.99);

Error Handling

The client throws exceptions in case of errors:

use Wolt\Api\Exception\AuthenticationException;
use GuzzleHttp\Exception\GuzzleException;

try {
    $order = $orderClient->getOrder('order-id');
} catch (AuthenticationException $e) {
    // Handle authentication errors
} catch (GuzzleException $e) {
    // Handle API request errors
}

Requirements

  • PHP 7.4 or higher
  • Guzzle HTTP client
  • JSON extension

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-12