Skip to content

gotokatsuya/growthpush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

growthpush

GrowthPush API client library for Go.

API Docs

https://growthbeat.github.io/api/growthpush/v4/

Installation

$ go get github.com/gotokatsuya/growthpush

Usage

import (
    "github.com/gotokatsuya/growthpush/dispatcher"
    "github.com/gotokatsuya/growthpush/service/events"
)

func CreateEvent(eventName string) error {
	var (
		applicationID = os.Getenv("GP_APPLICATION_ID")
		credentialID  = os.Getenv("GP_CREDENTIAL_ID")
	)
	client := dispatcher.NewClientWithParam(applicationID, credentialID)
	res, err := events.CreateNewEvent(client, events.CreateNewEventRequest{
		Name: eventName,
	})
	if err != nil {
		return err
	}
    
	log.Println(res)

    return nil
}

About

GrowthPush API client library for Go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages