Skip to content

SfpyHub/go-sfpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc

Go SFPY

The official SFPY Go client library.

Installation

Make sure your project is using Go Modules (it will have a go.mod file in its root if it already is):

go mod init

Then, reference go-sfpy in a Go program with import:

import (
    "github.com/sfpyhub/go-sfpy/sfpy"
)

Run any of the normal go commands (build/install/test). The Go toolchain will resolve and fetch the go-sfpy module automatically.

Alternatively, you can also explicitly go get the package into a project:

go get -u "github.com/sfpyhub/go-sfpy/sfpy"

Initialize client

To use the SFPY client to make API requests, initialize it like so from within your service

client := sfpy.NewClient(apikey, secretkey)

NewClient accepts two arguments:

  1. apikey: This is your SFPY Api key that is needed to authenticate all requests to the API. You can find this key on your dashboard.
  2. secretkey: This is your webhook shared secret key used to validate whether incoming signatures from webhooks are valid.

About

Go library for the SFPY API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages