A simple Java client for the Universe API.
The two basic entries are the ApplicationId
and the RedirectUri
. They must be set.
If these two entries are set, you need to get AuthorizationCode
. This is a one-time-only code, which
you get by calling the URL provided by client.getUrlToGetAuthorizationCode()
.
With this AuthorizationCode
you can request a BearerToken
. You can can request the BearerToken
only
one time with one AuthorizationCode
. After that the AuthorizationCode
is invalidated.
This can be achieved with client.requestBearerToken()
.
The BearerToken
can be used for all your future requests. It is usually valid for one month.
If the BearerToken
is set, you can use the actual API calls.
Full example, see Demo.
UniverseClient client = new UniverseClient(yourConfig);
// Get Events
List<Event> events = client.requestEvents(hostId);
events.forEach(event -> logger.info("Event: " + event.getTitle() + "(id:" + event.getId() + ")"));
// Get Attendees
List<Attendee> attendees = client.requestAttendeesInEvent(events.get(0).getId(), 5, 0);
We are using the Universe GraphQL API. Here are some thing to help with orientation with GraphQL.
You can test requests on Universes GraphiQL (Explorer);
Get Schema:
{
__schema {
queryType {
fields {
name
}
}
}
}
Installation guide for the latest release
If you need support as soon as possible and you can't wait for any pull request, feel free to use our support.
See the contributing guide for detailed instructions on how to get started with our project.
View the license of the current project or the summary including all dependencies