social

package
v0.0.0-...-e16fa07 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageBuilder

type MessageBuilder struct {
	// contains filtered or unexported fields
}

func NewMessageBuilder

func NewMessageBuilder(logger log.Logger) *MessageBuilder

func (*MessageBuilder) CreateMessage

func (m *MessageBuilder) CreateMessage(tx *TransactionData) error

Prepares a social media message from RawTXs.

func (*MessageBuilder) SendMessage

func (m *MessageBuilder) SendMessage(tx *TransactionData) error

Sends message. Call this after CreateMessage().

type TransactionData

type TransactionData struct {
	//RawTXs []*pb.Transaction_Output `json:"txs"`
	AmountBchRaw float64 `json:"amount_bch_raw"`

	Amount     string  `json:"amount"`
	Symbol     string  `json:"symbol"`
	Currency   string  `json:"currency"`
	FeeBch     float64 `json:"fee"`
	FiatFee    string  `json:"fee"`
	FiatAmount string  `json:"fiat_amount"`
	FiatSymbol string  `json:"fiat_symbol"`
	Hash       string  `json:"hash"`
	TxLink     string  `json:"tx_link"`

	Message string `json:"message"`
}

type TwitterClient

type TwitterClient struct {
	Client *twitter.Client
	// contains filtered or unexported fields
}

func NewTwitterClient

func NewTwitterClient(logger log.Logger) *TwitterClient

func (*TwitterClient) SendTweet

func (c *TwitterClient) SendTweet(msg string) (*twitter.Tweet, error)

Jump to

Keyboard shortcuts

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