https://github.com/roger-rodriguez/zendesk-client
JS library for the Zendesk API
https://github.com/roger-rodriguez/zendesk-client
zendesk zendesk-api zendesk-client zendesk-tickets
Last synced: 5 months ago
JSON representation
JS library for the Zendesk API
- Host: GitHub
- URL: https://github.com/roger-rodriguez/zendesk-client
- Owner: roger-rodriguez
- License: mit
- Created: 2017-11-19T22:40:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T02:10:18.000Z (about 3 years ago)
- Last Synced: 2024-12-30T02:36:16.016Z (6 months ago)
- Topics: zendesk, zendesk-api, zendesk-client, zendesk-tickets
- Language: JavaScript
- Size: 320 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Zendesk Client
JS library for the Zendesk API
## Install
Install using npm:
```bash
npm install zendesk-client
```## API Documentation
[Zendesk Core API](https://developer.zendesk.com/rest_api/docs/core/introduction)
## Quick Start
```js
import createClient from 'zendesk-client';const client = createClient({
token : 'token',
url : 'https://[yoursubdomain].zendesk.com',
});client.search.query('type:ticket status:open status:new')
.then((result) =>{
console.log(result)
})
.catch((error)=>{
console.log(error)
});```
## Attachments
```js
client.attachments
``````js
upload(files)```
## Tickets
```js
client.tickets
```
```js
list()
listByOrganization(orgId)
listByUserRequested(userId)
listByUserCCD(userId)
listByAssigned(userId)
listRecent()
show(ticketId)
showMany(ticketIds)
create(ticket)
createMany(tickets)
update(ticketId, ticket)
updateMany(ticketIds, ticket)
delete(ticketId)
deleteMany(ticketIds)
getComments(ticketId)```
## Search
```js
client.search
```
```js
query(searchTerm)
```
## Users
```js
client.users
```
```js
list()
listByGroup(groupId)
listByOrganization(orgId)
show(userId)
showMany(userIds)
me()```
## OauthTokens
```js
client.oauthtokens
```
```js
list()
show(id)
current()```