flowdock

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2014 License: Apache-2.0 Imports: 5 Imported by: 0

README

flowdock

A Flowdock client for Golang. See the Flowdock API docs for more information on the individual attributes.

Go API Documentation

Examples

You can set global defaults and use flowdock.Inbox() directly:

import (
  "github.com/stvp/flowdock"
)

func main() {
  flowdock.Token = "732da505d0284d5b1d909b1a32426345"
  flowdock.Source = "My Cool App"
  flowdock.FromAddress = "cool@dudes.com"
  // See API docs for more variables

  go flowdock.Inbox("My subject", "My content goes here.")
}

Or you can create a flowdock.Client to use different Flowdock message settings in the same app:

import (
  "github.com/stvp/flowdock"
)

func main() {
  client := flowdock.Client{
    Token:       "732da505d0284d5b1d909b1a32426345",
    Source:      "App A",
    FromAddress: "email@stovepipestudios.com",
    FromName:    "Client A",
    ReplyTo:     "app_a@stovepipestudios.com",
    Tags:        []string{"app_a"},
  }

  go client.Inbox("Subject", "Content")
}

Documentation

Index

Constants

View Source
const (
	ENDPOINT = "https://api.flowdock.com/v1/messages/team_inbox/"
)

Variables

View Source
var (
	// Required default client settings
	Token       = ""
	Source      = ""
	FromAddress = ""

	// Optional default client settings
	FromName = ""
	ReplyTo  = ""
	Project  = ""
	Link     = ""
	Tags     = []string{}
)

Functions

func Inbox

func Inbox(subject, content string) error

Types

type Client

type Client struct {
	// Required
	Token       string
	Source      string
	FromAddress string
	Subject     string
	Content     string

	// Optional
	FromName string
	ReplyTo  string
	Project  string
	Link     string
	Tags     []string
}

func (*Client) Inbox

func (c *Client) Inbox(subject, content string) error

Jump to

Keyboard shortcuts

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