Skip to content

Commit 80d101e

Browse files
author
Sergey Shelomentsev
committed
chore: add more samples in readme
1 parent 504a73c commit 80d101e

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ public class FingerprintApiExample {
135135
} catch (ApiException e) {
136136
System.err.println("Exception when calling FingerprintApi.getEvent:" + e.getMessage());
137137
}
138+
139+
// Update an event with a given requestId
140+
try {
141+
EventUpdateRequest request = new EventUpdateRequest();
142+
request.setLinkedId("myNewLinkedId");
143+
api.updateEvent(FPJS_REQUEST_ID, request);
144+
} catch (ApiException e) {
145+
System.err.println("Exception when calling FingerprintApi.updateEvent:" + e.getMessage());
146+
}
147+
138148
// Get a specific visitor's all visits
139149
try {
140150
// Fetch all visits with a given visitorId, with a page limit
@@ -161,6 +171,13 @@ public class FingerprintApiExample {
161171
} catch (ApiException e) {
162172
System.err.println("Exception when calling FingerprintApi.getVisits:" + e.getMessage());
163173
}
174+
175+
// Delete visitor data with a given visitorID
176+
try {
177+
api.deleteVisitorData(FPJS_VISITOR_ID);
178+
} catch (ApiException e) {
179+
System.err.println("Exception when calling FingerprintApi.deleteVisitorData:" + e.getMessage());
180+
}
164181
}
165182
}
166183
```

template/README.mustache

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,16 @@ public class FingerprintApiExample {
162162
} catch (ApiException e) {
163163
System.err.println("Exception when calling FingerprintApi.getEvent:" + e.getMessage());
164164
}
165+
166+
// Update an event with a given requestId
167+
try {
168+
EventUpdateRequest request = new EventUpdateRequest();
169+
request.setLinkedId("myNewLinkedId");
170+
api.updateEvent(FPJS_REQUEST_ID, request);
171+
} catch (ApiException e) {
172+
System.err.println("Exception when calling FingerprintApi.updateEvent:" + e.getMessage());
173+
}
174+
165175
// Get a specific visitor's all visits
166176
try {
167177
// Fetch all visits with a given visitorId, with a page limit
@@ -188,6 +198,13 @@ public class FingerprintApiExample {
188198
} catch (ApiException e) {
189199
System.err.println("Exception when calling FingerprintApi.getVisits:" + e.getMessage());
190200
}
201+
202+
// Delete visitor data with a given visitorID
203+
try {
204+
api.deleteVisitorData(FPJS_VISITOR_ID);
205+
} catch (ApiException e) {
206+
System.err.println("Exception when calling FingerprintApi.deleteVisitorData:" + e.getMessage());
207+
}
191208
}
192209
}
193210
```

0 commit comments

Comments
 (0)