Documentation ¶
Overview ¶
Package ephemeralproxies is a client library for https://rapidapi.com/rpi4gx/api/ephemeral-proxies API
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Availability ¶
type Availability struct { Total AvailabilityTotal `json:"total"` Countries []Country `json:"by_country"` }
type AvailabilityTotal ¶
type AvailabilityTotal struct {
NumberOfProxies int `json:"proxies"`
}
type Balance ¶ added in v0.0.3
type Balance struct { ConsumedMegabytes int `json:"consumed_megabytes"` LimitMegabytes int `json:"limit_megabytes"` }
func GetUserBalance ¶ added in v0.0.3
GetUserBalance returns the monthly balance left for the user
type Proxy ¶
type Proxy struct { Id string `json:"id"` Host string `json:"host"` Port int `json:"port"` ExpirationTime time.Time `json:"expires_at"` WhitelistedIps []string `json:"whitelisted_ips"` Visibility ProxyVisibility `json:"visibility"` Features ProxyFeatures `json:"features"` // contains filtered or unexported fields }
func NewProxyWithOptions ¶
func NewProxyWithOptions(apiKey string, proxyType ProxyType, countriesISO []string, extraWhitelistIp string) (*Proxy, error)
NewProxyWithOptions returns a new allocated proxy for the next 30 mins - proxyType: Type of proxy to retrieve. e.g.: `datacenter`, `residential`
- countriesISO: allows to select a preferred list of countries the proxy will be located. Example: GB,IT,ES
- extraWhitelistIp: extra IP to be allowed to connect to the proxy. Example: "90.80.70.60"
func (*Proxy) ExtendExpirationTime ¶
ExtendExpirationTime extends the expiration time of the proxy by 30 mins.
A proxy can only be allocated by 24 hours max.
type ProxyFeatures ¶
type ProxyFeatures struct { IsStatic bool `json:"static"` Type string `json:"type"` SupportedProtocols ProxyFeaturesSupportedProtocols `json:"supported_protocols"` }
type ProxyVisibility ¶
type ProxyVisibility struct { Ip string `json:"ip"` Country string `json:"country"` CountryISO string `json:"country_iso"` IsCountryInEurope bool `json:"country_eu"` Latitude float32 `json:"latitude"` Longitude float32 `json:"longitude"` Timezone string `json:"timezone"` ASN string `json:"asn"` ASNOrganization string `json:"asn_org"` ZipCode string `json:"zip_code"` RegionName string `json:"region_name"` RegionCode string `json:"region_code"` City string `json:"city"` }
type ServiceStatus ¶
type ServiceStatus struct {
Availability Availability `json:"availability"`
}
ServiceStatus holds the /service_status response
func GetServiceStatus ¶
func GetServiceStatus(apiKey string, proxyType ProxyType) (*ServiceStatus, error)
GetServiceStatus returns service status of Ephemeral Proxies API
func (*ServiceStatus) String ¶
func (ss *ServiceStatus) String() string