2017 © Pedro Peláez
 

library api-client-php

Enables PHP applications to communicate with the LiveChat API.

image

livechat/api-client-php

Enables PHP applications to communicate with the LiveChat API.

  • Thursday, October 26, 2017
  • by Andrzej
  • Repository
  • 23 Watchers
  • 35 Stars
  • 21,956 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 26 Forks
  • 7 Open issues
  • 7 Versions
  • 13 % Grown

The README.md

LiveChat API Client

PHP client for connecting to the LiveChat REST API., (*1)

Documentation

To find out more, visit the official LiveChat REST API documentation., (*2)

Previous version of LiveChat API Client., (*3)

Requirements

  • PHP 5.3 or greater
  • cUrl extension enabled

Authentication to the API occurs via HTTP Basic Auth. Provide your:, (*4)

  • login
  • API key

More information: https://developers.livechatinc.com/rest-api/#authentication, (*5)

Installation

Composer, (*6)

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

Or, set up dev as minimum-stability in your composer.json:, (*7)

    "minimum-stability": "dev"

Then:, (*8)

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

Execute tests

This operation requires PHPUnit installed., (*9)

 $ 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)., (*10)

Agents

Agents REST API documentation., (*11)

  • $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., (*12)

  • $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., (*13)

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

Goals

Goals REST API documentation., (*14)

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

Groups

Groups REST API documentation., (*15)

  • $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., (*16)

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

Status

Status REST API documentation., (*17)

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

Tickets

Tickets REST API documentation., (*18)

  • $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., (*19)

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

Webhooks

Webhooks REST API documentation., (*20)

  • $LiveChatAPI->webhooks->get(), (*21)

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

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

To do

  • Tests for models
  • Add all supported API methods

The Versions

26/10 2017

1.1.x-dev

1.1.9999999.9999999-dev http://developer.livechatinc.com

Enables PHP applications to communicate with the LiveChat API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

api rest

26/10 2017

dev-master

9999999-dev http://developer.livechatinc.com

Enables PHP applications to communicate with the LiveChat API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api rest

26/10 2017

dev-new/webhooks

dev-new/webhooks http://developer.livechatinc.com

Enables PHP applications to communicate with the LiveChat API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api rest

15/01 2016

v1.1.1

1.1.1.0 http://developer.livechatinc.com

Enables PHP applications to communicate with the LiveChat API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api rest

21/12 2015

v1.1

1.1.0.0 http://developer.livechatinc.com

Enables PHP applications to communicate with the LiveChat API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api rest

20/08 2015

1.0.x-dev

1.0.9999999.9999999-dev http://developer.livechatinc.com

Enables PHP applications to communicate with the LiveChat API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api rest

20/08 2015

1.0

1.0.0.0 http://developer.livechatinc.com

Enables PHP applications to communicate with the LiveChat API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api rest