zulip

package
v0.0.0-...-ce2c5ea Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Email  string
	APIKey string

	Messages *MessagesService
	Events   *EventsService
	// contains filtered or unexported fields
}

func New

func New(httpClient *http.Client, baseURL string) *Client

type EventRequest

type EventRequest struct {
	EventTypes    []string `json:"type"`
	ApplyMarkdown bool     `json:"apply_markdown"`
}

type EventResponse

type EventResponse struct {
	Msg         string `json:"msg"`
	Result      string `json:"result"`
	QueueID     string `json:"queue_id"`
	LastEventID int64  `json:"last_event_id"`
}

type EventsService

type EventsService service

func (*EventsService) Register

func (s *EventsService) Register(types []string, applyMarkdown bool) (_ string, _ int64, err error)

type MessageRequest

type MessageRequest struct {
	Type    string `json:"type"`
	To      string `json:"to"`
	Subject string `json:"subject,omitempty"`
	Content string `json:"content"`
}

type MessageResponse

type MessageResponse struct {
	Msg    string `json:"msg"`
	Result string `json:"result"`
	ID     int64  `json:"id"`
}

type MessagesService

type MessagesService service

func (*MessagesService) Send

func (s *MessagesService) Send(type_ string, to string, subject string, content string) (_ int64, err error)

Jump to

Keyboard shortcuts

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