Swift library to gather information for an IP using https://ipdata.co
IPData.apiKey = "test"
or adding the apiKey
parameter in each call
IPData.lookup(apiKey: "test") {
switch $0 {
case .success(let ip):
print(ip)
case .failure(let error):
print(error)
}
}
IPData.lookup {
switch $0 {
case .success(let ip):
print(ip)
case .failure(let error):
print(error)
}
}
IPData.lookup(ip: "66.102.160.1") {
switch $0 {
case .success(let ip):
print(ip)
case .failure(let error):
print(error)
}
}
IPData.lookup(bulk: ["66.102.160.1", "100.128.0.9"]) {
switch $0 {
case .success(let ip):
print(ip)
case .failure(let error):
print(error)
}
}
IPData.carrier(ip: "66.102.160.1") {
switch $0 {
case .success(let ip):
print(ip)
case .failure(let error):
print(error)
}
}