teamcity-rest-client icon indicating copy to clipboard operation
teamcity-rest-client copied to clipboard

PinInfo lacking crucial information

Open theAkito opened this issue 3 years ago • 0 comments

https://github.com/JetBrains/teamcity-rest-client/blob/1ef4d92c36f0428187e425beffbb67a7603c6798/teamcity-rest-client-impl/src/main/kotlin/org/jetbrains/teamcity/rest/implementation.kt#L1035-L1039

The most important information I need to get from a build is the PinInfo's comment text.

I've run a couple of manual curl requests in the shell to get a feeling for the API. For example, I am getting such a response, when I am requesting the pinInfo of a specific build:

[
  {
    "comment": {
      "text": "Current",
      "timestamp": "20210219T095524+0000",
      "user": {
        "href": "/app/rest/users/id:1",
        "id": 1,
        "name": "Akito",
        "username": "Akito"
      }
    },
    "status": true
  }
]
(Don't worry about the array wrapping.)

I need to use the value of comment.text, which is possible when working through raw curl requests.

However, as is seen above in the this REST client's code snippet, the PinInfo implementation is extremely meagre. It lacks most of the information.

Now, I am wondering, if that is related to breaking changes in the API. The server's current version is 2020.2.2 (build 85899). Did older versions not have all the information, as is seen in the JSON snippet, or is the implementation lacking in this REST client?

Is there a way to get that info nicely through this REST client or do I have to manually parse the JSON in my Kotlin app, to get the information needed?

theAkito avatar Mar 14 '21 02:03 theAkito