Examples of withField()


Examples of com.bluetangstudio.searchcloud.client.utils.DocumentSchemaBuilder.withField()

    /** Tests the serialization of DocumentSchema from object to string or vice versa. */
    @Test
    public void testSerialization() throws IOException {
        DocumentSchemaBuilder builder = new DocumentSchemaBuilder();
        DocumentSchema schema = builder.withField("string", new StringFieldType(Language.ZH_TW)).withField("date",
            new DateFieldType()).withField("location", new LocationFieldType()).withField("int",
            new IntegerFieldType(true)).withField("double", new DoubleFieldType(true)).build();

        String jsonString = SerializationUtils.toJson(schema);

View Full Code Here

Examples of com.calclab.emite.xep.dataforms.Form.WithField()

  }

  @Test
  public void testFormResult() {
    final Form form = new Form(Form.Type.result);
    form.WithField(new Field(FieldType.HIDDEN).Var("FORM_TYPE").Value("jabber:bot"));
    form.WithField(new Field(FieldType.TEXT_SINGLE).Var("botname").Value("The Jabber Google Bot"));
    form.WithField(new Field(FieldType.BOOLEAN).Var("public").Value("0"));
    form.WithField(new Field(FieldType.TEXT_PRIVATE).Var("password").Value("v3r0na"));
    form.WithField(new Field(FieldType.LIST_MULTI).Var("features").Value("news").Value("search"));
    form.WithField(new Field(FieldType.LIST_SINGLE).Var("maxsubs").Value("50"));
View Full Code Here

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder.withField()

   * @see com.github.api.v2.services.JobService#getJob(java.lang.String)
   */
  @Override
  public Job getJob(String id) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.JobApiUrls.GET_JOB_URL);
        String                apiUrl  = builder.withField(ParameterNames.ID, id).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
        return unmarshall(new TypeToken<Job>(){}, json);       
  }

  /* (non-Javadoc)
 
View Full Code Here

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder.withField()

   * @see com.github.api.v2.services.UserService#followUser(java.lang.String)
   */
  @Override
  public void followUser(String userName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.FOLLOW_USER_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).buildUrl();
    callApiPost(apiUrl, new HashMap<String, String>());
  }

  /* (non-Javadoc)
   * @see com.github.api.v2.services.UserService#getCurrentUser()
View Full Code Here

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder.withField()

   * @see com.github.api.v2.services.UserService#getUserByUsername(java.lang.String)
   */
  @Override
  public User getUserByUsername(String userName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.GET_USER_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<User>(){}, json.get("user"));
  }

View Full Code Here

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder.withField()

   * @see com.github.api.v2.services.UserService#getUserFollowers(java.lang.String)
   */
  @Override
  public List<String> getUserFollowers(String userName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.GET_USER_FOLLOWERS_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<String>>(){}, json.get("users"));
  }

View Full Code Here

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder.withField()

   * @see com.github.api.v2.services.UserService#getUserFollowing(java.lang.String)
   */
  @Override
  public List<String> getUserFollowing(String userName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.GET_USER_FOLLOWING_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<String>>(){}, json.get("users"));
  }

View Full Code Here

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder.withField()

   * @see com.github.api.v2.services.UserService#getWatchedRepositories(java.lang.String)
   */
  @Override
  public List<Repository> getWatchedRepositories(String userName) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.GET_WATCHED_REPOSITORIES_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Repository>>(){}, json.get("repositories"));
  }

View Full Code Here

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder.withField()

   * @see com.github.api.v2.services.UserService#getUserByEmail(java.lang.String)
   */
  @Override
  public User getUserByEmail(String email) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.UserApiUrls.SEARCH_USERS_BY_EMAIL_URL);
        String                apiUrl  = builder.withField(ParameterNames.EMAIL, email).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<User>(){}, json.get("user"));
  }

View Full Code Here

Examples of com.github.api.v2.services.constant.GitHubApiUrls.GitHubApiUrlBuilder.withField()

   * @see com.github.api.v2.services.RepositoryService#searchRepositories(java.lang.String, com.github.api.v2.schema.Language)
   */
  @Override
  public List<Repository> searchRepositories(String query, Language language) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.RepositoryApiUrls.SEARCH_REPOSITORIES_URL);
        String                apiUrl  = builder.withField(ParameterNames.KEYWORD, query).withParameterEnum(ParameterNames.LANGUAGE, language).buildUrl();
        JsonObject json = unmarshall(callApiGet(apiUrl));
       
        return unmarshall(new TypeToken<List<Repository>>(){}, json.get("repositories"));
  }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.