Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Start/Stop Typing indicator specs #19

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Add Start/Stop Typing indicator specs #19

merged 1 commit into from
Nov 21, 2023

Conversation

jerry-jeon-sb
Copy link
Contributor

Sample code snippet

        String apiToken = ""; //Your Api Token
        String appId = ""; //Your App ID
        String channelUrl = ""; //Channel URL
        String botId = ""; //Bot ID

        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api-" + appId + ".sendbird.com");

        GroupChannelApi groupChannelApi = new GroupChannelApi(defaultClient);
        GcTypingIndicatorsData gcTypingIndicatorsData = new GcTypingIndicatorsData();
        List<String> userIds = new ArrayList<>();
        userIds.add(botId);
        gcTypingIndicatorsData.setUserIds(userIds);

        try {
            OcDeleteChannelByUrl200Response result = groupChannelApi.gcStopTypingIndicators(channelUrl)
                    .apiToken(apiToken)
                    .gcTypingIndicatorsData(gcTypingIndicatorsData)
                    .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupChannelApi#gcStopTypingIndicators");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }

Copy link
Contributor

@luke-cha luke-cha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jerry-jeon-sb jerry-jeon-sb merged commit 793fc97 into main Nov 21, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants