55
66The Intercom PHP library provides convenient access to the Intercom APIs from PHP.
77
8+ ## Table of Contents
9+
10+ - [ Requirements] ( #requirements )
11+ - [ Installation] ( #installation )
12+ - [ Usage] ( #usage )
13+ - [ Exception Handling] ( #exception-handling )
14+ - [ Pagination] ( #pagination )
15+ - [ Legacy Sdk] ( #legacy-sdk )
16+ - [ Advanced] ( #advanced )
17+ - [ Custom Client] ( #custom-client )
18+ - [ Retries] ( #retries )
19+ - [ Timeouts] ( #timeouts )
20+ - [ Contributing] ( #contributing )
21+
822## Requirements
923
1024This SDK requires PHP ^8.1.
@@ -26,16 +40,14 @@ namespace Example;
2640
2741use Intercom\IntercomClient;
2842use Intercom\AiContent\Requests\CreateContentImportSourceRequest;
29- use Intercom\AiContent\Types\CreateContentImportSourceRequestStatus;
3043
3144$client = new IntercomClient(
3245 token: '<token >',
3346);
3447$client->aiContent->createContentImportSource(
3548 new CreateContentImportSourceRequest([
3649 'syncBehavior' => 'api',
37- 'status' => CreateContentImportSourceRequestStatus::Active->value,
38- 'url' => 'url',
50+ 'url' => 'https://www.example.com',
3951 ]),
4052);
4153
@@ -87,6 +99,7 @@ foreach ($items->getPages() as $page) {
8799}
88100```
89101
102+
90103## Legacy SDK
91104
92105While the new SDK has a lot of improvements, we at Intercom understand that it takes time to upgrade when there are breaking changes.
@@ -156,7 +169,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
156169Use the ` maxRetries ` request option to configure this behavior.
157170
158171``` php
159- $response = $client->articles->create (
172+ $response = $client->aiContent->createContentImportSource (
160173 ...,
161174 options: [
162175 'maxRetries' => 0 // Override maxRetries at the request level
@@ -169,7 +182,7 @@ $response = $client->articles->create(
169182The SDK defaults to a 30 second timeout. Use the ` timeout ` option to configure this behavior.
170183
171184``` php
172- $response = $client->articles->create (
185+ $response = $client->aiContent->createContentImportSource (
173186 ...,
174187 options: [
175188 'timeout' => 3.0 // Override timeout to 3 seconds
0 commit comments