Package net.unto.twitter.methods

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


  public void testDirectMessagesRequestUrl() {
    Api api = Api.builder().username("test").password("test").build();
    DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeZone.UTC);
    Request request = api.directMessages().page(1).sinceId(12345).since(epoch).build();
    assertEquals("http://twitter.com:80/direct_messages.json", request.toString());
    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


    Api api = Api.builder().username("test").password("test").build();
    DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeZone.UTC);
    Request request = api.directMessages().page(1).sinceId(12345).since(epoch).build();
    assertEquals("http://twitter.com:80/direct_messages.json", request.toString());
    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

    DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeZone.UTC);
    Request request = api.directMessages().page(1).sinceId(12345).since(epoch).build();
    assertEquals("http://twitter.com:80/direct_messages.json", request.toString());
    assertHasParameter(request.toUrl(), "page", "1");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "since",
        "Thu Jan 01 00:00:00 +0000 1970");
  }

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

  public void testFavoritesRequestUrl() {
    Api api = Api.builder().username("test").password("test").build();
    Request request = api.favorites().id("dewitt").page(1).build();
    assertEquals("http://twitter.com:80/favorites/dewitt.json", request
        .toString());
    assertHasParameter(request.toUrl(), "page", "1");
  }

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

  public void testFollowersRequestUrl() {
    Api api = Api.builder().username("test").password("test").build();
    Request request = api.followers().id("dewitt").page(1).build();
    assertEquals("http://twitter.com:80/statuses/followers/dewitt.json",
        request.toString());
    assertHasParameter(request.toUrl(), "page", "1");
  }

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

  public void testFriendshipExistsRequestUrl() {
    Api api = Api.builder().username("test").password("test").build();
    Request request = api.friendshipExists("ev", "biz").build();
    assertEquals("http://twitter.com:80/friendships/exists.json", request
        .toString());
    assertHasParameter(request.toUrl(), "user_a", "ev");
    assertHasParameter(request.toUrl(), "user_b", "biz");
  }

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

    Api api = Api.builder().username("test").password("test").build();
    Request request = api.friendshipExists("ev", "biz").build();
    assertEquals("http://twitter.com:80/friendships/exists.json", request
        .toString());
    assertHasParameter(request.toUrl(), "user_a", "ev");
    assertHasParameter(request.toUrl(), "user_b", "biz");
  }

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

  public void testFriendsRequestUrl() {
    Api api = Api.builder().username("test").password("test").build();
    Request request = api.friends().id("dewitt").page(1).build();
    assertEquals("http://twitter.com:80/statuses/friends/dewitt.json", request
        .toString());
    assertHasParameter(request.toUrl(), "page", "1");
  }

  @Test
  public void testFriendsTimelineRequestUrl() {
    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.friendsTimeline().count(10).page(1).sinceId(12345)
        .since(epoch).build();
    assertEquals("http://twitter.com:80/statuses/friends_timeline.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.friendsTimeline().count(10).page(1).sinceId(12345)
        .since(epoch).build();
    assertEquals("http://twitter.com:80/statuses/friends_timeline.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

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.