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
Copy file name to clipboardExpand all lines: README.md
+72-2Lines changed: 72 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,8 +79,78 @@ to make working with the API easier, and the `pubsub` module which is a library
79
79
80
80
### Public vs Secured APIs
81
81
82
-
For the API client, there are two classes, `DefaultApi` and `PublicApi`. The `DefaultApi` contains methods that take your API key, and `PublicApi` contains api calls
83
-
that can be made directly from a browser/mobile device/etc.
82
+
For the API client, there are two classes, `DefaultApi` and `PublicApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains api calls
83
+
that can be made directly from a browser/mobile device/etc without authentication.
84
+
85
+
## Quick Start
86
+
87
+
### Using Authenticated APIs (DefaultApi)
88
+
89
+
**Important:** You must set your API key on the ApiClient before making authenticated requests. If you don't, requests will fail with a 401 error.
90
+
91
+
```java
92
+
importcom.fastcomments.invoker.ApiClient;
93
+
importcom.fastcomments.invoker.ApiException;
94
+
importcom.fastcomments.api.DefaultApi;
95
+
importcom.fastcomments.model.*;
96
+
97
+
publicclassExample {
98
+
publicstaticvoidmain(String[] args) {
99
+
// Create and configure the API client
100
+
ApiClient apiClient =newApiClient();
101
+
102
+
// REQUIRED: Set your API key (get this from your FastComments dashboard)
103
+
apiClient.setApiKey("YOUR_API_KEY_HERE");
104
+
105
+
// Create the API instance with the configured client
0 commit comments