rapidapi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client   *http.Client
	HostName string
	APIKey   string
}

Client represents a RapidAPI client

func NewWithHTTPClient

func NewWithHTTPClient(client *http.Client, hostName, apiKey string) *Client

NewWithHTTPClient creates a new RapidAPI client with a specified http.Client Used to stub server calls during unit tests

func (*Client) Call

func (client *Client) Call(endpoint string) (body []byte, err error)

Call an endpoint on the API

func (*Client) CallWithContext added in v0.3.0

func (client *Client) CallWithContext(ctx context.Context, endpoint string) (body []byte, err error)

CallWithContext calls an endpoint on the API with a provided context

Jump to

Keyboard shortcuts

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