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
stringobjectobjectobjectArray| Param | Type | Description |
|---|---|---|
| client | ConnectClient |
A ConnectClient instance. |
| baseUri | string |
The base URI of the resource |
stringReturns the base URI of the resource mapped by this class.
Kind: instance property of GenericResource
objectRetrieve 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. |
objectCreate a new resource.
Kind: instance method of GenericResource
Returns: object – The created resource.
| Param | Type | Description |
|---|---|---|
| obj | object |
The resource to create. |
objectUpdate 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. |
ArraySearch 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. |