ProjectFileClient
Project client that stores data in a file
Constructor Summary
Public Constructor | ||
public |
constructor(Options: Object) Create a new ProjectFileClient instance |
Member Summary
Public Members | ||
public |
Cached (in memory) version for all projects |
|
public |
Folder to store the project in |
Method Summary
Public Methods | ||
public |
Retrieve all projects |
|
public |
putAllProjects(allProjects: Object): Promise Store all projects |
|
public |
putJsonFile(path: String, json: Object, pretty: Boolean): Promise Store json in a file |
Protected Methods | ||
protected |
getJsonFile(path: String): Promise Retrieve the contents of a JSON file |
Public Constructors
Public Members
Public Methods
public getAllProjects(): Promise source
Retrieve all projects
Return:
Promise | Promise that resolves an object containing all projects or an empty object in case of a problem |
public putAllProjects(allProjects: Object): Promise source
Store all projects
Params:
Name | Type | Attribute | Description |
allProjects | Object | All projects |
public putJsonFile(path: String, json: Object, pretty: Boolean): Promise source
Store json in a file