You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adminReply.setBody("These apples are healthsome");
432
-
Conversation.reply("66", adminReply);
438
+
Conversation.reply("66", adminReply);
433
439
434
440
// admin close
435
441
Admin admin =newAdmin().setId("1");
@@ -554,40 +560,40 @@ for (Counts.CountItem tag : companyTags) {
554
560
}
555
561
```
556
562
557
-
## Idioms
563
+
## Idioms
558
564
559
565
### HTTP requests
560
566
561
-
To signal local versus remote methods, calls that result in HTTP requests are performed
562
-
using static methods, for example `User.find()`.The objects returned by static methods
563
-
are built from server responses. The exception to the static idiom is where the `next()`,
567
+
To signal local versus remote methods, calls that result in HTTP requests are performed
568
+
using static methods, for example `User.find()`.The objects returned by static methods
569
+
are built from server responses. The exception to the static idiom is where the `next()`,
564
570
`hasNext()` and `nextPage()` methods on Collections are used to abstract over pagination.
565
571
566
572
### Pagination
567
573
568
-
SomeAPI classes have static `list()` methods that correspond to paginated API responses.
569
-
Thesereturn a Collection object (eg `UserCollection`) which can be iterated in two
574
+
SomeAPI classes have static `list()` methods that correspond to paginated API responses.
575
+
Thesereturn a Collection object (eg `UserCollection`) which can be iterated in two
570
576
ways
571
-
577
+
572
578
-The collection's `getPageItems()`, `hasNextPage()` and `nextPage()` methods - these are useful when you want to fetch one or just a few pages directly.
573
579
574
-
- Java's inbuilt iterator methods `next()` and `hasNext()` - these are useful when you want to fetch data without manually handling pagination.
580
+
- Java's inbuilt iterator methods `next()` and `hasNext()` - these are useful when you want to fetch data without manually handling pagination.
575
581
576
582
### Error handling
577
583
578
-
Youdo not need to deal with the HTTP response from an API call directly.
579
-
If there is an unsuccessful response then an IntercomException or a subclass
580
-
of IntercomException will be thrown. The exception will have Error objects
581
-
that can be examined via `getErrorCollection` and `getFirstError` for more detail.
582
-
584
+
Youdo not need to deal with the HTTP response from an API call directly.
585
+
If there is an unsuccessful response then an IntercomException or a subclass
586
+
of IntercomException will be thrown. The exception will have Error objects
587
+
that can be examined via `getErrorCollection` and `getFirstError` for more detail.
588
+
583
589
TheAPI throws the following runtime exceptions -
584
-
585
-
-AuthorizationException:for a 401 or 403 response
586
-
-InvalidException:for a 422 response or a local validation failure
590
+
591
+
-AuthorizationException:for a 401 or 403 response
592
+
-InvalidException:for a 422 response or a local validation failure
587
593
-RateLimitException:for a 429 rate limit exceeded response
588
594
-ClientException:for a general 4xx response
589
595
-ServerException:for a 500 or 503 response
590
-
-IntercomException: general exception
596
+
-IntercomException: general exception
591
597
592
598
593
599
## Configuration
@@ -596,12 +602,12 @@ The API throws the following runtime exceptions -
596
602
597
603
The client can be configured to accept any http stack that implements
598
604
`java.net.HttpURLConnection` by implementing the `HttpConnectorSupplier`
599
-
interface.
600
-
601
-
For example, to use [OkHttp](http://square.github.io/okhttp/) as a connection
602
-
supplier, create a supplier class -
603
-
604
-
```java
605
+
interface.
606
+
607
+
For example, to use [OkHttp](http://square.github.io/okhttp/) as a connection
0 commit comments