request

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client *resty.Client
)

Functions

func InitDeezerAPI

func InitDeezerAPI(arl string) (string, error)

InitDeezerAPI initializes the Deezer API and sets up a session refresh ticker

func Request

func Request(body map[string]interface{}, method string) ([]byte, error)

func RequestGet

func RequestGet(method string, params map[string]interface{}) ([]byte, error)

func RequestPublicApi

func RequestPublicApi(slug string) ([]byte, error)

Types

type APIResponse

type APIResponse struct {
	Error   interface{}     `json:"error"`
	Results json.RawMessage `json:"results"`
	Payload interface{}     `json:"payload,omitempty"`
}

type PublicAPIResponseError

type PublicAPIResponseError struct {
	Error struct {
		Type    string `json:"type"`
		Message string `json:"message"`
		Code    int    `json:"code"`
	} `json:"error"`
}

type UserData

type UserData struct {
	Error   []interface{} `json:"error"`
	Results struct {
		SessionID string `json:"SESSION_ID"`
		Session   string `json:"SESSION"`
		CheckForm string `json:"checkForm"`
	} `json:"results"`
}

Jump to

Keyboard shortcuts

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