Skip to content

A golang library for the sendbird.com Server API

Notifications You must be signed in to change notification settings

ippy04/sendbird

Repository files navigation

Golang Sendbird Server API Client

Build Status Coverage Status Go Report Card GoDoc

You can view the Sendbird Server API docs here: https://sendbird.gitbooks.io/sendbird-server-api/content/en/

Usage

  1. Create a Sendbird Application at https://dashboard.sendbird.com/ to get an APP_ID and an API_TOKEN
  2. Run go get github.com/ippy04/sendbird
import "github.com/ippy04/sendbird"

sb := sendbird.NewClient(SENDBIRD_APP_ID, SENDBIRD_API_TOKEN, nil)

Examples

To create a new user:

import "github.com/ippy04/sendbird"

func createUser() {
	sb := sendbird.NewClient(SENDBIRD_APP_ID, SENDBIRD_API_TOKEN, nil)

	params := sendbird.UserRequest{
		Id:               "123456",
		Nickname:         "nickname",
		ImageUrl:         "http://sendbird.com/picture_url",
		IssueAccessToken: true,
	}

	user, _, err := sb.User.Create(params)
	if err != nil {
		log.Fatal("User not created")
	}
}

See tests for more examples

About

A golang library for the sendbird.com Server API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages