source_api_sdkV2.bs

import "pkg:/source/api/baseRequest.bs"

' V2 user endpoint shims — covers Jellyfin 10.9+
' All /Users/{userId}/ paths were removed in 10.9. Endpoints moved to top-level
' with userId passed as a query parameter. Verified against jellyfin-openapi-10.9.0.json.
' Do NOT call these functions directly. Use the ApiClient class via GetApi().
namespace sdkV2
  namespace users

    ' Get user profile image URL.
    ' V2: GET /UserImage?userId=&type=&index=
    function GetImageURL(id as string, imagetype = "primary" as string, imageindex = 0 as integer, params = {} as object) as dynamic
      queryParams = { userId: id, type: imagetype, index: imageindex }
      queryParams.append(params)
      return buildURL("/UserImage", queryParams)
    end function

  end namespace
end namespace