All Projects → hanzoai → Gochimp3

hanzoai / Gochimp3

Licence: mit
🐒 Golang client for MailChimp API 3.0.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Gochimp3

Messenger
Package messenger is used for making bots for use with Facebook messenger
Stars: ✭ 278 (+612.82%)
Mutual labels:  api, client
Awesome Openapi3
😎 A list of awesome projects related to OpenAPI 3.0.x, curated by the community
Stars: ✭ 469 (+1102.56%)
Mutual labels:  api, client
Airtable Python Wrapper
Python Airtable Client Wrapper
Stars: ✭ 328 (+741.03%)
Mutual labels:  api, client
Mtproto Core
Telegram API JS (MTProto) client library for browser and nodejs
Stars: ✭ 242 (+520.51%)
Mutual labels:  api, client
Swaddle
Automagically create API clients/wrappers in JavaScript
Stars: ✭ 23 (-41.03%)
Mutual labels:  api, client
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+135930.77%)
Mutual labels:  api, client
Purest
REST API Client Library
Stars: ✭ 448 (+1048.72%)
Mutual labels:  api, client
Smudge
Control the Spotify app from within Emacs.
Stars: ✭ 186 (+376.92%)
Mutual labels:  api, client
Instagram Web Api
🤳 Instagram Private Web API client for Node
Stars: ✭ 694 (+1679.49%)
Mutual labels:  api, client
Unifi Api Client
A PHP API client class to interact with Ubiquiti's UniFi Controller API
Stars: ✭ 602 (+1443.59%)
Mutual labels:  api, client
Zenpy
Python wrapper for the Zendesk API
Stars: ✭ 222 (+469.23%)
Mutual labels:  api, client
Gitter Api
[production-ready] Gitter API implementation for php 7.0+ allowing sync, async and streaming access.
Stars: ✭ 11 (-71.79%)
Mutual labels:  api, client
Watsontcp
WatsonTcp is the easiest way to build TCP-based clients and servers in C#.
Stars: ✭ 209 (+435.9%)
Mutual labels:  api, client
Php Curl Class
PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs
Stars: ✭ 2,903 (+7343.59%)
Mutual labels:  api, client
Verb
Organize and send HTTP requests from Emacs
Stars: ✭ 205 (+425.64%)
Mutual labels:  api, client
Node Vault
Client for HashiCorp's Vault
Stars: ✭ 391 (+902.56%)
Mutual labels:  api, client
Restrequest4delphi
API to consume REST services written in any programming language with support to Lazarus and Delphi
Stars: ✭ 162 (+315.38%)
Mutual labels:  api, client
Swiftyinsta
Instagram Private API Swift
Stars: ✭ 165 (+323.08%)
Mutual labels:  api, client
Twitchlib
C# Twitch Chat, Whisper, API and PubSub Library. Allows for chatting, whispering, stream event subscription and channel/account modification. Supports .NET Core 2.0
Stars: ✭ 519 (+1230.77%)
Mutual labels:  api, client
Hvac
🔒 Python 2.7/3.X client for HashiCorp Vault
Stars: ✭ 839 (+2051.28%)
Mutual labels:  api, client

gochimp3

GoDoc Build Status Gitter chat

Introduction

Golang client for MailChimp API 3.0.

Install

Install with go get:

$ go get github.com/hanzoai/gochimp3

Usage

package main

import (
	"fmt"
	"os"

	"github.com/hanzoai/gochimp3"
)

const (
	apiKey = "YOUR_API_KEY_HERE"
)

func main() {
	client := gochimp3.New(apiKey)

	// Audience ID
	// https://mailchimp.com/help/find-audience-id/
	listID := "7f12f9b3fz"

	// Fetch list
	list, err := client.GetList(listID, nil)
	if err != nil {
		fmt.Printf("Failed to get list %s", listID)
		os.Exit(1)
	}

	// Add subscriber
	req := &gochimp3.MemberRequest{
		EmailAddress: "[email protected]",
		Status:       "subscribed",
	}

	if _, err := list.CreateMember(req); err != nil {
		fmt.Printf("Failed to subscribe %s", req.EmailAddress)
		os.Exit(1)
	}
}

Set Timeout

client := gochimp3.New(apiKey)
client.Timeout = (5 * time.Second)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].