tweet

package
v0.0.0-...-9c64050 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stream

func Stream(fields map[string]string) (jsonResponse map[string]interface{}, err error)

Types

type Add

type Add struct {
	Value string `json:"value"`
	Tag   string `json:"tag,omitempty"`
}

type AddCommand

type AddCommand struct {
	Add []Add `json:"add"`
}

func CreateAddCommand

func CreateAddCommand(values map[string]string) AddCommand

type Data

type Data struct {
	ID    string `json:"id"`
	Value string `json:"value"`
	Tag   string `json:"tag,omitempty"`
}

type DeleteId

type DeleteId struct {
	Ids []string `json:"ids"`
}

type DeleteIdCommand

type DeleteIdCommand struct {
	Delete DeleteId `json:"delete"`
}

func CreateDeleteIdCommand

func CreateDeleteIdCommand(ids []string) DeleteIdCommand

type DeleteValue

type DeleteValue struct {
	Values []string `json:"values"`
}

type DeleteValueCommand

type DeleteValueCommand struct {
	Delete DeleteValue `json:"delete"`
}

func CreateDeleteValueCommand

func CreateDeleteValueCommand(rules []string) DeleteValueCommand

type Meta

type Meta struct {
	Sent    time.Time `json:"sent"`
	Summary Summary   `json:"summary,omitempty"`
}

type RulesError

type RulesError struct {
	ClientID           string `json:"client_id"`
	RequiredEnrollment string `json:"required_enrollment"`
	RegistrationURL    string `json:"registration_url"`
	Title              string `json:"title"`
	Detail             string `json:"detail"`
	Reason             string `json:"reason"`
	Type               string `json:"type"`
}

type RulesResponse

type RulesResponse struct {
	Data []Data `json:"data"`
	Meta Meta   `json:"meta"`
}

func AddRule

func AddRule(cmd AddCommand, dryRun bool) (jsonResponse RulesResponse, err error)

func GetRules

func GetRules() (jsonResponse RulesResponse, err error)

type StreamResponse

type StreamResponse struct {
	Id   string
	Text string
}

type Summary

type Summary struct {
	Created    int `json:"created"`
	NotCreated int `json:"not_created"`
	Valid      int `json:"valid"`
	Invalid    int `json:"invalid"`
}

Jump to

Keyboard shortcuts

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