go-sfpy

module
v0.0.0-...-9528e98 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2021 License: MIT

README

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL