sipuni_api_wrapper

package module
v0.0.0-...-19921c9 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 11 Imported by: 0

README

sipuni_api_wrapper

Documentation

Index

Constants

View Source
const (
	TypeAll      = "0"
	TypeIncoming = "1"
	TypeOutgoing = "2"
	TypeInner    = "3"

	StateAll      = "0"
	StateMissed   = "1"
	StateAccepted = "2"

	ShowTreeIdFalse = "0"
	ShowTreeIdTrue  = "1"

	NumbersRingedFalse = "0"
	NumbersRingedTrue  = "1"

	NumbersInvolvedFalse = "0"
	NumbersInvolvedTrue  = "1"

	NamesFalse = "0"
	NamesTrue  = "1"

	OutgoingLineFalse = "0"
	OutgoingLineTrue  = "1"

	AnonymousFalse = "0"
	AnonymousTrue  = "1"

	FirstTimeFalse = "0"
	FirstTimeTrue  = "1"

	DtmfUserAnswerFalse = "0"
	DtmfUserAnswerTrue  = "1"

	EmptyString = ""
)
View Source
const DefaultURL = "https://sipuni.com/api/statistic/export"

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments

type Arguments map[string]string

Arguments are used for passing URL parameters to the client for making API calls.

func (Arguments) ToURLValuesAndHashMd5

func (args Arguments) ToURLValuesAndHashMd5() url.Values

ToURLValuesAndHashMd5 returns the argument's URL value representation with hash.

type Client

type Client struct {
	BaseUrl     string
	Key, UserId string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(Key, UserId string) *Client

func (*Client) Post

func (c *Client) Post(path string, args Arguments) []Record

func (*Client) Throttle

func (c *Client) Throttle()

func (*Client) WithContext

func (c *Client) WithContext(ctx context.Context) *Client

type Record

type Record struct {
	Name      string `json:"operator_name"`
	FromPhone string `json:"from_phone"`
	ToPhone   string `json:"to_phone"`
	Date      string `json:"date"`
	Status    string `json:"status"`
}

Jump to

Keyboard shortcuts

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