Package org.springframework.social.foursquare.api

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


    public void searchWithParameters() {
        mockServer.expect(requestTo("https://api.foursquare.com/v2/users/search?oauth_token=ACCESS_TOKEN&v=20110609&twitter=matt&phone=123&email=john%40doe.com&fbid=321"))
            .andExpect(method(GET))
            .andRespond(withResponse(new ClassPathResource("testdata/user-search.json", getClass()), responseHeaders));
       
        UserSearchResponse results = foursquare.userOperations().search(Arrays.asList("123"),
                Arrays.asList("john@doe.com"), Arrays.asList("matt"), Arrays.asList("321"));
       
        assertEquals(3, results.getResults().size());
        mockServer.verify();
    }
View Full Code Here


    public void searchName() {
        mockServer.expect(requestTo("https://api.foursquare.com/v2/users/search?oauth_token=ACCESS_TOKEN&v=20110609&name=matt"))
            .andExpect(method(GET))
            .andRespond(withResponse(new ClassPathResource("testdata/user-search.json", getClass()), responseHeaders));
       
        UserSearchResponse results = foursquare.userOperations().searchByName("matt");
        assertEquals(3, results.getResults().size());
        mockServer.verify();
    }
View Full Code Here

    public void searchTwitterFriends() {
        mockServer.expect(requestTo("https://api.foursquare.com/v2/users/search?oauth_token=ACCESS_TOKEN&v=20110609&twitterSource=matt"))
            .andExpect(method(GET))
            .andRespond(withResponse(new ClassPathResource("testdata/user-search.json", getClass()), responseHeaders));
       
        UserSearchResponse results = foursquare.userOperations().searchTwitterFriends("matt");
        assertEquals(3, results.getResults().size());
        mockServer.verify();
    }
View Full Code Here

TOP

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

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.