new Fmrest(obj)
Create an Fmrest object
Parameters:
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
obj |
Object | An object Properties
|
Methods
-
createGlobal(field, value)
-
Create Global wrapper
Parameters:
Name Type Description fieldstring a field name from filemaker
valuestring the fields value
Returns:
- A new Global Object
- Type
- Global
-
createPortal(name, offset, range)
-
Create Portal wrapper
Parameters:
Name Type Description namestring a portal's name from filemaker
offsetnumber starting point of records to return
rangenumber how many records should be returned
Returns:
- A new Portal Object
- Type
- Portal
-
createRecord(json)
-
Create Record wrapper
Parameters:
Name Type Description jsonObject a json object with field-value pairs
Returns:
- A promise that resolves with a record id
- Type
- Promise
-
createRequest()
-
Create Request wrapper
Returns:
- A new Request Object
- Type
- Request
-
createSort(field, sort)
-
Create Sort wrapper
Parameters:
Name Type Description fieldstring a field name from filemaker
sortstring a sort order (ascend, descend or value list name)
Returns:
- A new Sort Object
- Type
- Sort
-
deleteRecord(id)
-
Delete Record wrapper
Parameters:
Name Type Description idnumber filemakers internal record id
Returns:
- A promise that resolves with a boolean
- Type
- Promise
-
editRecord(id, json, modId)
-
Edit Record wrapper
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
-
find(obj)
-
Find wrapper
Parameters:
Name Type Description objObject An object
Properties
Name Type Description requestsArray An array of Request Objects
sortsArray An array of Sort Objects
offsetnumber starting point of records to return
rangenumber how many records should be returned
portalsArray An array of Portal Objects
Returns:
- A promise that resolves with multiple records
- Type
- Promise
-
getAllRecords(obj)
-
Get All Records wrapper
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
-
getRecord(id, portals)
-
Get Record wrapper
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
-
login()
-
Login wrapper
Returns:
- A promise that resolves with a token
- Type
- Promise
-
logout()
-
Logout wrapper
Returns:
- A promise that resolves with a boolean
- Type
- Promise
-
setGlobals(globals)
-
Set Globals wrapper
Parameters:
Name Type Description globalsArray An Array of Global Objects
Returns:
- A promise that resolves with a boolean
- Type
- Promise