Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

go-pushwoosh

The Pushwoosh Remote APIs Client for Go

godoc build go report

Requirements

  • Go v1.7+

Usage

package main

import (
	"context"
	"log"

	"github.com/yyoshiki41/go-pushwoosh"
)

func main() {
	// Set config
	conf := pushwoosh.Config{
		Endpoint:        "https://cp.pushwoosh.com/json",
		ApplicationCode: "aaaaa-00000",
		AccessToken:     "xxx",
	}

	// Create a new client
	client, err := pushwoosh.NewClient(&conf)
	if err != nil {
		log.Fatal(err)
	}

	// Create a Message struct
	msg := pushwoosh.Message{
		Content:   "content is here",
		SendDate:  "now",
		Devices:   []string{"Hardware ID is here"},
		IOSBadges: "+1",
	}
	msgs := []pushwoosh.Message{msg}

	// Call pushwoosh API
	_, err = client.CreateMessage(context.Background(), &msgs)
	if err != nil {
		log.Fatal(err)
	}
}

REMOTE APIs

/createMessage

  • /deleteMessage
  • /getMessageDetails

/registerDevice

/unregisterDevice

  • /addTag
  • /deleteTag
  • /listTags
  • /setTags
  • /getTags
  • /setBadge
  • /applicationOpen
  • /pushStat
  • /messageDeliveryEvent
  • /setPurchase
  • /getNearestZone
  • /createTargetedMessage
  • /addGeoZone
  • /addGeoZoneCluster
  • /deleteGeoZone
  • /deleteGeoZoneCluster
  • /listGeoZoneClusters
  • /listGeoZones
  • /updateGeoZone
  • /listTestDevices
  • /getApplicationSubscribersStats
  • /getTagStats
  • /getAppStats
  • /getCampaignStats
  • /getMsgStats
  • /getMsgPlatformsStats
  • /getResults
  • /configureApplication for iOS
  • /configureApplication for Android
  • /configureApplication for Windows Phone
  • /configureApplication for Mac OS X
  • /configureApplication for Blackberry
  • /configureApplication for Windows 8
  • /configureApplication for Amazon
  • /configureApplication for Safari and Chrome
  • /createApplication
  • /updateApplication
  • /deleteApplication
  • /createCampaign
  • /deleteCampaign
  • /createTestDevice
  • /getApplication
  • /getApplications
  • /getApplicationFile
  • /postEvent
  • /registerUser
  • /getPushHistory
  • /getPreset
  • /createFilter
  • /listFilters
  • /deleteFilter

About

Pushwoosh client for Golang

Resources

License

Packages

No packages published

Languages