Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 22028f4

Browse files
committed
extended examples
1 parent f0d21d7 commit 22028f4

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ Step 2. Add the dependency
3333

3434
## Usage
3535

36+
Very short examples you can also find within the tests [goto tests](https://github.com/rocketbase-io/toggl-report-api/blob/master/src/test/java/io/rocketbase/toggl/api/TogglReportApiTest.java)
37+
38+
### simply get it running
3639
```java
3740
public static void main(String[] args) {
3841
TogglReportApi togglReportApi = new TogglReportApiBuilder()
39-
.setApiToken(API_TOKEN)
40-
.setUserAgent(USER_AGENT)
41-
.setWorkspaceId(WORKSPACE_ID)
42+
.apiToken(API_TOKEN)
43+
.userAgent(USER_AGENT)
44+
.workspaceId(WORKSPACE_ID)
4245
.build();
4346

4447
WeeklyUsersTimeResult result = togglReportApi.weeklyUsersTime()
@@ -49,8 +52,18 @@ public static void main(String[] args) {
4952
}
5053
```
5154

52-
Very short examples your can also find within the tests [goto tests](https://github.com/rocketbase-io/toggl-report-api/blob/master/src/test/java/io/rocketbase/toggl/api/TogglReportApiTest.java)
55+
### FetchAllDetailed
56+
Fetch full list of all Detailed Results. The FetchAllDetailed cares about paging
57+
58+
```java
59+
List<TimeEntry> resultList = FetchAllDetailed.getAll(togglReportApi.detailed()
60+
.until(start)
61+
.since(end)
62+
.billable(Billable.BOTH));
63+
```
64+
5365

66+
### Spring Context
5467

5568
To use this client in a Spring application consider the following setup:
5669

0 commit comments

Comments
 (0)