Categorygithub.com/IBM/push-notifications-go-sdk

# README

IBM Cloud Mobile Services - Go server-side SDK for Push Notifications

The IBM Cloud Push Notifications service provides a unified push service to send real-time notifications to mobile and web applications. The Go SDK is used to manage Push Notifications service.

Ensure that you go through IBM Cloud Push Notifications service documentation before you start.

Table of Contents

Prerequisites

Installation

Install using the command.

go get -u github.com/IBM/push-notifications-go-sdk

Import the SDK

To import the module

import "github.com/IBM/push-notifications-go-sdk/pushservicev1"

then run go mod tidy to download and install the new dependency and update your Go application's go.mod file.

Initialize SDK

Initialize the sdk to connect with your App Configuration service instance.

func init() {
  authenticator := &core.IamAuthenticator{
		ApiKey: "apikey",
	}

	options := &pushservicev1.PushServiceV1Options{
		ServiceName:   "imfpush",
		Authenticator: authenticator,
		URL:           "url",
	}

	app, err := pushservicev1.NewPushServiceV1(options)

	if err != nil {
		log.Fatal(err)
	}
}
  • apikey : apikey of the Push notifications service. Get it from the service credentials section of the dashboard.
  • url : url of the Push notifications Instance. URL instance can found from here

Using the SDK

Refer to the example directory

License

This project is released under the Apache 2.0 license. The license's full text can be found in LICENSE

# Packages

No description provided by the author
No description provided by the author
Package pushservicev1 : Operations and models for the PushServiceV1 service.