https://github.com/fastcomments/fastcomments-java
The FastComments Java SDK
https://github.com/fastcomments/fastcomments-java
Last synced: about 1 year ago
JSON representation
The FastComments Java SDK
- Host: GitHub
- URL: https://github.com/fastcomments/fastcomments-java
- Owner: FastComments
- License: mit
- Created: 2025-02-13T00:41:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-27T03:46:26.000Z (about 1 year ago)
- Last Synced: 2025-03-27T04:27:39.448Z (about 1 year ago)
- Language: Java
- Size: 1.93 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fastcomments-java
The FastComments Java SDK. You can use this to build secure and scalable backend applications that interact with FastComments, or build reactive client applications.
## Installation
### Maven
Add the Repsy repository to your project's POM:
```xml
repsy
FastComments Maven Repository on Repsy
https://repo.repsy.io/mvn/winrid/fastcomments
```
Then add the dependencies you need:
```xml
com.fastcomments
client
0.0.2
com.fastcomments
core
0.0.2
com.fastcomments
pubsub
0.0.2
```
### Gradle
Add the Repsy repository to your build.gradle file:
```groovy
repositories {
mavenCentral()
maven {
url "https://repo.repsy.io/mvn/winrid/fastcomments"
}
}
dependencies {
// API Client
implementation "com.fastcomments:client:0.0.2"
// Core Library (includes SSO)
implementation "com.fastcomments:core:0.0.2"
// PubSub Library (for live events)
implementation "com.fastcomments:pubsub:0.0.2"
}
```
### Library Contents
This library contains three modules. The generated API client, the core Java library which contains hand-written utilities
to make working with the API easier, and the `pubsub` module which is a library for subscribing to change feeds.
- [API Client Library Docs](./client/README.md)
- [Core Library Docs, Including SSO Examples](./core/README.md)
- [PubSub Library Docs](./pubsub/README.md)
### Public vs Secured APIs
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
that can be made directly from a browser/mobile device/etc.
## Notes
### Broadcast Ids
You'll see you're supposed to pass a `broadcastId` in some API calls. When you receive events, you'll get this ID back, so you know to ignore the event if you plan to optimistically apply changes on the client
(which you'll probably want to do since it offers the best experience). Pass a UUID here. The ID should be unique enough to not occur twice in a browser session.