Skip to content

Commit 23e71c9

Browse files
committed
Update README.md
1 parent 452aa92 commit 23e71c9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ You need a Context that explains a bit your working environment, something like:
3434

3535
```java
3636
Context context = new ContextBuilder()
37-
.apiKey("your-api-key")
3837
.priority(Priority.REALTIME)
3938
.build();
4039
```
@@ -43,7 +42,13 @@ Then you need an executor and a mode:
4342

4443
```java
4544
CommandExecutor executor = NameApiRemoteExecutors.get();
46-
Mode mode = NameApiModeFactory.minimal(context);
45+
Mode mode = NameApiModeFactory.withContext(
46+
"your-api-key",
47+
context,
48+
//the default and live server is "api.nameapi.org"
49+
//we're using the latest release candidate with latest features here:
50+
new Host("rc50-api.nameapi.org", 80), NameApiPortUrlFactory.versionLatestStable()
51+
);
4752
```
4853

4954
Now you're ready to execute commands.

0 commit comments

Comments
 (0)