Package org.springframework.social.foursquare.api

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


  public void noAuthGetVenue() {
    mockServer.expect(requestTo("https://api.foursquare.com/v2/venues/VENUE_ID?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&v=20110609"))
      .andExpect(method(GET))
      .andRespond(withResponse(new ClassPathResource("testdata/venue.json", getClass()), responseHeaders));
   
    Venue venue = noAuthFoursquare.venueOperations().getVenue("VENUE_ID");
    assertEquals("3fd66200f964a520dbe91ee3", venue.getId());
    mockServer.verify();
  }
View Full Code Here


  public void getVenue() {
    mockServer.expect(requestTo("https://api.foursquare.com/v2/venues/VENUE_ID?oauth_token=ACCESS_TOKEN&v=20110609"))
      .andExpect(method(GET))
      .andRespond(withResponse(new ClassPathResource("testdata/venue.json", getClass()), responseHeaders));
   
    Venue venue = foursquare.venueOperations().getVenue("VENUE_ID");
    assertEquals("3fd66200f964a520dbe91ee3", venue.getId());
    Location location = venue.getLocation();
    assertNotNull(location);
    assertEquals("170 Thompson St", location.getAddress());
    assertEquals("btwn Bleecker & Houston", location.getCrossStreet());
    assertEquals("NY", location.getState());
    assertEquals("New York", location.getCity());
View Full Code Here

    mockServer.expect(requestTo("https://api.foursquare.com/v2/venues/add?oauth_token=ACCESS_TOKEN&v=20110609"))
      .andExpect(method(POST))
      .andExpect(body("name=NAME&address=ADDRESS&crossStreet=CROSSSTREET&city=CITY&state=STATE&zip=ZIP&phone=PHONE&ll=1.0%2C1.0&primaryCategoryId=CATEGORYID"))
      .andRespond(withResponse(new ClassPathResource("testdata/venue.json", getClass()), responseHeaders));
   
    Venue venue = foursquare.venueOperations().addVenue( "NAME", "ADDRESS", "CROSSSTREET",
        "CITY", "STATE", "ZIP", "PHONE", 1, 1, "CATEGORYID");
    assertEquals("3fd66200f964a520dbe91ee3", venue.getId());
    mockServer.verify();
  }
View Full Code Here

TOP

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

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.