opsgenie / opsgenie-go-sdk-v2

Opsgenie GO SDK v2
Apache License 2.0
34 stars 63 forks source link

Service result struct missing links property #116

Open CHuynh97 opened 1 year ago

CHuynh97 commented 1 year ago

I notice the GET Service API is returning information we want to retrieve in our application that the current result struct does not retain. Ex:

curl -X GET 'https://api.opsgenie.com/v1/services/:service_id' \
    -H 'Authorization: GenieKey ...' \
    -H 'Content-Type: application/json' | json_pp
{
   "data" : {
      "description" : "test",
      "id" : "${service_id}",
      "isExternal" : false,
      "links" : {
         "api" : "...",
         "web" : "..."
      },
      "name" : "test",
      "tags" : [],
      "teamId" : "..."
   },
   "requestId" : "...",
   "took" : 0.005
}

In my application I'd like to retrieve links property but the result struct doesn't decode this.

Current workaround:

Possible fix: