Home
Softono

Sendpulse Sdk Go

Open source MIT Go
21
Stars
14
Forks
0
Issues
2
Watchers
9 months
Last Commit

 About Sendpulse Sdk Go

Go library for sending mail with the Sendpuse.

Platforms

Web Self-hosted

Languages

Go

Need Help Installing Sendpulse Sdk Go?

We provide expert installation service for this software. Our team will install, configure, and secure Sendpulse Sdk Go on your server. plans start at just $30.

Sendpulse Sdk Go

View on GitHub

SendPulse REST client library (unofficial)

An unofficial SendPulse SDK client library for Go (Golang). This library allows to use the SendPulse API via Go.

SendPulse API official documentation https://sendpulse.com/api

Go Reference codecov Go Report Card License

Installation

go get -u github.com/dimuska139/sendpulse-sdk-go/v8

Usage

package main

import (
    "context"
    "fmt"
    sendpulse "github.com/dimuska139/sendpulse-sdk-go/v8"
    "net/http"
)

func main() {
    config := &sendpulse.Config{
        UserID: "",
        Secret: "",
    }
    client := sendpulse.NewClient(http.DefaultClient, config)

    emails := []*sendpulse.EmailToAdd {
        &sendpulse.EmailToAdd{
            Email:     "[email protected]",
            Variables: map[string]any{"age": 21, "weight": 99},
        },
    }
    
    ctx := context.Background()
    if err := client.Emails.MailingLists.SingleOptIn(ctx, 1266208, emails); err != nil {
        fmt.Println(err)
    }
    fmt.Println(*emails[0])
}

The tests should be considered a part of the documentation.

License

The MIT License (MIT)