Closed sagotsky closed 11 years ago
Good news. My custom api lib (tapir) is working now that my desk.com trial has been reactivated.
integration api is defined but untested. Working on that next.
My desk api implementation is working reliably. It's not complete, but it has URLs for everything I need and is easy to extend.
For reference, here's where the API is defined: https://github.com/openscholar/integrated_support/blob/master/lib/tapir/api/desk.json
Here's a snippet:
{
"name":"Desk.com",
"apis":{
"case": {
"show":{
"url":"https://{subdomain}.desk.com/api/v2/cases/{id}",
"method":"get"
},
"update":{
"url":"https://{subdomain}.desk.com/api/v2/cases/{id}",
"method":"patch",
"data":["custom_fields"]
}
},
"integration_urls":{
"list":{
"url":"https://{subdomain}.desk.com/api/v2/integration_urls",
"method":"get"
},
"show":{
"url":"https://{subdomain}.desk.com/api/v2/integration_urls/{id}",
"method":"get"
},
Case and integration_urls are both APIs. Case has a call for show and update. Integration_urls has list and show. (More are defined in the actual file. An API call is just a url with replaceable strings and an http method. Optionally there's a data attribute which specifies an array of parameters. These parameters are passed to desk as the HTTP_POST body rather than as part of the query string.
Find or create a desk API that (bare minimum) handles the following:
Nice things to have:
Custom field: create, list, update.(Not a part of desk.com API)Rules: create, list, update.(Not a part of desk.com API)