Documentation
¶
Overview ¶
Package grappos an API wrapper for the Grappos API (https://www.grappos.com/api-setup/)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataRetriever ¶
DataRetriever holds the URL to fetch the data
func NewDataRetriever ¶
func NewDataRetriever(m string) DataRetriever
NewDataRetriever creates a new DataRetriever to get all of the data
type LocationAPIResponse ¶
type LocationAPIResponse struct {
Locations []location `json:"locations"`
}
LocationAPIResponse Holds the API response.
func GetLocations ¶
func GetLocations(n int) (LocationAPIResponse, error)
GetLocations Returns all locations.
func SearchForLocation ¶
func SearchForLocation(l string) (LocationAPIResponse, error)
SearchForLocation Postal Code or City Name (ex: “13066”, “San Francisco”).
type ProductAPIResponse ¶
type ProductAPIResponse struct {
Products []product `json:"products"`
}
ProductAPIResponse Holds the API response.
func GetProducts ¶
func GetProducts(u string) (ProductAPIResponse, error)
GetProducts Returns a list of Products.
type RetailerAPIResponse ¶
type RetailerAPIResponse struct {
Retailers []retailer `json:"retailers"`
}
RetailerAPIResponse Holds the API response.
func SearchBrandByID ¶
func SearchBrandByID(id int, st string) (RetailerAPIResponse, error)
SearchBrandByID Searches for a retailer that has product(s) with a given BrandID.
func SearchCoordinates ¶
func SearchCoordinates(lat string, lon string) (RetailerAPIResponse, error)
SearchCoordinates Searches a retailer based of their latitude and longitude.
func SearchProductByID ¶
func SearchProductByID(id int, st string) (RetailerAPIResponse, error)
SearchProductByID Searches for a retailer that has a given ProductID.