Package org.springframework.social.foursquare.api

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


  public void get() {
    mockServer.expect(requestTo("https://api.foursquare.com/v2/photos/PHOTO_ID?oauth_token=ACCESS_TOKEN&v=20110609"))
      .andExpect(method(GET))
      .andRespond(withResponse(new ClassPathResource("testdata/photo.json", getClass()), responseHeaders));
   
    Photo photo = foursquare.photoOperations().get("PHOTO_ID");
    assertEquals("4d0fb8162d39a340637dc42b", photo.getId());
    mockServer.verify();
  }
View Full Code Here


  public void addToCheckin() {
    mockServer.expect(requestTo("https://api.foursquare.com/v2/photos/add?oauth_token=ACCESS_TOKEN&v=20110609"))
      .andExpect(method(POST))
      .andRespond(withResponse(new ClassPathResource("testdata/photo.json", getClass()), responseHeaders));
   
    Photo photo = foursquare.photoOperations().addToCheckin("CHECKIN_ID", getUploadResource("image.jpg", "IMAGE DATA"), null, null, null, null, null, null);
    assertEquals("4d0fb8162d39a340637dc42b", photo.getId());
    mockServer.verify();
  }
View Full Code Here

  public void addToTip() {
    mockServer.expect(requestTo("https://api.foursquare.com/v2/photos/add?oauth_token=ACCESS_TOKEN&v=20110609"))
      .andExpect(method(POST))
      .andRespond(withResponse(new ClassPathResource("testdata/photo.json", getClass()), responseHeaders));
   
    Photo photo = foursquare.photoOperations().addToTip("TIP_ID", getUploadResource("image.jpg", "IMAGE DATA"), null, null, null, null, null, null);
    assertEquals("4d0fb8162d39a340637dc42b", photo.getId());
    mockServer.verify();
  }
View Full Code Here

  public void addToVenue() {
    mockServer.expect(requestTo("https://api.foursquare.com/v2/photos/add?oauth_token=ACCESS_TOKEN&v=20110609"))
      .andExpect(method(POST))
      .andRespond(withResponse(new ClassPathResource("testdata/photo.json", getClass()), responseHeaders));
   
    Photo photo = foursquare.photoOperations().addToVenue("VENUE_ID", getUploadResource("image.jpg", "IMAGE DATA"), null, null, null, null, null, null);
    assertEquals("4d0fb8162d39a340637dc42b", photo.getId());
    mockServer.verify();
  }
View Full Code Here

TOP

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

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.