-
Notifications
You must be signed in to change notification settings - Fork 2
ts.Uploader
The uploader handles submitting data to the server. This module will primarily be used in the Backup and Publish UX.
##Interface
-
void register(String host, int port, String deviceId)
registers the device with the server -
Boolean verifyProfile(ts.User profile)
check if the profile is ready to be uploaded -
void uploadProfile(ts.User profile)
uploads a user profile to the server -
verifyProject(ts.Translator.Project project)
checks if the project is ready to be uploaded -
getQuestions(ts.Translator.Project project)
returns a list of checking questions for the project -
void updateQuestions(ts.Translator.Project project, someArray)
saves the state of questions displayed to the user -
void uploadProject(ts.Translator.Project project)
uploads a project to the server
###Register This module will submit ssh keys to the server so that the app can push git repositories to the server. The code and specs for the server side of this method can be found at https://github.com/unfoldingWord-dev/ts-server.
This method should generate key pairs if needed.
##Verify Profile This method will check that required values are present in the user profile. Required values are
- name
##Upload Profile
This method will ensure the profile directory is a git repository and initialize it if not. Then it will push the repository to the server. Ssh should be configured to use the key-pair generated in the register
method. The remote end point is:
<git user>@<git server>:tS/<device id>/profile
See Technical Standards for the current values of git user
and git server
##Verify Project
TODO: finish
##Get Questions
TODO: finish
##Update Questions
TODO: finish
##Upload Project
This method will ensure the project directory is a git repository and initialize it if not. Then it will push the repository to the server. Ssh should be configured to use the key-pair generated by the register
method. The remote end point is:
<git user>@<git server>:tS/<device id>/<project repository name>
See Technical Standards for the current values of git user
, git server
, and project repository name
.