Module: Luminati::Client::Zone::Ips
- Included in:
- Luminati::Client
- Defined in:
- lib/luminati/client/zone/ips.rb
Instance Method Summary collapse
-
#add_ips(ip_info) ⇒ Hash
Add IPs to a given zone.
-
#remove_ips(zone_name, ips) ⇒ Hash
Remove Ips from a given zone.
-
#unavailable_zones_ips ⇒ Hash
Returns zones and IPs with connectivity issues.
-
#zone_ips(zone_name, ip_per_country = false) ⇒ Hash
Returns datacenter IPs for a given zone.
Instance Method Details
#add_ips(ip_info) ⇒ Hash
Add IPs to a given zone
29 30 31 32 |
# File 'lib/luminati/client/zone/ips.rb', line 29 def add_ips(ip_info) data = ip_info request(:post, "/api/zone/ips", Oj.dump(data, mode: :compat)) end |
#remove_ips(zone_name, ips) ⇒ Hash
Remove Ips from a given zone
39 40 41 42 43 44 |
# File 'lib/luminati/client/zone/ips.rb', line 39 def remove_ips(zone_name, ips) data = {} data["zone"] = zone_name data["ips"] = ips request(:delete, "/api/zone/ips", Oj.dump(data, mode: :compat)) end |
#unavailable_zones_ips ⇒ Hash
Returns zones and IPs with connectivity issues.
21 22 23 |
# File 'lib/luminati/client/zone/ips.rb', line 21 def unavailable_zones_ips request(:get, "/api/zone/ips/unavailable") end |
#zone_ips(zone_name, ip_per_country = false) ⇒ Hash
Returns datacenter IPs for a given zone.
12 13 14 15 16 |
# File 'lib/luminati/client/zone/ips.rb', line 12 def zone_ips(zone_name, ip_per_country = false) parameters = "zone=#{zone_name}" parameters << "&ip_per_country" if ip_per_country request(:get, "/api/zone/ips?#{parameters}") end |