bookunited/aqc-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bookunited/aqc-client

最新稳定版本:0.0.13

Composer 安装命令:

composer require bookunited/aqc-client

包简介

A client library for the Amadeus Quick Connect API

README 文档

README

bookunited/aqc-client is a PHP client library for the Amadeus Quick Connect API.

This project is currently aligned with Flight Offers Search API v2.14.

Requirements

  • PHP ^8.3
  • Composer

Installation

composer require bookunited/aqc-client

Quick Start

<?php

use Amadeus\Client\Client;
use Amadeus\Client\Configuration;
use Amadeus\Model\Collections\ExtendedTravelerCollection;
use Amadeus\Model\Collections\OriginDestinationCollection;
use Amadeus\Model\Collections\SourceCollection;
use Amadeus\Model\Enums\Source;
use Amadeus\Model\Enums\TravelerType;
use Amadeus\Model\Values\Date;
use Amadeus\Model\Values\DateTimeRange;
use Amadeus\Model\Values\ExtendedTravelerInfo;
use Amadeus\Model\Values\GetFlightOffersBody;
use Amadeus\Model\Values\IATA;
use Amadeus\Model\Values\OriginDestination;
use Amadeus\Requests\FlightOffersSearchRequest;
use Ramsey\Uuid\Uuid;

$client = new Client(
    configuration: new Configuration(
        endpoint: 'https://test.travel.api.amadeus.com',
        clientId: 'your-client-id',
        clientSecret: 'your-client-secret',
    ),
    cache: $yourCache,
);

$request = new FlightOffersSearchRequest(
    clientReference: Uuid::uuid4(),
    getFlightOffersBody: new GetFlightOffersBody(
        originDestinations: new OriginDestinationCollection([
            new OriginDestination(
                id: 1,
                originLocationCode: new IATA('AMS'),
                destinationLocationCode: new IATA('JFK'),
                departureDateTimeRange: new DateTimeRange(new Date('2026-07-01')),
            ),
        ]),
        travelers: new ExtendedTravelerCollection([
            new ExtendedTravelerInfo(id: 1, travelerType: TravelerType::ADULT),
        ]),
        sources: new SourceCollection([Source::GDS]),
    ),
);

$response = $client->get($request);

Development

Run the full verification pipeline:

./develop composer run verify

This runs formatting, static analysis, tests, and mutation testing.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-08-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固