import ServerCommunication from 'timer_app/src/helpers/serverCommunication.js'
ServerCommunication
This class handle all the communication with the server Providing a set of methods that returns Promises
Constructor Summary
Public Constructor | ||
public |
constructor(baseUrl: string) |
Method Summary
Public Methods | ||
public |
createTimer(attrs: APITimer): Promise Create a new timer |
|
public |
deleteTimer(id: string): Promise Delete a timer |
|
public |
|
|
public |
startTimer(arg: Object): Promise Start a timer |
|
public |
Stop a timer |
|
public |
updateTimer(attrs: APITimer): Promise Change a property of a timer |
Public Constructors
Public Methods
public createTimer(attrs: APITimer): Promise source
Create a new timer
Params:
Name | Type | Attribute | Description |
attrs | APITimer |
public deleteTimer(id: string): Promise source
Delete a timer
Params:
Name | Type | Attribute | Description |
id | string |