GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - magicbell/magicbell-java-user-client: Java client SDK for the MagicBell API

BranchesTags
Open more actions menu

Latest commit

 

History

39 Commits
39 Commits

Folders and files

NameName
Last commit message
Last commit date
.changeset
.changeset
 
 
.github
.github
 
 
documentation
documentation
 
 
examples
examples
 
 
kotlin-example
kotlin-example
 
 
scripts
scripts
 
 
src/main/java/com/magicbell/magicbelluserclient
src/main/java/com/magicbell/magicbelluserclient
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
liblab.config.json
liblab.config.json
 
 
package.json
package.json
 
 
pom.xml
pom.xml
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

MagicbellUserClient Java SDK 0.5.0

Welcome to the MagicbellUserClient SDK documentation. This guide will help you get started with integrating and using the MagicbellUserClient SDK in your project.

This SDK was generated by liblab

Versions

  • API version: 2.0.0
  • SDK version: 0.5.0

About the API

OpenAPI 3.1.0 Specification for MagicBell API.

Table of Contents

  • Setup & Configuration
    • Supported Language Versions
    • Installation
  • Authentication
    • Access Token Authentication
  • Setting a Custom Timeout
  • Sample Usage
  • Services
  • Models
  • License

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: Java >= 1.8

Installation

If you use Maven, place the following within the dependency tag in your pom.xml file:

<dependency>
    <groupId>com.magicbell</groupId>
    <artifactId>magicbell-user-client</artifactId>
    <version>0.5.0</version>
</dependency>

If you use Gradle, paste the next line inside the dependencies block of your build.gradle file:

implementation group: com.magicbell, name: magicbell-user-client, version: 0.5.0

If you use JAR files, package the SDK by running the following command:

mvn compile assembly:single

Then, add the JAR file to your project's classpath.

Authentication

Access Token Authentication

The MagicbellUserClient API uses an Access Token for authentication.

This token must be provided to authenticate your requests to the API.

Setting the Access Token

When you initialize the SDK, you can set the access token as follows:

import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;

public class Main {

  public static void main(String[] args) {
    MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build();

    MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);
  }
}

If you need to set or update the access token after initializing the SDK, you can use:

magicbellUserClient.setAccessToken('YOUR_ACCESS_TOKEN');

Setting a Custom Timeout

You can set a custom timeout for the SDK's HTTP requests as follows:

import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;

public class Main {

  public static void main(String[] args) {
    MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().timeout(10000).build();
    MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);
  }
}

Sample Usage

Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

import com.magicbell.magicbelluserclient.MagicbellUserClient;
import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;
import com.magicbell.magicbelluserclient.exceptions.ApiError;
import com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection;
import com.magicbell.magicbelluserclient.models.ListInboxTokensParameters;

public class Main {

  public static void main(String[] args) {
    MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build();

    MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);

    ListInboxTokensParameters requestParameters = ListInboxTokensParameters.builder()
      .limit(8L)
      .startingAfter("starting_after")
      .endingBefore("ending_before")
      .build();

    try {
      InboxTokenResponseCollection response = magicbellUserClient.channels.listInboxTokens(requestParameters);

      System.out.println(response);
    } catch (ApiError e) {
      e.printStackTrace();
    }

    System.exit(0);
  }
}

Services

The SDK provides various services to interact with the API.

Below is a list of all available services with links to their detailed documentation:
Name
ChannelsService: [Java] [Kotlin]
IntegrationsService: [Java] [Kotlin]
NotificationsService: [Java] [Kotlin]

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

Below is a list of all available models with links to their detailed documentation:
Name Description
InboxTokenResponseCollection
InboxTokenResponse
Links
ListInboxTokensParameters
InboxToken
DiscardResult
ApnsTokenCollection
ApnsToken
ListApnsTokensParameters
ApnsTokenPayload
ExpoTokenCollection
ExpoToken
ListExpoTokensParameters
ExpoTokenPayload
FcmTokenCollection
FcmToken
ListFcmTokensParameters
FcmTokenPayload
SlackTokenCollection
SlackToken
ListMagicbellSlackbotTokensParameters
SlackTokenPayload
ListSlackTokensParameters
TeamsTokenCollection
TeamsToken
ListTeamsTokensParameters
TeamsTokenPayload
UserPreferences
WebPushTokenCollection
WebPushToken
ListWebPushTokensParameters
WebPushTokenPayload
InboxConfigPayload
SlackInstallation
SlackFinishInstallResponse
SlackStartInstallResponseContent
SlackStartInstall
WebPushStartInstallationResponse
NotificationCollection
Notification
ListNotificationsParameters
ArchiveAllNotificationsParameters
MarkAllNotificationsReadParameters
CountResponse
FetchUnreadNotificationsCountParameters

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.

About

Java client SDK for the MagicBell API

www.magicbell.com

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.