定制 paravibe/gototraining 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

paravibe/gototraining

最新稳定版本:1.1.0

Composer 安装命令:

composer require paravibe/gototraining

包简介

The GoToTraining API wrapper for PHP

README 文档

README

Latest Version Build Status Total Downloads

Installation

composer require paravibe/gototraining

How to use

Initialize client

$client = new \LogMeIn\GoToTraining\Client($access_token, $values);

Where $access_token is a token retrived during authorization procedure - https://developer.goto.com/guides/HowTos/03_HOW_accessToken/
and $values are response data that contain:

  • account_key
  • account_type
  • email
  • firstName
  • lastName
  • organizer_key

Use any method described here https://developer.goto.com/GoToTrainingV1 by passing proper HTTP method and endpoint to createRequest() method.

GET/DELETE methods

$get = $client->createRequest('GET', "organizers/{$organizer_key}/trainings")->execute();
$data = $get->getDecodedBody();

POST/PUT methods

$post_data = array(
  'name' => 'Training',
  'description' => 'Test API integration',
  'times' => [
    [
      'startDate' => '2021-03-02T12:00:00Z',
      'endDate' => '2021-03-02T13:00:00Z',
    ]
  ],
  'timeZone' => 'Europe/Kiev',
);

$new = $client->createRequest('POST', "organizers/{$organizer_key}/trainings")
  ->attachBody($post_data)
  ->execute();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-13