Flutter
Was this helpful?
Was this helpful?
String devId
➡ The dev-id provided to you when signing up with Terra
String referenceID
➡ A random string used to characterise a user on your server
returns
Future<SuccessMessage>
Initialise a device connection. This function needs to be called once only.
Connection connection
➡ An ENUM from the Connections class signifying the connection you wish to initiate for.
List<CustomPermissions> customPermissions
➡ This is defaulted as an empty Set
. If you want to make a more granular permissions request, you may send us a set of CustomPermissions
returns
Future<SuccessMessage>
Returns the user's User ID if the user exists, else returns null
Connection connection
➡ An ENUM from the Connection class signifying the connection you wish to retrieve user_id from.
returns
Future<UserId?>
Connection connection
➡ An ENUM from the Connections class signifying the connection you wish to initiate for.
DateTime startDate
➡ The beginning of the request in either Date or Unix Timestamp
DateTime endDate
➡ The end of the request in either Date or Unix Timestamp
(Optional) bool toWebhook
➡ Whether or not to send data to your webhook. If false, DataMessage
on the returned Future
will contain the data in the data
field.
returns
Future<DataMessage?>
Connection connection
➡ An ENUM from the Connections class signifying the connection you wish to initiate for.
DateTime startDate
➡ The beginning of the request in either Date or Unix Timestamp
DateTime endDate
➡ The end of the request in either Date or Unix Timestamp
(Optional) bool toWebhook
➡ Whether or not to send data to your webhook. If false, DataMessage
on the returned Future
will contain the data in the data
field.
returns
Future<DataMessage?>
Connection connection
➡ An ENUM from the Connections class signifying the connection you wish to initiate for.
DateTime startDate
➡ The beginning of the request in either Date or Unix Timestamp
DateTime endDate
➡ The end of the request in either Date or Unix Timestamp
(Optional) bool toWebhook
➡ Whether or not to send data to your webhook. If false, DataMessage
on the returned Future
will contain the data in the data
field.
returns
Future<DataMessage?>
Connection connection
➡ An ENUM from the Connections class signifying the connection you wish to initiate for.
DateTime startDate
➡ The beginning of the request in either Date or Unix Timestamp
DateTime endDate
➡ The end of the request in either Date or Unix Timestamp
(Optional) bool toWebhook
➡ Whether or not to send data to your webhook. If false, DataMessage
on the returned Future
will contain the data in the data
field.
returns
Future<DataMessage?>
Connection connection
➡ An ENUM from the Connections class signifying the connection you wish to initiate for.
DateTime startDate
➡ The beginning of the request in either Date or Unix Timestamp
DateTime endDate
➡ The end of the request in either Date or Unix Timestamp
(Optional) bool toWebhook
➡ Whether or not to send data to your webhook. If false, DataMessage
on the returned Future
will contain the data in the data
field.
returns
Future<DataMessage?>
Connection connection
➡ An ENUM from the Connections class signifying the connection you wish to initiate for.
(Optional) bool toWebhook
➡ Whether or not to send data to your webhook. If false, DataMessage
on the returned Future
will contain the data in the data
field.
returns
Future<SuccessMessage?>
:
Returns a SuccessMessage
object wrapped in a Future
. This contains information about whether the request was successful or if there was an error.
Connection connection
:
Specifies the connection type to which the planned workout data will be posted.
payload
(TerraPlannedWorkout
):
The payload containing the details of the planned workout. This includes metadata such as the workout type, duration, and intensity, as well as a list of steps to complete the workout.
returns
Future<SuccessMessage?>
:
Returns a SuccessMessage
object wrapped in a Future
. This contains information about whether the request was successful or if there was an error.
Fetches permissions granted by Health connect
**returns**
`Promise<Array<String>>
`
String token
➡ A token used for authentication. Generate one here:
bool schedulerOn
➡ A boolean dictating if you wish turn on background delivery. Defaults to true. Please see Background Delivery section for setup. On iOS, follow .