iTwin / imodels-clients

Monorepo for iModels API clients
MIT License
6 stars 1 forks source link

Request: support for user statistics #274

Closed tcobbs-bentley closed 1 month ago

tcobbs-bentley commented 2 months ago

Would it be possible to add support for the statistics information that is present in the full user information returned by the iModels REST API? I'm trying to update a project that currently gets this information using the now-deprecated iModelHub REST API, and while the iModels REST API contains the information in its response messages, as far as I can tell the imodels-clients package does not make the information available to programs. Just to be explicit, I need access to the following data:

{
  "statistics": {
    "pushedChangesetsCount": 0,
    "lastChangesetPushDate": null,
    "createdVersionsCount": 0,
    "lastAccessTime": "2023-03-01T14:04:28.0000000Z"
  }
}
tcobbs-bentley commented 2 months ago

I just discovered that the statistics data is already present in the results returned by the API, it's just not advertised in the User type. If I convert the User to JSON, the statistics are present. I assume that the User values are just constructed from the JSON returned by the REST API, and that JSON includes the statistics data.

robertas-kerpys commented 1 month ago

Hey, Travis, due to current priorities we will deliver user statistics properties sometimne over next two iterations. However this package is open sourced so if you urgently need this functionality, you are welcome to create a pull request.

ernest-ja commented 1 month ago

Hi, Travis, we have added "User Statistics". The changes are in the following package version: