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

Commit

Permalink
extended examples
Browse files Browse the repository at this point in the history
  • Loading branch information
melistik committed Mar 9, 2017
1 parent f0d21d7 commit 22028f4
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@ Step 2. Add the dependency

## Usage

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)

### simply get it running
```java
public static void main(String[] args) {
TogglReportApi togglReportApi = new TogglReportApiBuilder()
.setApiToken(API_TOKEN)
.setUserAgent(USER_AGENT)
.setWorkspaceId(WORKSPACE_ID)
.apiToken(API_TOKEN)
.userAgent(USER_AGENT)
.workspaceId(WORKSPACE_ID)
.build();

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

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)
### FetchAllDetailed
Fetch full list of all Detailed Results. The FetchAllDetailed cares about paging

```java
List<TimeEntry> resultList = FetchAllDetailed.getAll(togglReportApi.detailed()
.until(start)
.since(end)
.billable(Billable.BOTH));
```


### Spring Context

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

Expand Down

0 comments on commit 22028f4

Please sign in to comment.