diff --git a/content/geoip/geolocate-an-ip/databases.md b/content/geoip/geolocate-an-ip/databases.md
index cff51f395..7ad221c64 100644
--- a/content/geoip/geolocate-an-ip/databases.md
+++ b/content/geoip/geolocate-an-ip/databases.md
@@ -29,7 +29,7 @@ Install-Package MaxMind.GeoIP2
com.maxmind.geoip2
geoip2
- 5.0.2
+ 5.1.0
// Or install via Gradle
@@ -37,7 +37,7 @@ repositories {
mavenCentral()
}
dependencies {
- implementation 'com.maxmind.geoip2:geoip2:5.0.2'
+ implementation 'com.maxmind.geoip2:geoip2:5.1.0'
}
```
@@ -117,7 +117,7 @@ System.out.println(country.isoCode());
```javascript
// Asynchronous database opening
-const Reader = require('@maxmind/geoip2-node').Reader;
+import { Reader } from '@maxmind/geoip2-node';
Reader.open('/path/to/maxmind-database.mmdb').then((reader) => {
const response = reader.city('128.101.101.101');
@@ -126,10 +126,10 @@ Reader.open('/path/to/maxmind-database.mmdb').then((reader) => {
});
// Synchronous database opening
-const fs = require('fs');
-const Reader = require('@maxmind/geoip2-node').Reader;
+import { readFileSync } from 'node:fs';
+import { Reader } from '@maxmind/geoip2-node';
-const dbBuffer = fs.readFileSync('/path/to/maxmind-database.mmdb');
+const dbBuffer = readFileSync('/path/to/maxmind-database.mmdb');
// This reader object should be reused across lookups as creation of it is
// expensive.
diff --git a/content/geoip/geolocate-an-ip/web-services.md b/content/geoip/geolocate-an-ip/web-services.md
index 5b14b32c8..bd88560a8 100644
--- a/content/geoip/geolocate-an-ip/web-services.md
+++ b/content/geoip/geolocate-an-ip/web-services.md
@@ -31,7 +31,7 @@ Install-Package MaxMind.GeoIP2
com.maxmind.geoip2
geoip2
- 5.0.2
+ 5.1.0
// Or install via Gradle
@@ -39,7 +39,7 @@ repositories {
mavenCentral()
}
dependencies {
- implementation 'com.maxmind.geoip2:geoip2:5.0.2'
+ implementation 'com.maxmind.geoip2:geoip2:5.1.0'
}
```
@@ -105,9 +105,7 @@ WebServiceClient client = new WebServiceClient.Builder(accountId, licenseKey)
```
```javascript
-const WebServiceClient = require('@maxmind/geoip2-node').WebServiceClient;
-// TypeScript:
-// import { WebServiceClient } from '@maxmind/geoip2-node';
+import { WebServiceClient } from '@maxmind/geoip2-node';
const accountId = '10';
const licenseKey = 'LICENSEKEY';
@@ -234,9 +232,7 @@ try (WebServiceClient client = new WebServiceClient.Builder(accountId, licenseKe
```
```javascript
-const WebServiceClient = require('@maxmind/geoip2-node').WebServiceClient;
-// Typescript:
-// import { WebServiceClient } from '@maxmind/geoip2-node';
+import { WebServiceClient } from '@maxmind/geoip2-node';
const accountId = '10';
const licenseKey = 'LICENSEKEY';
diff --git a/content/minfraud/evaluate-a-transaction.md b/content/minfraud/evaluate-a-transaction.md
index 3c8a3d9c1..e4281859a 100644
--- a/content/minfraud/evaluate-a-transaction.md
+++ b/content/minfraud/evaluate-a-transaction.md
@@ -70,7 +70,7 @@ Install-Package MaxMind.MinFraud
com.maxmind.minfraud
minfraud
- 4.2.0
+ 4.3.0
// Or install via Gradle
@@ -78,7 +78,7 @@ repositories {
mavenCentral()
}
dependencies {
- implementation 'com.maxmind.minfraud:minfraud:4.2.0'
+ implementation 'com.maxmind.minfraud:minfraud:4.3.0'
}
```
@@ -797,7 +797,6 @@ System.out.println(client.score(request));
```javascript
import { URL } from 'url'; // Used for order.referrerUri
import * as minFraud from '@maxmind/minfraud-api-node';
-// const minFraud = require('@maxmind/minfraud-api-node');
// client is reusable
const client = new minFraud.Client('1234', 'LICENSEKEY');
diff --git a/content/minfraud/proxy-detection.md b/content/minfraud/proxy-detection.md
index d30f30517..5537d1699 100644
--- a/content/minfraud/proxy-detection.md
+++ b/content/minfraud/proxy-detection.md
@@ -228,7 +228,7 @@ else {
```
```python
-#!/usr/bin/env python
+#!/usr/bin/env python3
import argparse
import requests
@@ -253,10 +253,10 @@ if 'err' in proxy and len(proxy['err']):
sys.stderr.write("MaxMind returned an error code for the request: %s\n" % proxy['err'])
sys.exit(1)
else:
- print "\nMaxMind Proxy data for %s\n\n" % args.ip
+ print("\nMaxMind Proxy data for %s\n" % args.ip)
for (key, val) in proxy.items():
- print " %-20s %s" % (key, val)
- print "\n"
+ print(" %-20s %s" % (key, val))
+ print("")
```
```php
diff --git a/content/minfraud/report-a-transaction.md b/content/minfraud/report-a-transaction.md
index b205f198a..e248d19d9 100644
--- a/content/minfraud/report-a-transaction.md
+++ b/content/minfraud/report-a-transaction.md
@@ -40,7 +40,7 @@ Install-Package MaxMind.MinFraud
com.maxmind.minfraud
minfraud
- 4.2.0
+ 4.3.0
// Or install via Gradle
@@ -48,7 +48,7 @@ repositories {
mavenCentral()
}
dependencies {
- implementation 'com.maxmind.minfraud:minfraud:4.2.0'
+ implementation 'com.maxmind.minfraud:minfraud:4.3.0'
}
```