承接 stellion/vidaxl-sdk 相关项目开发

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

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

stellion/vidaxl-sdk

最新稳定版本:1.0.0

Composer 安装命令:

composer require stellion/vidaxl-sdk

包简介

PHP VidaXL/DropXL SDK - Compatible with both VidaXL and DropXL APIs

README 文档

README

PHP SDK for VidaXL and DropXL APIs. Supports both the legacy VidaXL API and the new DropXL API.

Features

  • ✅ Full API compatibility with both VidaXL and DropXL
  • ✅ Built-in rate limiting (1 request/second for DropXL)
  • ✅ Order management (create, retrieve orders)
  • ✅ HTTP Basic Authentication
  • ✅ Sandbox and Production environments

Installation

composer require stellion/vidaxl-sdk

Usage

Basic Setup

use Stellion\Vidaxl\Client;
use Stellion\Vidaxl\Authentication;
use Stellion\Vidaxl\Mode;
use Stellion\Vidaxl\Http\Client as HttpClient;
use GuzzleHttp\Client as GuzzleClient;

// Configure authentication
$auth = new Authentication('your-email@example.com', 'your-api-token');

// Configure mode (live uses DropXL URLs by default)
$mode = Mode::live(); // or Mode::sandbox()

// Setup HTTP client with rate limiting
$httpClient = new HttpClient(new GuzzleClient());

// Create API client
$client = new Client($httpClient, $auth, $mode);

Rate Limiting

The SDK includes built-in rate limiting for DropXL API compliance:

// Default: 1 request per second (DropXL requirement)
$httpClient = new HttpClient(new GuzzleClient());

// Custom rate limit
$httpClient->setMinRequestInterval(0.5); // 0.5 seconds between requests

// Disable rate limiting (for VidaXL legacy API)
$httpClient->disableRateLimit();

Migration from VidaXL to DropXL

Simply update your environment variables:

  • Base URLs are automatically updated to DropXL
  • Authentication method remains the same
  • All API endpoints remain compatible

API Reference

Orders

// Get all orders
$orders = $client->getOrders();

// Get specific order
$args = new GetOrderArguments();
$args->setOrderReference('ORDER-123');
$order = $client->getOrder($args);

// Create order
$orderArgs = new CreateOrderArguments();
// ... configure order details
$result = $client->createOrder($orderArgs);

Changelog

v1.0.0

  • ✅ Updated for DropXL API compatibility
  • ✅ Added rate limiting support
  • ✅ Maintained backward compatibility with VidaXL
  • ✅ Production ready

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-29