andygrunwald / go-jira

Go client library for Atlassian Jira
https://pkg.go.dev/github.com/andygrunwald/go-jira?tab=doc
MIT License
1.47k stars 469 forks source link

Review service "ServiceDesk" in the Cloud Jira client #559

Open andygrunwald opened 2 years ago

andygrunwald commented 2 years ago

In #473 we split the single Jira client into two: OnPremise and Cloud. We did this by copying the same code into two folders. The reason: The two software products have different APIs. In v1 of this client, we had a bad/dirty mix of OnPremise and Cloud API endpoints.

Goal of this task

Review service "ServiceDesk" in the Cloud Jira client and

  1. delete all API endpoints related to the OnPremise Jira version
  2. update the documentation to match the latest API links

Notes

This might reduce the functionality of the client, but this lead to a more stable client.

Missing API endpoints will be documented that we have a clear overview.

Fank commented 2 years ago

I would recommend based on your idea to move all service desk related APIs into service desk e.g.

client.ServiceDesk.Request.Create(...)
client.ServiceDesk.RequestType.Get(...)
client.ServiceDesk.Customer.Create(...)
andygrunwald commented 1 year ago

From the first quick check: Sounds like a good idea. Depending on the amount of items under each sub category, it might also be a idea to consider to run it like

client.ServiceDesk.CreateRequest(...)
client.ServiceDesk.GetRequestType(...)
client.ServiceDesk.CreateCustomer(...)

Just a quick thought. In the end, this should be consistent across the library.