// Path: word2vec-response/src/main/java/com/apitore/banana/response/word2vec/WordVectorResponseEntity.java
// @ApiModel
// @Data
// @EqualsAndHashCode(callSuper=false)
// public class WordVectorResponseEntity extends BaseResponseEntity {
// 
//   /**
//    *
//    */
//   private static final long serialVersionUID = 3050057956052841035L;
// 
//   @ApiModelProperty(required=true, value="Input word")
//   private String word;
//   @ApiModelProperty(required=false, value="Vector")
//   private double[] vector;
// 
// }


import java.util.HashMap;
import java.util.Map;
import org.springframework.web.client.RestTemplate;
import com.apitore.banana.response.word2vec.WordVectorResponseEntity;
import com.apitore.banana.utils.UrlFormatter;
package com.apitore.banana.response.word2vec.sample;






/**
 * @author Keigo Hattori
 */
public class Api8Word2VecWordVectorExample {

  static String ENDPOINT     = "https://api.apitore.com/api/8/word2vec-neologd-jawiki/wordvector";
  static String ACCESS_TOKEN = "YOUR-ACCESS-TOKEN";

  public static void main(String[] args) {
    RestTemplate restTemplate = new RestTemplate();
    Map<String, String> params = new HashMap<String, String>();
    params.put("access_token", ACCESS_TOKEN);
    params.put("word", "犬");
    String url = UrlFormatter.format(ENDPOINT, params);

    WordVectorResponseEntity response =
// Path: word2vec-response/src/main/java/com/apitore/banana/response/word2vec/WordVectorResponseEntity.java
// @ApiModel
// @Data
// @EqualsAndHashCode(callSuper=false)
// public class WordVectorResponseEntity extends BaseResponseEntity {
// 
//   /**
//    *
//    */
//   private static final long serialVersionUID = 3050057956052841035L;
// 
//   @ApiModelProperty(required=true, value="Input word")
//   private String word;
//   @ApiModelProperty(required=false, value="Vector")
//   private double[] vector;
// 
// }


// Path: word2vec-response/src/main/java/com/apitore/banana/response/word2vec/sample/Api8Word2VecWordVectorExample.java
import java.util.HashMap;
import java.util.Map;
import org.springframework.web.client.RestTemplate;
import com.apitore.banana.response.word2vec.WordVectorResponseEntity;
import com.apitore.banana.utils.UrlFormatter;

package com.apitore.banana.response.word2vec.sample;






/**
 * @author Keigo Hattori
 */
public class Api8Word2VecWordVectorExample {

  static String ENDPOINT     = "https://api.apitore.com/api/8/word2vec-neologd-jawiki/wordvector";
  static String ACCESS_TOKEN = "YOUR-ACCESS-TOKEN";

  public static void main(String[] args) {
    RestTemplate restTemplate = new RestTemplate();
    Map<String, String> params = new HashMap<String, String>();
    params.put("access_token", ACCESS_TOKEN);
    params.put("word", "犬");
    String url = UrlFormatter.format(ENDPOINT, params);

    WordVectorResponseEntity response =
        restTemplate.getForObject(url, WordVectorResponseEntity.class, params);