new HarrogateClient(ip)
Creates a HarrogateClient object
Parameters:
| Name | Type | Description |
|---|---|---|
ip |
string | The ip adress/url of the Harrogate Server |
Members
url :string
url of the Harrogate Server
Type:
- string
Methods
addFile(username, project, dir, name) → {Promise.<File, error>}
Adds a file.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
project |
string | name of the project |
dir |
string | name of the directory |
name |
string | name of the file |
Returns:
- Type
- Promise.<File, error>
addFilePath(filepath) → {Promise.<File, error>}
Adds a file.
Parameters:
| Name | Type | Description |
|---|---|---|
filepath |
string | path of the file |
Returns:
- Type
- Promise.<File, error>
addProject(username, projectname) → {Promise.<Project, error>}
Adds a project.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
projectname |
string | name of the new project |
Returns:
- Type
- Promise.<Project, error>
addUser(username) → {Promise.<User, error>}
Adds a new Uuer.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
Returns:
- Type
- Promise.<User, error>
allProjects() → {Promise.<Array.<Project>, error>}
Gets the projects of all users.
Returns:
- Type
- Promise.<Array.<Project>, error>
compile(username, projectname) → {Promise.<{stdout: string, stderr: string}, error>}
Compiles a project.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
projectname |
string | name of the project |
Returns:
- Type
- Promise.<{stdout: string, stderr: string}, error>
deleteFile(username, project, dir, name) → {Promise.<void, error>}
Deletes a file.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
project |
string | name of the project |
dir |
string | name of the directory |
name |
string | name of the file |
Returns:
- Type
- Promise.<void, error>
deleteFilePath(filepath) → {Promise.<void, error>}
Deletes a file.
Parameters:
| Name | Type | Description |
|---|---|---|
filepath |
string | path of the file |
Returns:
- Type
- Promise.<void, error>
deleteProject(username, projectname) → {Promise.<void, error>}
Deletes a project.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
projectname |
string | name of the project |
Returns:
- Type
- Promise.<void, error>
deleteUser(username) → {Promise.<void, error>}
Deletes an user.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
Returns:
- Type
- Promise.<void, error>
getProjectInformation(username, project) → {Promise.<ProjectInfo, error>}
Gets information of a project.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
project |
string | name of the project |
Returns:
- Type
- Promise.<ProjectInfo, error>
getProjects(username) → {Promise.<Array.<Project>, error>}
Gets the projects of a specific user.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
Returns:
- Type
- Promise.<Array.<Project>, error>
getUsers() → {Promise.<Array.<User>, error>}
Gets an array of all users.
Returns:
- Type
- Promise.<Array.<User>, error>
loadFile(username, project, dir, name) → {Promise.<string, error>}
Loads the content of a file.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
project |
string | name of the project |
dir |
string | name of the directory |
name |
string | name of the file |
Returns:
- Type
- Promise.<string, error>
loadFilePath(filepath) → {Promise.<string, error>}
Loads the content of a file.
Parameters:
| Name | Type | Description |
|---|---|---|
filepath |
string | path of the file |
Returns:
- Type
- Promise.<string, error>
saveFile(username, project, dir, name, content) → {Promise.<void, error>}
Saves a file.
Parameters:
| Name | Type | Description |
|---|---|---|
username |
string | name of the user |
project |
string | name of the project |
dir |
string | name of the directory |
name |
string | name of the file |
content |
string | contant to save |
Returns:
- Type
- Promise.<void, error>
saveFilePath(filepath, content) → {Promise.<void, error>}
Saves a file.
Parameters:
| Name | Type | Description |
|---|---|---|
filepath |
string | path of the file |
content |
string | contant to save |
Returns:
- Type
- Promise.<void, error>