本地/小时管理员SDK

小时管理员API SDK

1.1.3 2021-05-28 11:49 UTC

This package is auto-updated.

Last update: 2024-09-28 19:15:24 UTC


README

安装

  • composer require locally/hours-admin-sdk

使用方法

根据您需要的API,您可以简单地实例化所需的类

可用的类

  • LocationApi
  • BusinessApi
  • CrawlerApi
  • HolidayApi
  • SundayShoppingApi

示例

$locationApi = new LocationApi('API_TOKEN');
  • 参数1:需要与所选环境(生产/测试)对应的API令牌。默认环境是生产。
  • 参数2(可选):布尔值,用于设置正确的API URL到生产或测试服务器。True = 生产(默认),false = 测试。

然后您可以在类中执行任何可用的方法,例如

$locationApi->index()               // return all the locations
$locationApi->show($hash)           // return location with matching $hash and highest version
$locationApi->update($arrayOfData)  // update location based on the passed array and return
$locationApi->store($arrayOfData)   // store new location based on the passed array and return