Versions in this module Expand all Collapse all v1 v1.0.0 Sep 23, 2026 Changes in this version + const DefaultBaseURL + const DefaultTimeout + var ErrForbidden = &APIError + var ErrNotFound = &APIError + var ErrRateLimit = &APIError + var ErrUnauthorized = &APIError + var ErrValidation = &APIError + type APIError struct + Message string + StatusCode int + func (e *APIError) Error() string + type APIResponse struct + Data T + Message *string + Pagination *Pagination + Status string + type AccountInfo struct + ActivePackage *string + AllowedIPs []string + DaysLeft *int + Email *string + EndDate *string + RateLimit *string + Status *string + type City struct + ID int + Name string + Plate *int + Slug *string + type Client struct + func NewClient(apiKey string, opts ...Option) (*Client, error) + func (c *Client) GetAccountInfo(ctx context.Context) (*APIResponse[AccountInfo], error) + func (c *Client) GetAllPharmacies(ctx context.Context, page, limit int) (*APIResponse[[]Pharmacy], error) + func (c *Client) GetCities(ctx context.Context) (*APIResponse[[]City], error) + func (c *Client) GetCityPharmacies(ctx context.Context, cityID, limit int) (*APIResponse[[]Pharmacy], error) + func (c *Client) GetDistrictPharmacies(ctx context.Context, cityID, districtID, limit int) (*APIResponse[[]Pharmacy], error) + func (c *Client) GetDistricts(ctx context.Context, cityID int) (*APIResponse[[]District], error) + func (c *Client) GetNearbyPharmacies(ctx context.Context, lat, lon float64, isSentry bool, limit int) (*APIResponse[[]Pharmacy], error) + func (c *Client) GetSentryByCity(ctx context.Context, cityID, limit int) (*APIResponse[[]Pharmacy], error) + func (c *Client) GetSentryByDistrict(ctx context.Context, cityID, districtID, limit int) (*APIResponse[[]Pharmacy], error) + func (c *Client) GetSentryPharmacies(ctx context.Context, page, limit int) (*APIResponse[[]Pharmacy], error) + func (c *Client) UpdateWhitelist(ctx context.Context, ips string) (*APIResponse[map[string]any], error) + type Coordinates struct + Latitude *float64 + Longitude *float64 + type District struct + CityID int + ID int + Name string + Slug *string + type NearbyRequest struct + IsSentry int + Lat float64 + Limit int + Lon float64 + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(httpClient *http.Client) Option + type Pagination struct + CurrentPage int + HasMore bool + NextPage *int + PerPage int + PrevPage *int + Total int + TotalPages int + type Pharmacy struct + Address string + AddressDescription *string + City string + CityID int + Coordinates *Coordinates + DistanceKM *float64 + District string + DistrictID int + ID int + IsSentry bool + Locality *string + MapLink *string + Name string + Phone *string + WorkingHours *string + type WhitelistRequest struct + IPs string