Skip to content

Commit ef79cf6

Browse files
Added pagination example
Fixed branching header syntax.
1 parent 6e3bade commit ef79cf6

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A Java SDK for [Helium Blockchain APIs](https://docs.helium.com/api/blockchain/i
77

88
Easily integrate to Helium Blockhain API in your java applications for `Android`, `Backend`, `Console`...
99

10-
The SDK is based on `Java 1.8` and makes use of the following dependencies:
10+
The SDK is based on `Java 1.8` uses the following dependencies:
1111

1212
* OkHttp3
1313
* Gson
@@ -16,6 +16,8 @@ The SDK is based on `Java 1.8` and makes use of the following dependencies:
1616

1717
## Installation
1818

19+
> **TODO**: Update here after GithubRepository integration.
20+
1921
The SDK is not available on any maven repository yet. Currently only way to include it in your projects is by copying the source code.
2022

2123
When we feel comfortable on releasing first alpha, it will be available on a maven repository.
@@ -43,9 +45,16 @@ HotspotResponse resp = heliumApi.hotspots().searchHotspotsByLocationBox()
4345

4446
## Pagination
4547

46-
Some of the APIs return results in pages. In order to fetch multiple pages you should transfer previous response's `cursor` property to the next request. Currently this is responsibility of the SDK user.
48+
Some of the APIs return results in pages. In order to fetch multiple pages you should transfer previous response's `cursor` property to the next request. Currently, this is responsibility of the SDK user.
49+
50+
```java
51+
HeliumApi heliumApi = new HeliumApi();
52+
53+
HotspotsResponse firstPage = heliumApi.hotspots().getHotspots().execute();
54+
HotspotsResponse secondPage = heliumApi.hotspots().getHotspots().cursor(firstPage.cursor).execute();
4755

48-
//TODO add example.
56+
System.out.println(secondPage.data);
57+
```
4958

5059
# Contributing
5160

@@ -55,7 +64,7 @@ We value all kind of contributions and try to be as welcoming as possible. Pleas
5564

5665
Maven is used as the build tool. Currently build process is quite simple so not sharing much details here.
5766

58-
## Branch Model & Versioning
67+
## Branch Model & Versioning
5968

6069
We use [GitFlow Workflow](https://nvie.com/posts/a-successful-git-branching-model/) and [Semantic Versioning](https://semver.org/).
6170

0 commit comments

Comments
 (0)