Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient interface { GetPopulation(ctx context.Context, codes string) (int64, error) GetCountries(ctx context.Context) ([]string, error) }
APIClient interface representing a Population API Client
type Probe ¶
type Probe struct { APIClient // contains filtered or unexported fields }
Probe downloads the latest population stats per country and stores them in the database
type RapidAPIClient ¶
type RapidAPIClient struct {
rapidapi.API
}
RapidAPIClient API Client handle
func NewAPIClient ¶
func NewAPIClient(apiKey string) *RapidAPIClient
NewAPIClient creates a new Population API Client
func (*RapidAPIClient) GetCountries ¶
func (client *RapidAPIClient) GetCountries(ctx context.Context) ([]string, error)
GetCountries returns all country names that the RapidAPI API supports
func (*RapidAPIClient) GetPopulation ¶
GetPopulation finds the most recent data for a country
Click to show internal directories.
Click to hide internal directories.