Package net.unto.twitter.methods

Examples of net.unto.twitter.methods.Request.toUrl()


        .toString());
    assertHasParameter(request.toUrl(), "name", "DeWitt Clinton");
    assertHasParameter(request.toUrl(), "email", "dewitt@unto.net");
    assertHasParameter(request.toUrl(), "url", "http://unto.net/");
    assertHasParameter(request.toUrl(), "location", "San Francisco, CA");
    assertHasParameter(request.toUrl(), "description", "...");
  }

  @Test
  public void testUpdateStatusRequestUrl() {
    Api api = Api.builder().username("test").password("test").build();
View Full Code Here


    Api api = Api.builder().username("test").password("test").build();
    Request request = api.updateStatus("Hello, Twitter!").inReplyToStatusId(
        12345).build();
    assertEquals("http://twitter.com:80/statuses/update.json", request
        .toString());
    assertHasParameter(request.toUrl(), "status", "Hello, Twitter!");
    assertHasParameter(request.toUrl(), "in_reply_to_status_id", "12345");
  }

  @Test
  public void testUserTimelineRequestUrl() {
View Full Code Here

    Request request = api.updateStatus("Hello, Twitter!").inReplyToStatusId(
        12345).build();
    assertEquals("http://twitter.com:80/statuses/update.json", request
        .toString());
    assertHasParameter(request.toUrl(), "status", "Hello, Twitter!");
    assertHasParameter(request.toUrl(), "in_reply_to_status_id", "12345");
  }

  @Test
  public void testUserTimelineRequestUrl() {
    Api api = Api.builder().username("test").password("test").build();
View Full Code Here

    DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeZone.UTC);
    Request request = api.userTimeline().id("dewitt").count(10).page(1)
        .sinceId(12345).since(epoch).build();
    assertEquals("http://twitter.com:80/statuses/user_timeline/dewitt.json",
        request.toString());
    assertHasParameter(request.toUrl(), "count", "10");
    assertHasParameter(request.toUrl(), "page", "1");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "since",
        "Thu Jan 01 00:00:00 +0000 1970");
  }
View Full Code Here

    Request request = api.userTimeline().id("dewitt").count(10).page(1)
        .sinceId(12345).since(epoch).build();
    assertEquals("http://twitter.com:80/statuses/user_timeline/dewitt.json",
        request.toString());
    assertHasParameter(request.toUrl(), "count", "10");
    assertHasParameter(request.toUrl(), "page", "1");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "since",
        "Thu Jan 01 00:00:00 +0000 1970");
  }
View Full Code Here

        .sinceId(12345).since(epoch).build();
    assertEquals("http://twitter.com:80/statuses/user_timeline/dewitt.json",
        request.toString());
    assertHasParameter(request.toUrl(), "count", "10");
    assertHasParameter(request.toUrl(), "page", "1");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "since",
        "Thu Jan 01 00:00:00 +0000 1970");
  }

View Full Code Here

    assertEquals("http://twitter.com:80/statuses/user_timeline/dewitt.json",
        request.toString());
    assertHasParameter(request.toUrl(), "count", "10");
    assertHasParameter(request.toUrl(), "page", "1");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "since",
        "Thu Jan 01 00:00:00 +0000 1970");
  }


  @Test
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.