This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Resource
S222em edited this page Jun 10, 2022
·
51 revisions
Base for all resources
Name | Type |
---|---|
R |
extends object & { id? : string } |
-
Base
<R
>↳
Resource
↳↳
GroupedLight
• new Resource<R
>(bridge
)
Name | Type |
---|---|
R |
extends object & { id? : string } |
Name | Type |
---|---|
bridge |
Bridge |
Base<R>.constructor
• Readonly
bridge: Bridge
The bridge this Base belongs to
Base.bridge
• data: R
Raw data received from the API
Base.data
• Abstract
type: ApiResourceType
The type of this resource
• get
id(): string
The ID of this resource
string
▸ _clone(): Resource
<R
>
Clones this Base
internal
Resource
<R
>
Base._clone
▸ Protected
Abstract
_edit(options
): Promise
<void
>
Name | Type |
---|---|
options |
R |
Promise
<void
>
▸ _patch(data
): void
Patches this Base with new data received from the API
internal
Name | Type | Description |
---|---|---|
data |
R |
Data to patch |
void
Base._patch
▸ _update(data
): Resource
<R
>
Clones and patches this Base
internal
Name | Type | Description |
---|---|---|
data |
any |
Data to patch |
Resource
<R
>
Base._update
▸ Abstract
fetch(): Promise
<Resource
<any
>>
Promise
<Resource
<any
>>