Package net.unto.twitter.methods

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


      .fromScreenName("dewitt").toScreenName("test").build();
    assertEquals("http://search.twitter.com:80/search.json", request.toString());
    assertHasParameter(request.toUrl(), "geocode", "40.757929,-73.985506,25km");
    assertHasParameter(request.toUrl(), "page", "1");
    assertHasParameter(request.toUrl(), "rpp", "10");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "lang", "en");
    assertHasParameter(request.toUrl(), "show_user", "true");
    assertHasParameter(request.toUrl(), "from", "dewitt");
    assertHasParameter(request.toUrl(), "to", "test");
  }
View Full Code Here


    assertEquals("http://search.twitter.com:80/search.json", request.toString());
    assertHasParameter(request.toUrl(), "geocode", "40.757929,-73.985506,25km");
    assertHasParameter(request.toUrl(), "page", "1");
    assertHasParameter(request.toUrl(), "rpp", "10");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "lang", "en");
    assertHasParameter(request.toUrl(), "show_user", "true");
    assertHasParameter(request.toUrl(), "from", "dewitt");
    assertHasParameter(request.toUrl(), "to", "test");
  }
View Full Code Here

    assertHasParameter(request.toUrl(), "geocode", "40.757929,-73.985506,25km");
    assertHasParameter(request.toUrl(), "page", "1");
    assertHasParameter(request.toUrl(), "rpp", "10");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "lang", "en");
    assertHasParameter(request.toUrl(), "show_user", "true");
    assertHasParameter(request.toUrl(), "from", "dewitt");
    assertHasParameter(request.toUrl(), "to", "test");
  }

  @Test
View Full Code Here

    assertHasParameter(request.toUrl(), "page", "1");
    assertHasParameter(request.toUrl(), "rpp", "10");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "lang", "en");
    assertHasParameter(request.toUrl(), "show_user", "true");
    assertHasParameter(request.toUrl(), "from", "dewitt");
    assertHasParameter(request.toUrl(), "to", "test");
  }

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

    assertHasParameter(request.toUrl(), "rpp", "10");
    assertHasParameter(request.toUrl(), "since_id", "12345");
    assertHasParameter(request.toUrl(), "lang", "en");
    assertHasParameter(request.toUrl(), "show_user", "true");
    assertHasParameter(request.toUrl(), "from", "dewitt");
    assertHasParameter(request.toUrl(), "to", "test");
  }

  @Test
  public void testSentDirectMessagesRequestUrl() {
    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.sentDirectMessages().page(1).sinceId(12345).since(
        epoch).build();
    assertEquals("http://twitter.com:80/direct_messages/sent.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

    Request request = api.sentDirectMessages().page(1).sinceId(12345).since(
        epoch).build();
    assertEquals("http://twitter.com:80/direct_messages/sent.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

        epoch).build();
    assertEquals("http://twitter.com:80/direct_messages/sent.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 testShowFriendshipsUrl() {
View Full Code Here

        .sourceId(673483)
  .targetId(20)
  .build();
    assertEquals("http://twitter.com:80/friendships/show.json",
     requestWithoutAuthById.toString());
    assertHasParameter(requestWithoutAuthById.toUrl(), "source_id", "673483");
    assertHasParameter(requestWithoutAuthById.toUrl(), "target_id", "20");
    Request requestWithoutAuthByScreenName = api.showFriendships()
        .sourceScreenName("dewitt")
  .targetScreenName("ev")
  .build();
View Full Code Here

  .targetId(20)
  .build();
    assertEquals("http://twitter.com:80/friendships/show.json",
     requestWithoutAuthById.toString());
    assertHasParameter(requestWithoutAuthById.toUrl(), "source_id", "673483");
    assertHasParameter(requestWithoutAuthById.toUrl(), "target_id", "20");
    Request requestWithoutAuthByScreenName = api.showFriendships()
        .sourceScreenName("dewitt")
  .targetScreenName("ev")
  .build();
    assertEquals("http://twitter.com:80/friendships/show.json",
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.