package client
import "github.com/renegade-fi/golang-sdk/client"
Package client provides a client for the renegade API
Index
-
type HttpClient
- func NewHttpClient(baseURL string, authKey *wallet.HmacKey) *HttpClient
- func (c *HttpClient) Get(path string, body interface{}) ([]byte, error)
- func (c *HttpClient) GetJSON(path string, body interface{}, response interface{}) error
- func (c *HttpClient) GetWithAuth(path string, body interface{}, response interface{}) error
- func (c *HttpClient) GetWithAuthAndHeaders(path string, headers *http.Header, body interface{}, response interface{}) error
- func (c *HttpClient) Post(path string, body interface{}) ([]byte, error)
- func (c *HttpClient) PostJSON(path string, body interface{}, response interface{}) error
- func (c *HttpClient) PostWithAuth(path string, body interface{}, response interface{}) error
- func (c *HttpClient) PostWithAuthAndHeaders(path string, headers *http.Header, body interface{}, response interface{}) error
- func (c *HttpClient) PostWithAuthRaw(path string, headers *http.Header, body interface{}) (int, []byte, error)
Types
type HttpClient
type HttpClient struct { // contains filtered or unexported fields }
HttpClient represents an HTTP client with a base URL and auth key
func NewHttpClient
func NewHttpClient(baseURL string, authKey *wallet.HmacKey) *HttpClient
NewHttpClient creates a new HttpClient with the given base URL and auth key
func (*HttpClient) Get
func (c *HttpClient) Get(path string, body interface{}) ([]byte, error)
Get performs a GET request to the specified path
func (*HttpClient) GetJSON
func (c *HttpClient) GetJSON(path string, body interface{}, response interface{}) error
GetJSON performs a GET request and unmarshals the response into the provided interface
func (*HttpClient) GetWithAuth
func (c *HttpClient) GetWithAuth(path string, body interface{}, response interface{}) error
GetWithAuth performs an authenticated GET request
func (*HttpClient) GetWithAuthAndHeaders
func (c *HttpClient) GetWithAuthAndHeaders( path string, headers *http.Header, body interface{}, response interface{}, ) error
GetWithAuthAndHeaders performs an authenticated GET request with additional headers
func (*HttpClient) Post
func (c *HttpClient) Post(path string, body interface{}) ([]byte, error)
Post performs a POST request to the specified path
func (*HttpClient) PostJSON
func (c *HttpClient) PostJSON(path string, body interface{}, response interface{}) error
PostJSON performs a POST request and unmarshals the response into the provided interface
func (*HttpClient) PostWithAuth
func (c *HttpClient) PostWithAuth( path string, body interface{}, response interface{}, ) error
PostWithAuth performs an authenticated POST request
func (*HttpClient) PostWithAuthAndHeaders
func (c *HttpClient) PostWithAuthAndHeaders( path string, headers *http.Header, body interface{}, response interface{}, ) error
PostWithAuthAndHeaders performs an authenticated POST request with additional headers
func (*HttpClient) PostWithAuthRaw
func (c *HttpClient) PostWithAuthRaw( path string, headers *http.Header, body interface{}, ) (int, []byte, error)
PostWithAuthRaw performs an authenticated POST request and returns the raw response
Directories
| api_types | Package api_types provides API data structures for the Renegade SDK |
| external_match_client | |
| renegade_client | Package client provides a client for the renegade API |