Class: KubeJsonApi#
+ +Hierarchy#
+-
+
JsonApi<KubeJsonApiData>
+
↳ KubeJsonApi
Table of contents#
+Constructors#
+-
+
- constructor +
Properties#
+ +Methods#
+-
+
- del +
- get +
- getResponse +
- parseError +
- parseResponse +
- patch +
- post +
- put +
- request +
- writeLog +
- forCluster +
Constructors#
+constructor#
+• new KubeJsonApi(config, reqInit?)
Parameters#
+| Name | +Type | +
|---|---|
config |
+JsonApiConfig |
+
reqInit? |
+RequestInit |
+
Inherited from#
+JsonApi<KubeJsonApiData>.constructor
+Properties#
+config#
+• Readonly config: JsonApiConfig
Inherited from#
+JsonApi.config
++
onData#
+• onData: EventEmitter<[KubeJsonApiData, Response]>
Inherited from#
+JsonApi.onData
++
onError#
+• onError: EventEmitter<[JsonApiErrorParsed, Response]>
Inherited from#
+JsonApi.onError
++
reqInit#
+• Protected Optional reqInit: RequestInit
Inherited from#
+JsonApi.reqInit
++
configDefault#
+▪ Static configDefault: Partial<JsonApiConfig>
Inherited from#
+JsonApi.configDefault
++
reqInitDefault#
+▪ Static reqInitDefault: RequestInit
Inherited from#
+JsonApi.reqInitDefault
+Methods#
+del#
+▸ del<T>(path, params?, reqInit?): Promise<T>
Type parameters#
+| Name | +Type | +
|---|---|
T |
+KubeJsonApiData |
+
Parameters#
+| Name | +Type | +
|---|---|
path |
+string |
+
params? |
+JsonApiParams<any> |
+
reqInit |
+RequestInit |
+
Returns#
+Promise<T>
Inherited from#
+JsonApi.del
++
get#
+▸ get<T>(path, params?, reqInit?): Promise<T>
Type parameters#
+| Name | +Type | +
|---|---|
T |
+KubeJsonApiData |
+
Parameters#
+| Name | +Type | +
|---|---|
path |
+string |
+
params? |
+JsonApiParams<any> |
+
reqInit |
+RequestInit |
+
Returns#
+Promise<T>
Inherited from#
+JsonApi.get
++
getResponse#
+▸ getResponse(path, params?, init?): Promise<Response>
Parameters#
+| Name | +Type | +
|---|---|
path |
+string |
+
params? |
+JsonApiParams<any> |
+
init |
+RequestInit |
+
Returns#
+Promise<Response>
Inherited from#
+JsonApi.getResponse
++
parseError#
+▸ Protected parseError(error, res): string[]
Parameters#
+| Name | +Type | +
|---|---|
error |
+any |
+
res |
+Response |
+
Returns#
+string[]
Overrides#
+JsonApi.parseError
++
parseResponse#
+▸ Protected parseResponse<D>(res, log): Promise<D>
Type parameters#
+| Name | +
|---|
D |
+
Parameters#
+| Name | +Type | +
|---|---|
res |
+Response |
+
log |
+JsonApiLog |
+
Returns#
+Promise<D>
Inherited from#
+JsonApi.parseResponse
++
patch#
+▸ patch<T>(path, params?, reqInit?): Promise<T>
Type parameters#
+| Name | +Type | +
|---|---|
T |
+KubeJsonApiData |
+
Parameters#
+| Name | +Type | +
|---|---|
path |
+string |
+
params? |
+JsonApiParams<any> |
+
reqInit |
+RequestInit |
+
Returns#
+Promise<T>
Inherited from#
+JsonApi.patch
++
post#
+▸ post<T>(path, params?, reqInit?): Promise<T>
Type parameters#
+| Name | +Type | +
|---|---|
T |
+KubeJsonApiData |
+
Parameters#
+| Name | +Type | +
|---|---|
path |
+string |
+
params? |
+JsonApiParams<any> |
+
reqInit |
+RequestInit |
+
Returns#
+Promise<T>
Inherited from#
+JsonApi.post
++
put#
+▸ put<T>(path, params?, reqInit?): Promise<T>
Type parameters#
+| Name | +Type | +
|---|---|
T |
+KubeJsonApiData |
+
Parameters#
+| Name | +Type | +
|---|---|
path |
+string |
+
params? |
+JsonApiParams<any> |
+
reqInit |
+RequestInit |
+
Returns#
+Promise<T>
Inherited from#
+JsonApi.put
++
request#
+▸ Protected request<D>(path, params?, init?): Promise<D>
Type parameters#
+| Name | +
|---|
D |
+
Parameters#
+| Name | +Type | +
|---|---|
path |
+string |
+
params? |
+JsonApiParams<any> |
+
init |
+RequestInit |
+
Returns#
+Promise<D>
Inherited from#
+JsonApi.request
++
writeLog#
+▸ Protected writeLog(log): void
Parameters#
+| Name | +Type | +
|---|---|
log |
+JsonApiLog |
+
Returns#
+void
Inherited from#
+JsonApi.writeLog
++
forCluster#
+▸ Static forCluster(clusterId): KubeJsonApi
Parameters#
+| Name | +Type | +
|---|---|
clusterId |
+string |
+