facebook4j.api.SearchMethods Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of facebook4j-core Show documentation
Show all versions of facebook4j-core Show documentation
A Java library for the Facebook Graph API
/*
* Copyright 2012 Ryuji Yamashita
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package facebook4j.api;
import facebook4j.Checkin;
import facebook4j.Event;
import facebook4j.FacebookException;
import facebook4j.GeoLocation;
import facebook4j.Group;
import facebook4j.Location;
import facebook4j.Place;
import facebook4j.Post;
import facebook4j.Reading;
import facebook4j.ResponseList;
import facebook4j.User;
import facebook4j.internal.org.json.JSONObject;
/**
* @author Ryuji Yamashita - roundrop at gmail.com
*/
public interface SearchMethods {
/**
* Searches public posts.
* @param query the search condition
* @return posts
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchPosts(String query) throws FacebookException;
/**
* Searches public posts.
* @param query the search condition
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return posts
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchPosts(String query, Reading reading) throws FacebookException;
/**
* Searches users.
* @param query the search condition
* @return users
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchUsers(String query) throws FacebookException;
/**
* Searches users.
* @param query the search condition
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return users
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchUsers(String query, Reading reading) throws FacebookException;
/**
* Searches events.
* @param query the search condition
* @return events
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchEvents(String query) throws FacebookException;
/**
* Searches events.
* @param query the search condition
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return events
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchEvents(String query, Reading reading) throws FacebookException;
/**
* Searches groups.
* @param query the search condition
* @return groups
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchGroups(String query) throws FacebookException;
/**
* Searches groups.
* @param query the search condition
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return groups
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchGroups(String query, Reading reading) throws FacebookException;
/**
* Searches places.
* @param query the search condition
* @return places
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchPlaces(String query) throws FacebookException;
/**
* Searches places.
* @param query the search condition
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return places
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchPlaces(String query, Reading reading) throws FacebookException;
/**
* Searches places.
* @param query the search condition
* @param center latitude and longitude
* @param distance distance
* @return places
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchPlaces(String query, GeoLocation center, int distance) throws FacebookException;
/**
* Searches places. narrows the search to a specific location and distance.
* @param query the search condition
* @param center latitude and longitude
* @param distance distance
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return places
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchPlaces(String query, GeoLocation center, int distance, Reading reading) throws FacebookException;
/**
* Returns latest checkins.
* @return checkins
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchCheckins() throws FacebookException;
/**
* Returns latest checkins.
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return checkins
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchCheckins(Reading reading) throws FacebookException;
/**
* Returns locations near a geographical location.
* @param center latitude and longitude
* @param distance distance
* @return locations
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchLocations(GeoLocation center, int distance) throws FacebookException;
/**
* Returns locations near a geographical location.
* @param center latitude and longitude
* @param distance distance
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return locations
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchLocations(GeoLocation center, int distance, Reading reading) throws FacebookException;
/**
* Returns a particular place.
* @param placeId specify the ID of the place
* @return locations
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchLocations(String placeId) throws FacebookException;
/**
* Returns a particular place.
* @param placeId specify the ID of the place
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return locations
* @throws FacebookException when Facebook service or network is unavailable
* @see Graph API#searching - Facebook Developers
*/
ResponseList searchLocations(String placeId, Reading reading) throws FacebookException;
/**
* Searches every type all public objects.
* @param query the search condition
* @return objects
* @throws FacebookException when Facebook service or network is unavailable
*/
ResponseList search(String query) throws FacebookException;
/**
* Searches every type all public objects.
* @param query the search condition
* @param reading optional reading parameters. see Graph API#reading - Facebook Developers
* @return objects
* @throws FacebookException when Facebook service or network is unavailable
*/
ResponseList search(String query, Reading reading) throws FacebookException;
}