All URIs are relative to https://DOMAIN.api.engagement.dimelo.com/1.0
Method | HTTP request | Description |
---|---|---|
CreateTimeSheet | Post /time_sheets | Creating a time sheet |
DeleteTimeSheet | Delete /time_sheets/{timeSheetId} | Deleting a time sheet |
GetAllTimeSheets | Get /time_sheets | Getting all time sheets |
GetTimeSheet | Get /time_sheets/{timeSheetId} | Getting a time sheet from its id |
UpdateTimeSheet | Put /time_sheets/{timeSheetId} | Updating a time sheet |
TimeSheet CreateTimeSheet(ctx, label, optional) Creating a time sheet
This method creates a time sheet. In case of success it renders the time sheet, otherwise, it renders an error (422 HTTP code). Authorization: only users that can create time sheet.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
label | string | The label of the time sheet. | |
optional | *CreateTimeSheetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a CreateTimeSheetOpts struct
Name | Type | Description | Notes |
---|
active | optional.Bool| true or false, this field is used to enable/disable a time sheet. | sourceIds | optional.Interface of []string| An array containing id of each source using your time sheet. | holidaysRegion | optional.String| A string containing the first two letters of your country (example: "fr"/"en"/"es"), useful to bootstrap default holidays following to a country. | holidays | optional.String| An array containing one or more hash of holidays, a holiday must contain a name (string) and a date (string), the date must be in a valid format, a valid format is a format corresponding to your domain’s locale). | mondayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. For example: “a-b,c-d”: “a” is the beginning of the first interval of the day, “b” is the ending of the first interval of the day, “c” is the beginning of the second interval of the day, “d” is the ending of the second interval of the day | tuesdayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | wednesdayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | thursdayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | fridayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | saturdayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | sundayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TimeSheet DeleteTimeSheet(ctx, timeSheetId) Deleting a time sheet
This method destroys an existing time sheet. It renders time sheet itself. It renders a 404 if id is invalid.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
timeSheetId | string |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAllTimeSheetsResponse GetAllTimeSheets(ctx, optional) Getting all time sheets
This method renders time sheets ordered by active and label.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *GetAllTimeSheetsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetAllTimeSheetsOpts struct
Name | Type | Description | Notes |
---|---|---|---|
offset | optional.Int32 | The record index to start. Default value is 0. | |
limit | optional.Int32 | The max number of records to return. Default value is 30, max value is 150. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TimeSheet GetTimeSheet(ctx, timeSheetId) Getting a time sheet from its id
This method renders a time sheet from given id. Authorization: only users that can see time sheets in administration section.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
timeSheetId | string |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TimeSheet UpdateTimeSheet(ctx, timeSheetId, optional) Updating a time sheet
This method updates an existing team from given attributes and renders it in case of success.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
timeSheetId | string | ||
optional | *UpdateTimeSheetOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UpdateTimeSheetOpts struct
Name | Type | Description | Notes |
---|
active | optional.Bool| true or false, this field is used to enable/disable a time sheet. | label | optional.String| The label of the time sheet. | sourceIds | optional.Interface of []string| An array containing id of each source using your time sheet. | holidays | optional.String| An array containing one or more hash of holidays, a holiday must contain a name (string) and a date (string), the date must be in a valid format, a valid format is a format corresponding to your domain’s locale). | mondayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. For example: “a-b,c-d”: “a” is the beginning of the first interval of the day, “b” is the ending of the first interval of the day, “c” is the beginning of the second interval of the day, “d” is the ending of the second interval of the day | tuesdayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | wednesdayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | thursdayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | fridayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | saturdayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | sundayHours | optional.String| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]