承接 livechat/api-client-php 相关项目开发

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

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

livechat/api-client-php

最新稳定版本:v1.1.1

Composer 安装命令:

composer require livechat/api-client-php

包简介

Enables PHP applications to communicate with the LiveChat API.

关键字:

README 文档

README

PHP client for connecting to the LiveChat REST API.

Documentation

To find out more, visit the official LiveChat REST API documentation.

Previous version of LiveChat API Client.

Requirements

  • PHP 5.3 or greater
  • cUrl extension enabled

Authentication to the API occurs via HTTP Basic Auth. Provide your:

  • login
  • API key

More information: https://developers.livechatinc.com/rest-api/#authentication

Installation

Composer

$ composer require livechat/api-client-php "@dev"

Or, set up dev as minimum-stability in your composer.json:

    "minimum-stability": "dev"

Then:

 $ composer require livechat/api-client-php
 $ composer update

Execute tests

This operation requires PHPUnit installed.

 $ phpunit

Basic usage

<?php

require_once __DIR__ . '/vendor/autoload.php';

use LiveChat\Api\Client as LiveChat;

$LiveChatAPI = new LiveChat('%login%', '%apiKey%');
$agents = $LiveChatAPI->agents->get();

Available methods

Methods returns stdClass (parsed JSON response).

Agents

Agents REST API documentation.

  • $LiveChatAPI->agents->get($login = null)
  • $LiveChatAPI->agents->add(array $vars)
  • $LiveChatAPI->agents->update($login, array $vars)
  • $LiveChatAPI->agents->delete($login)

Canned responses

Canned responses REST API documentation.

  • $LiveChatAPI->cannedResponses->get($group = 0)
  • $LiveChatAPI->cannedResponses->getSingleResponse($id)
  • $LiveChatAPI->cannedResponses->addNewResponse($text, $tags)
  • $LiveChatAPI->cannedResponses->updateResponse($id, $text, $tags)
  • $LiveChatAPI->cannedResponses->deleteResponse($id)

Chat archives

Archives REST API documentation.

  • $LiveChatAPI->chats->get($params = array())
  • $LiveChatAPI->chats->getSingleChat($chatId)
  • $LiveChatAPI->chats->updateTags($id, array $vars)

Goals

Goals REST API documentation.

  • $LiveChatAPI->goals->markAsSuccessful($goalId)

Groups

Groups REST API documentation.

  • $LiveChatAPI->groups->get($group = 0)
  • $LiveChatAPI->groups->update($id, array $vars)
  • $LiveChatAPI->groups->add(array $vars)
  • $LiveChatAPI->groups->delete($id)

Reports

Reports REST API documentation.

  • $LiveChatAPI->reports->get($type, array $params = array())

Status

Status REST API documentation.

  • $LiveChatAPI->status->get($group = 0)

Tickets

Tickets REST API documentation.

  • $LiveChatAPI->tickets->get(array $params = array())
  • $LiveChatAPI->tickets->getSingleTicket($ticketId)
  • $LiveChatAPI->tickets->add(array $vars)
  • $LiveChatAPI->tickets->updateTags($id, array $vars)

Visitors

Visitors REST API documentation.

  • $LiveChatAPI->visitors->get(array $params = array())

Tags

Tags REST API documentation.

  • $LiveChatAPI->tags->get($group=0)

  • $LiveChatAPI->tags->add(array( "author" => 'test@email.com', "tag" => 'Test Tag', "group" => 1 ))

  • $LiveChatAPI->tags->delete('Tag Name')

Webhooks

Webhooks REST API documentation.

  • $LiveChatAPI->webhooks->get()

  • $LiveChatAPI->webhooks->add(array( "event_type" => "chat_started", "data_types" => array( "chat", "visitor" ), "url" => "http://www.shoeshop.com/webhook", ))

  • $LiveChatAPI->webhooks->delete('622d3950eecea8bb5f8c26f20c76ee2e')

To do

  • Tests for models
  • Add all supported API methods

统计信息

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

GitHub 信息

  • Stars: 37
  • Watchers: 22
  • Forks: 27
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固