Examples of Trends


Examples of net.unto.twitter.TwitterProtos.Trends


  @Test
  public void testNewTrends() throws IOException {
    String json = readTestData("trends.json");
    Trends trends = JsonUtil.newTrends(json);
    assertEquals(new Integer(10), new Integer(trends.getTrendsList().size()));
  }
View Full Code Here

Examples of twitter4j.Trends

  public void obtainsCurrentTrends() throws Exception {
    System.out.println("***************************************************************************");
    System.out.println("Returns the current top 10 trending topics on Twitter.");
    // Returns the current top 10 trending topics on Twitter.
    DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
    Trends trends = TWITTER_CLIENT.getCurrentTrends();
    System.out.printf("==> Day %s <===\n", dateFormat.format(trends.getTrendAt()));
    if (trends.getTrends() != null) {
      for (Trend trend : trends.getTrends()) {
        System.out.printf("Name:[%s] - Query:[%s] - Url:[%s]\n", trend.getName(), trend.getQuery(), trend.getUrl());
      }
    }
  }
View Full Code Here

Examples of twitter4j.Trends

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Trends)) return false;

        Trends trends1 = (Trends) o;

        if (asOf != null ? !asOf.equals(trends1.getAsOf()) : trends1.getAsOf() != null)
            return false;
        if (trendAt != null ? !trendAt.equals(trends1.getTrendAt()) : trends1.getTrendAt() != null)
            return false;
        if (!Arrays.equals(trends, trends1.getTrends())) return false;

        return true;
    }
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.