goreydenx

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 9 Imported by: 2 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

REYDEN-X

Reyden-X is an automated service for promoting live broadcasts on external sites with integrated system of viewers and views management.
Quickstart
package main

import (
	"fmt"
	rx "github.com/pixel365/goreydenx"
	m "github.com/pixel365/goreydenx/model"
	"github.com/pixel365/goreydenx/orders"
	"github.com/pixel365/goreydenx/prices"
	"github.com/pixel365/goreydenx/user"
)

func main() {
	// new client
	client := rx.NewClient("EMAIL", "PASSWORD").Auth()
	
	// user account details
	res, err := user.Account(client)
	if err != nil {
		fmt.Println(res)
	}

	// order details
	res, err = orders.Details(client, 12345)
	if err != nil {
		fmt.Println(res)
	}

	// prices for Twitch
	res, err = prices.Twitch(client)
	if err != nil {
		fmt.Println(res)
	}

	// make new order
	res, err = orders.CreateStream[*m.TwitchParams](client, &m.TwitchParams{
		BaseOrderParams: m.BaseOrderParams{
			LaunchMode: rx.LaunchModeAuto,
			SmoothGain: m.SmoothGain{
				Enabled: false,
				Minutes: 0,
			},
			PriceId:         1,
			NumberOfViews:   10_000,
			NumberOfViewers: 100,
			DelayTime:       0,
		},
		TwitchId: 12345,
	})
	if err != nil {
		fmt.Println(res)
	}
}

Documentation

Index

Constants

View Source
const (
	BaseUrl = "https://api.reyden-x.com/v1"

	Twitch   PlatformCode = "twitch"
	YouTube  PlatformCode = "youtube"
	GoodGame PlatformCode = "goodgame"
	Trovo    PlatformCode = "trovo"
	VkPlay   PlatformCode = "vkplay"
	Kick     PlatformCode = "kick"

	LaunchModeAuto   LaunchMode = "auto"
	LaunchModeDelay  LaunchMode = "delay"
	LaunchModeManual LaunchMode = "manual"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client
	Token   *Token
	BaseUrl string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(userName string, password string) *Client

NewClient Make Client instance

func NewClientWithToken added in v1.0.7

func NewClientWithToken(token *Token) *Client

NewClientWithToken Make Client instance

func (*Client) Auth

func (c *Client) Auth() *Client

func (*Client) Get

func (c *Client) Get(path string) ([]byte, error)

func (*Client) Patch

func (c *Client) Patch(path string, payload io.Reader) ([]byte, error)

func (*Client) Post

func (c *Client) Post(path string, payload io.Reader) ([]byte, error)

func (*Client) RefreshToken added in v1.0.9

func (c *Client) RefreshToken() (*Token, error)

type LaunchMode added in v1.2.1

type LaunchMode string

type PlatformCode added in v1.2.1

type PlatformCode string

type RxClient added in v1.2.1

type RxClient interface {
	Get(string) ([]byte, error)
	Post(string, io.Reader) ([]byte, error)
	Patch(string, io.Reader) ([]byte, error)
}

type Token

type Token struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   string `json:"expires_in"`
	TokenType   string `json:"token_type,omitempty"`
}

func (*Token) IsValid

func (t *Token) IsValid() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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