Package org.nameapi.client.lib
Class NameApiModeFactory
- java.lang.Object
-
- org.nameapi.client.lib.NameApiModeFactory
-
public class NameApiModeFactory extends Object
Provides Mode instances that contain the minimum.- Author:
- Fabian Kessler
-
-
Constructor Summary
Constructors Constructor Description NameApiModeFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.optimaize.command4j.Modeminimal(String apiKey)Overloaded method that uses for host:new Host("api.nameapi.org", Protocol.HTTPS)for port url:NameApiPortUrlFactory.versionLatestStable()static com.optimaize.command4j.Modeminimal(String apiKey, com.optimaize.anythingworks.common.host.Host host, com.optimaize.anythingworks.client.rest.RestPortUrlFactory portUrlFactory)You can take this and extend for your setup if you need more.static com.optimaize.command4j.ModewithContext(String apiKey, org.nameapi.ontology5.input.context.Context context)Overloaded method that uses: for host:new Host("api.nameapi.org", Protocol.HTTPS)for port url:NameApiPortUrlFactory.versionLatestStable()static com.optimaize.command4j.ModewithContext(String apiKey, org.nameapi.ontology5.input.context.Context context, com.optimaize.anythingworks.common.host.Host host, com.optimaize.anythingworks.client.rest.RestPortUrlFactory portUrlFactory)You can take this and extend for your setup if you need more.
-
-
-
Method Detail
-
minimal
@NotNull public static com.optimaize.command4j.Mode minimal(@NotNull String apiKey, @NotNull com.optimaize.anythingworks.common.host.Host host, @NotNull com.optimaize.anythingworks.client.rest.RestPortUrlFactory portUrlFactory)You can take this and extend for your setup if you need more.Example: .with(StdoutLoggingExtension.enabled())
- Parameters:
apiKey- Your personal api key from registering with us.host- for examplenew Host("api.nameapi.org", Protocol.HTTPS)portUrlFactory- for exampleNameApiPortUrlFactory.versionLatestStable()
-
minimal
@NotNull public static com.optimaize.command4j.Mode minimal(@NotNull String apiKey)Overloaded method that uses for host:new Host("api.nameapi.org", Protocol.HTTPS)for port url:NameApiPortUrlFactory.versionLatestStable()
-
withContext
@NotNull public static com.optimaize.command4j.Mode withContext(@NotNull String apiKey, @NotNull org.nameapi.ontology5.input.context.Context context, @NotNull com.optimaize.anythingworks.common.host.Host host, @NotNull com.optimaize.anythingworks.client.rest.RestPortUrlFactory portUrlFactory)You can take this and extend for your setup if you need more.Example: .with(StdoutLoggingExtension.enabled())
- Parameters:
apiKey- Your personal api key from registering with us.context- for examplenew ContextBuilder().priority(Priority.REALTIME).build()host- for examplenew Host("api.nameapi.org", Protocol.HTTPS)portUrlFactory- for exampleNameApiPortUrlFactory.versionLatestStable()
-
withContext
@NotNull public static com.optimaize.command4j.Mode withContext(@NotNull String apiKey, @NotNull org.nameapi.ontology5.input.context.Context context)Overloaded method that uses: for host:new Host("api.nameapi.org", Protocol.HTTPS)for port url:NameApiPortUrlFactory.versionLatestStable()
-
-