Browse Source

feat(iot-hub): add getPublishedVersion and getLatestVersion API methods

pull/15539/head
Andrii Shvaika 1 month ago
parent
commit
d1b85e7f3f
  1. 14
      ui-ngx/src/app/core/http/iot-hub-api.service.ts

14
ui-ngx/src/app/core/http/iot-hub-api.service.ts

@ -114,6 +114,20 @@ export class IotHubApiService {
);
}
public getPublishedVersion(itemId: string, config?: IotHubRequestConfig): Observable<MpItemVersionView> {
return this.http.get<MpItemVersionView>(
`${this.baseUrl}/api/items/${itemId}/published`,
{ params: this.buildParams(config) }
);
}
public getLatestVersion(itemId: string, config?: IotHubRequestConfig): Observable<MpItemVersionView> {
return this.http.get<MpItemVersionView>(
`${this.baseUrl}/api/items/${itemId}/latest`,
{ params: this.buildParams(config) }
);
}
public getVersionReadme(versionId: string, config?: IotHubRequestConfig): Observable<string> {
return this.http.get(`${this.baseUrl}/api/versions/${versionId}/readme`, {
params: this.buildParams(config),

Loading…
Cancel
Save