Package org.springframework.social.foursquare.api

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


    public void getHereNow() {
        mockServer.expect(requestTo("https://api.foursquare.com/v2/venues/VENUE_ID/herenow?oauth_token=ACCESS_TOKEN&v=20110609"))
            .andExpect(method(GET))
            .andRespond(withResponse(new ClassPathResource("testdata/herenow.json", getClass()), responseHeaders));
       
        CheckinInfo herenow = foursquare.venueOperations().getHereNow("VENUE_ID", 0, 0, 0);
        assertTrue(herenow.getCheckins().size() > 0);
    }
View Full Code Here


    public void getCheckins() {
        mockServer.expect(requestTo("https://api.foursquare.com/v2/users/self/checkins?oauth_token=ACCESS_TOKEN&v=20110609"))
            .andExpect(method(GET))
            .andRespond(withResponse(new ClassPathResource("testdata/checkins.json", getClass()), responseHeaders));
       
        CheckinInfo checkinInfo = foursquare.userOperations().getCheckins();
        assertEquals(562, checkinInfo.getTotal());
        assertTrue(checkinInfo.getCheckins().get(0) != null);
        mockServer.verify();
    }
View Full Code Here

    public void getCheckinsWithOffset() {
        mockServer.expect(requestTo("https://api.foursquare.com/v2/users/self/checkins?oauth_token=ACCESS_TOKEN&v=20110609&limit=100&offset=50"))
            .andExpect(method(GET))
            .andRespond(withResponse(new ClassPathResource("testdata/checkins.json", getClass()), responseHeaders));
       
        CheckinInfo checkinInfo = foursquare.userOperations().getCheckins(100, 50);
        assertTrue(checkinInfo.getCheckins().get(0) != null);
        mockServer.verify();
    }
View Full Code Here

    public void getCheckinsWithTimestamps() {
        mockServer.expect(requestTo("https://api.foursquare.com/v2/users/self/checkins?oauth_token=ACCESS_TOKEN&v=20110609&limit=100&afterTimestamp=600&beforeTimestamp=500&offset=50"))
            .andExpect(method(GET))
            .andRespond(withResponse(new ClassPathResource("testdata/checkins.json", getClass()), responseHeaders));
       
        CheckinInfo checkinInfo = foursquare.userOperations().getCheckins(500, 600, 100, 50);
        assertTrue(checkinInfo.getCheckins().get(0) != null);
        mockServer.verify();
    }
View Full Code Here

TOP

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

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.