Skip to content

lawwu/livechatR

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 

livechatR - LiveChat REST API client for R

The package livechatR provides an interface from R to LiveChat's API endpoints (see https://developers.livechatinc.com/rest-api/).

This package contains functions that curl the most frequently used API endpoints (agents, canned responses ahd chats).

Features

  • Authentication by constructing the necessary request URL using the LiveChat's API key and Email.
  • Easy parameterization and result parsing for the following API requests:
    • agents/: get the list of agents using livechatGetAgents.
    • canned_responses/: get the list of canned responses using livechatGetCannedResponses.
    • goals/: get the list of goals using livechatGetGoals.
    • greetings/: get the list of greetings using livechatGetGreetings.
    • chats/: get the list of chat sessions, raw chat text and events using livechatGetChats.

Installation

library(devtools)
devtools::install_github("lawwu/livechatR")
library(livechatR)

or

install.packages("livechatR")
library(livechatR)

Dependencies

The package depends on

  • dplyr
  • purrr
  • jsonlite
  • data.table
  • magrittr

Examples

Set-up connection using LiveChat credentials in R

In order to use the various methods of this package, we need to save the account data of your LiveChat email and API key into a named object using livechatCreateAccount. The next examples all make use of this account object. You can find the API Key and token here.

## Fill in here the API token, key and secret as found on
## https://my.livechatinc.com/agents/api-key
> account = livechatCreateAccount(email ="email_here",
                                  api_key = "api_key_here")

List Agents

> livechatGetAgents(account)

List Canned Responses

> livechatGetCannedResponses(account, group = 0)

List Chat Sessions and Chats

> livechat_data <- livechatGetChats(account, date_from = "2016-02-23")

About

livechatR - LiveChat REST API client in R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages