rapidapi

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: MIT Imports: 5 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) ([]byte, error)

Call an endpoint on the API

func (*Client) CallAsReader

func (client *Client) CallAsReader(endpoint string) (io.Reader, error)

CallAsReader an endpoint on the API and returns the response as an io.Reader

Jump to

Keyboard shortcuts

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