Skip to content

Commit e3984b7

Browse files
authored
Added the batch operation to the README.md
1 parent e750531 commit e3984b7

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ platform :ios, '10.0'
3333
use_frameworks!
3434

3535
target '<Your Target Name>' do
36-
pod 'IPAPI', '~> 1.0'
36+
pod 'IPAPI', '~> 1.1'
3737
end
3838
```
3939

@@ -45,7 +45,7 @@ $ pod install
4545

4646
## Usage
4747

48-
### Lookup the current IP address ###
48+
### 🎯 Lookup the current IP address ###
4949

5050
```swift
5151
import IPAPI
@@ -57,7 +57,7 @@ IPAPI.Service.default.fetch { result, error in
5757
}
5858
```
5959

60-
### Lookup a domain ###
60+
### 🔍 Lookup a domain ###
6161

6262
```swift
6363
import IPAPI
@@ -69,7 +69,7 @@ Service.default.fetch(query: "apple.com") { result, error in
6969
}
7070
```
7171

72-
### Ask only for some specific fields ###
72+
### ✂️ Ask only for some specific fields ###
7373

7474
```swift
7575
import IPAPI
@@ -81,7 +81,7 @@ Service.default.fetch(fields: [.ip, .latitude, .longitude, .organization]) { res
8181
}
8282
```
8383

84-
### Localization ###
84+
### 🇷🇴 Localization ###
8585

8686
```swift
8787
import IPAPI
@@ -94,6 +94,20 @@ Service.default.fetch(language: "es") { result, error in
9494
```
9595
*Checkout this [page](http://ip-api.com/docs/api:returned_values) for the available languages.
9696

97+
### 📦 Batch request ###
98+
99+
```swift
100+
import IPAPI
101+
102+
Service.default.batch([Service.Request(query: "208.80.152.201",
103+
fields: [.countryName, .countryCode, .latitude, .longitude, .organization, .ip]),
104+
Service.Request(query: "91.198.174.192", language: "es")]) { result, error in
105+
if let result = result {
106+
print("Geo IP result \(result).")
107+
}
108+
}
109+
```
110+
97111
# Contact
98112

99113
- [GitHub](http://github.com/arturgrigor)

0 commit comments

Comments
 (0)