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 json
Object 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 portals
Array An Array of Portal Objects
Returns:
- form-encoded string
- Type
- string
-
delete(id)
-
Delete a Record
Parameters:
Name Type Description id
number 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 id
number filemakers internal record id
json
Object a json object with field-value pairs
modId
number 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 id
number filemakers internal record id
portals
Array An Array of Portal Objects
Returns:
- A promise that resolves with a record
- Type
- Promise
-
getAll(obj)
-
Get All Records
Parameters:
Name Type Description obj
Object An object
Properties
Name Type Description offset
number starting point of records to return
range
number how many records should be returned
sorts
Array An array of Sort Objects
portals
Array An array of Portal Objects
Returns:
- A promise that resolves with multiple records
- Type
- Promise