The GenericResource map a generic endpoint of the CloudBlue
Connect API. Each API endpoint should extend this class and
implements endpoint specific actions and subresources access.
Kind: global class
Category: Resources
string
object
object
object
Array
Param | Type | Description |
---|---|---|
client | ConnectClient |
A ConnectClient instance. |
baseUri | string |
The base URI of the resource |
string
Returns the base URI of the resource mapped by this class.
Kind: instance property of GenericResource
object
Retrieve a resource by its unique identifier.
Kind: instance method of GenericResource
Returns: object
– The resource.
Param | Type | Description |
---|---|---|
id | string |
The unique identifier of the resource to retrieve. |
object
Create a new resource.
Kind: instance method of GenericResource
Returns: object
– The created resource.
Param | Type | Description |
---|---|---|
obj | object |
The resource to create. |
object
Update a resource.
Kind: instance method of GenericResource
Returns: object
– The updated resource.
Param | Type | Description |
---|---|---|
id | string |
The unique identifier of the resource to update. |
obj | object |
The eventually partial resource to update. |
Delete a resource.
Kind: instance method of GenericResource
Param | Type | Description |
---|---|---|
id | string |
The unique identifier of the resource to delete. |
Array
Search for a resource.
Kind: instance method of GenericResource
Returns: Array
– An array of resources that match the provided filters.
Param | Type | Description |
---|---|---|
filters | object |
The query to send to the server as a RQL object. |
Fetch the URL and returns a response.
Kind: instance method of GenericResource
Param | Type | Description |
---|---|---|
url | string |
the URL to fetch. |
options | object |
the request options. |