Package org.springframework.social.foursquare.api

Examples of org.springframework.social.foursquare.api.Tip


  public void get() {
    mockServer.expect(requestTo("https://api.foursquare.com/v2/tips/TIP_ID?oauth_token=ACCESS_TOKEN&v=20110609"))
      .andExpect(method(GET))
      .andRespond(withResponse(new ClassPathResource("testdata/tip.json", getClass()), responseHeaders));
   
    Tip tip = foursquare.tipOperations().get("TIP_ID");
    assertEquals("4b5e662a70c603bba7d790b4", tip.getId());
    mockServer.verify();
  }
View Full Code Here


    mockServer.expect(requestTo("https://api.foursquare.com/v2/tips/add?oauth_token=ACCESS_TOKEN&v=20110609"))
      .andExpect(method(POST))
      .andExpect(body("venueId=VENUE_ID&text=TEXT&url=URL"))
      .andRespond(withResponse(new ClassPathResource("testdata/tip.json", getClass()), responseHeaders));
   
    Tip tip = foursquare.tipOperations().add("VENUE_ID", "TEXT", "URL");
    assertEquals("4b5e662a70c603bba7d790b4", tip.getId());
    mockServer.verify();
  }
View Full Code Here

  public void unmark() {
    mockServer.expect(requestTo("https://api.foursquare.com/v2/tips/TIP_ID/unmark?oauth_token=ACCESS_TOKEN&v=20110609"))
      .andExpect(method(POST))
      .andRespond(withResponse(new ClassPathResource("testdata/tip.json", getClass()), responseHeaders));
   
    Tip tip = foursquare.tipOperations().unmarkTodo("TIP_ID");
    assertTrue(tip != null);
    mockServer.verify();
  }
View Full Code Here

TOP

Related Classes of org.springframework.social.foursquare.api.Tip

Copyright © 2018 www.massapicom. 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.