new RecordAPI(Auth)
Create a new Record API
Parameters:
| Name | Type | Description |
|---|---|---|
Auth |
AuthAPI | Authorization to the API |
Methods
-
create(json)
-
Create a Record
Parameters:
Name Type Description jsonObject a json object with field-value pairs
Returns:
- A promise that resolves with a record id
- Type
- Promise
-
createPortalQueries(portals)
-
Helper function to help parse Portal objects into a form-encoded string to be used in a GET request
Parameters:
Name Type Description portalsArray An Array of Portal Objects
Returns:
- form-encoded string
- Type
- string
-
delete(id)
-
Delete a Record
Parameters:
Name Type Description idnumber filemakers internal record id
Returns:
- A promise that resolves with a boolean
- Type
- Promise
-
edit(id, json, modId)
-
Edit a Record
Parameters:
Name Type Description idnumber filemakers internal record id
jsonObject a json object with field-value pairs
modIdnumber the last modification id
Returns:
- A promise that resolves with a record id
- Type
- Promise
-
get(id, portals)
-
Get a Record
Parameters:
Name Type Description idnumber filemakers internal record id
portalsArray An Array of Portal Objects
Returns:
- A promise that resolves with a record
- Type
- Promise
-
getAll(obj)
-
Get All Records
Parameters:
Name Type Description objObject An object
Properties
Name Type Description offsetnumber starting point of records to return
rangenumber how many records should be returned
sortsArray An array of Sort Objects
portalsArray An array of Portal Objects
Returns:
- A promise that resolves with multiple records
- Type
- Promise