app

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVercelHandler

func NewVercelHandler() (http.Handler, error)

func RunCLI

func RunCLI(args []string) error

func RunLocal

func RunLocal() error

Types

type App

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

type Config

type Config struct {
	Server   ServerConfig   `json:"server"`
	Security SecurityConfig `json:"security"`
	X        XAuthConfig    `json:"x"`
}

type MediaRef

type MediaRef struct {
	ID       string `json:"id,omitempty"`
	MediaKey string `json:"media_key,omitempty"`
}

type Poster

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

func (*Poster) CreateTweet

func (p *Poster) CreateTweet(ctx context.Context, text string, media []MediaRef) (xdk.JSON, error)

func (*Poster) UploadMedia

func (p *Poster) UploadMedia(ctx context.Context, data []byte, contentType string) (MediaRef, error)

type SecurityConfig

type SecurityConfig struct {
	APIToken string `json:"api_token"`
}

type ServerConfig

type ServerConfig struct {
	Addr string `json:"addr"`
}

type XAuthConfig

type XAuthConfig struct {
	APIKey             string   `json:"api_key,omitempty"`
	APISecret          string   `json:"api_secret,omitempty"`
	AccessToken        string   `json:"access_token,omitempty"`
	AccessTokenSecret  string   `json:"access_token_secret,omitempty"`
	OAuth2ClientID     string   `json:"oauth2_client_id,omitempty"`
	OAuth2ClientSecret string   `json:"oauth2_client_secret,omitempty"`
	OAuth2RedirectURI  string   `json:"oauth2_redirect_uri,omitempty"`
	OAuth2Scope        []string `json:"oauth2_scope,omitempty"`
	OAuth2AccessToken  string   `json:"oauth2_access_token,omitempty"`
	OAuth2RefreshToken string   `json:"oauth2_refresh_token,omitempty"`
	OAuth2TokenType    string   `json:"oauth2_token_type,omitempty"`
	OAuth2ExpiresAt    int64    `json:"oauth2_expires_at,omitempty"`
}

Jump to

Keyboard shortcuts

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