Skip to content

MillsMCS/wordnik-api-client

Repository files navigation

wordnik-api-client

Creation

This was created by Swagger with this command line:

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \
  generate -i https://developer.wordnik.com/api-docs/swagger.json \
  --api-package edu.mills.cs180a.wordnik.client.api \
  --model-package edu.mills.cs180a.wordnik.client.model \
  --invoker-package edu.mills.cs180a.wordnik.client.invoker \
  --group-id cs180a --artifact-id wordnik-api-client \
  --artifact-version 0.0.1-SNAPSHOT \
  -l java  --library feign -o wordnik-api-client

I then modified pom.xml to:

  • change the default name
  • add a dependency on javax.annotations
  • generate a jar file with dependencies

I also changed LocalDate to OffsetDateTime in the model using this command line:

sed -i 's/LocalDate/OffsetDateTime/g' model/*.java

The rest of this file was automatically generated by Swagger.

Requirements

Building the API client library requires Maven to be installed.

Installation & Usage

To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

After the client library is installed/deployed, you can use it in your Maven project by adding the following to your pom.xml:

<dependency>
    <groupId>cs180a</groupId>
    <artifactId>wordnik-api-client</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <scope>compile</scope>
</dependency>

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

Swagger-generated library for wordnik API clients

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages