-
Notifications
You must be signed in to change notification settings - Fork 0
Database API
The database functions can be found in databaseComms.swift. There are currently seven functions that can be used to interact with the database present. All seven are currently untested.
This function takes a username, password and email address, and adds them as a user
Logs the user in with the same username and password. Either this function or the sign in function must have been called before the database can really be used.
This function takes the name of the exercise as a string and three integers for the length of the exercise, the length of the rest periods, and the number of sets. The exercise is stored in a local database, so internet access is not required.
This function currently just takes PFObject of the current user and returns the first exercise registered to them. The ability to iterate though the others is in progress.
Given an existing exercise, and the same string and three integers from the creation function, this function will edit said exercise.
This function will create a record that a given user completed a given exercise on a certain time.
This function will return the first recorded log for a user/exercise pair if it exists. Further functionality in progress.