highliuk/reserve-with-google
Composer 安装命令:
composer require highliuk/reserve-with-google
包简介
Reserve with Google PHP SDK, to simplify the Appointments Redirect integration
README 文档
README
Reserve with Google PHP SDK, to simplify the Appointments Redirect integration.
Installation
Use composer to install the package:
composer require highliuk/reserve-with-google
Usage
use HighLiuk\Rwg\Feeds\Merchants; use HighLiuk\Rwg\Models\Merchant; // create the merchants feed $merchants = new Merchants; // add a merchant to the feed $merchant = new Merchant( id: 'appointments-merchant-1', name: 'Lorem ipsum Barbershop', telephone: '+11111222233', url: 'https://barbershop.com', latitude: 37.422113, longitude: -122.084041, country: 'US', locality: 'Mountain View', region: 'California', postal_code: '94043', street_address: '1600 Amphitheater Drive' ); $merchants->add($merchant); // export the feed $merchants->export(__DIR__);
This will generate two files in the specified directory, ready to be uploaded to the Reserve With Google dropbox:
merchant_{timestamp}.json.gz- the actual feed datamerchant_{timestamp}.filesetdesc.json.gz- the fileset descriptor file
Supported feeds
Merchants
use HighLiuk\Rwg\Models\Merchant; $merchant = new Merchant( id: 'appointments-merchant-1', name: 'Lorem ipsum Barbershop', telephone: '+11111222233', url: 'https://barbershop.com', latitude: 37.422113, longitude: -122.084041, country: 'US', locality: 'Mountain View', region: 'California', postal_code: '94043', street_address: '1600 Amphitheater Drive' );
Generated files:
merchant_{timestamp}.json.gz
{
"data": [
{
"entityId": "appointments-merchant-1",
"name": "Lorem ipsum Barbershop",
"telephone": "+11111222233",
"url": "https://barbershop.com",
"location": {
"latitude": 37.422113000000003,
"longitude": -122.084041,
"address": {
"country": "US",
"locality": "Mountain View",
"region": "California",
"postalCode": "94043",
"streetAddress": "1600 Amphitheater Drive"
}
}
}
]
}
merchant_{timestamp}.filesetdesc.json.gz
{
"generationTimestamp": "1725266494",
"name": "reservewithgoogle.entity",
"dataFile": ["merchant_1725266494.json.gz"]
}
Actions
use HighLiuk\Rwg\Models\Action; $action = new Action( merchant_id: 'appointments-merchant-1', link_id: 'appointment-link-1', url: 'https://www.epapartnerwebsite.com/appointment/appointment-partner-1', );
Generated files:
action_{timestamp}.json.gz
{
"data": [
{
"entityId": "appointments-merchant-1",
"linkId": "appointment-link-1",
"url": "https://www.epapartnerwebsite.com/appointment/appointment-partner-1",
"actions": [{ "appointmentInfo": {} }]
}
]
}
action_{timestamp}.filesetdesc.json.gz
{
"generationTimestamp": "1725266606",
"name": "reservewithgoogle.action.v2",
"dataFile": ["action_1725266606.json.gz"]
}
Services
use HighLiuk\Rwg\Feeds\Services; use HighLiuk\Rwg\Models\Duration; use HighLiuk\Rwg\Models\Price; use HighLiuk\Rwg\Models\Range; use HighLiuk\Rwg\Models\Service; use HighLiuk\Rwg\Models\ServiceInfo; require_once __DIR__ . '/vendor/autoload.php'; $services = new Services; $service = new Service( id: 'service-1', merchant_id: 'appointments-merchant-1', localized_service_info: [ 'en' => new ServiceInfo( name: 'Service Type 1', category: 'Haircut', description: 'Lorem ipsum dolor sit amet' ), 'es' => new ServiceInfo( name: 'Servicio Tipo 1', category: 'Cortes de pelo', description: 'el cliente esta muy contento' ), ], service_price: new Price( range: Range::exact(40000000), currency_code: 'USD', ), action_link: 'https://www.rwgpartnerwebsite.com/appointment/service-1/in-person-1', service_duration: new Duration( range: Range::exact(360), ), );
Generated files:
service_{timestamp}.json.gz
{
"data": [
{
"merchantId": "appointments-merchant-1",
"serviceId": "service-1",
"localizedServiceName": {
"value": "Service Type 1",
"localizedValue": [
{ "locale": "en", "value": "Service Type 1" },
{ "locale": "es", "value": "Servicio Tipo 1" }
]
},
"localizedServiceCategory": {
"value": "Haircut",
"localizedValue": [
{ "locale": "en", "value": "Haircut" },
{ "locale": "es", "value": "Cortes de pelo" }
]
},
"localizedServiceDescription": {
"value": "Lorem ipsum dolor sit amet",
"localizedValue": [
{ "locale": "en", "value": "Lorem ipsum dolor sit amet" },
{ "locale": "es", "value": "el cliente esta muy contento" }
]
},
"servicePrice": {
"priceInterpretation": "INTERPRETATION_EXACT",
"minPrice": { "priceMicros": "40000000", "currencyCode": "USD" }
},
"actionLink": [
{
"url": "https://www.rwgpartnerwebsite.com/appointment/service-1/in-person-1"
}
],
"serviceDuration": {
"durationInterpretation": "INTERPRETATION_EXACT",
"minDurationSec": "360"
}
}
]
}
service_{timestamp}.filesetdesc.json.gz
{
"generationTimestamp": "1725265955",
"name": "glam.service.v0",
"dataFile": ["service_1725265955.json.gz"]
}
License
This project is licensed under the MIT License - see the LICENSE file for details.
highliuk/reserve-with-google 适用场景与选型建议
highliuk/reserve-with-google 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 09 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「redirect」 「google」 「merchant」 「reserve」 「appointments」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 highliuk/reserve-with-google 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 highliuk/reserve-with-google 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 highliuk/reserve-with-google 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Redirects TYPO3 visitors automatic or with a suggestlink to another language and/or root page.
Advanced TYPO3 redirect management for sys_redirect with regex and host/language-aware matching, CSV/.htaccess import/export, categories and priority, automatic slug redirect workflows, plus hit/log analytics.
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
SmartResponse simplifies consistent response handling in Laravel: supports Blade, redirect with messages, and JSON format.
Client for Google Directions API to add interpolated points to a route consisting of given coordinates.
This ConcreteCMS/concrete5 addon installs a block type that when added to a page allows you to redirect visitors to this page to another page that you specify or an external URL.
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-02