All Downloads are FREE. Search and download functionalities are using the official Maven repository.

facebook4j.api.CheckinMethods Maven / Gradle / Ivy

There is a newer version: 2.4.13
Show newest version
/*
 * 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.CheckinCreate;
import facebook4j.Comment;
import facebook4j.FacebookException;
import facebook4j.Like;
import facebook4j.Reading;
import facebook4j.ResponseList;

/**
 * @author Ryuji Yamashita - roundrop at gmail.com
 */
public interface CheckinMethods {
    /**
     * Returns the places that the current user has checked-into.
     * @return checkins
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#checkins - Facebook Developers
     */
    ResponseList getCheckins() throws FacebookException;

    /**
     * Returns the places that the current user has checked-into.
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return checkins
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#checkins - Facebook Developers
     */
    ResponseList getCheckins(Reading reading) throws FacebookException;

    /**
     * Returns the places that a user has checked-into.
     * @param userId the ID of a user
     * @return checkins
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#checkins - Facebook Developers
     */
    ResponseList getCheckins(String userId) throws FacebookException;

    /**
     * Returns the places that a user has checked-into.
     * @param userId the ID of a user
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return checkins
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#checkins - Facebook Developers
     */
    ResponseList getCheckins(String userId, Reading reading) throws FacebookException;

    /**
     * Checkins the place as the current user.
     * @param checkinCreate the checkin to be created
     * @return The new checkin ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#checkins - Facebook Developers
     * @deprecated creating a Post with a location attached
     */
    String checkin(CheckinCreate checkinCreate) throws FacebookException;

    /**
     * Checkins the place as a user.
     * @param userId the ID of a user
     * @param checkinCreate the checkin to be created
     * @return The new checkin ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#checkins - Facebook Developers
     * @deprecated creating a Post with a location attached
     */
    String checkin(String userId, CheckinCreate checkinCreate) throws FacebookException;

    /**
     * Returns a single checkin information.
     * @param checkinId the ID of a checkin
     * @return checkin
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Checkin - Facebook Developers
     */
    Checkin getCheckin(String checkinId) throws FacebookException;

    /**
     * Returns a single checkin information.
     * @param checkinId the ID of a checkin
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers see Graph API#reading - Facebook Developers
     * @return checkin
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Checkin - Facebook Developers
     */
    Checkin getCheckin(String checkinId, Reading reading) throws FacebookException;


    /**
     * Returns the comments on a checkin.
     * @param checkinId the ID of a checkin
     * @return comments
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Checkin#comments - Facebook Developers
     */
    ResponseList getCheckinComments(String checkinId) throws FacebookException;

    /**
     * Returns the comments on a checkin.
     * @param checkinId the ID of a checkin
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers see Graph API#reading - Facebook Developers
     * @return comments
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Checkin#comments - Facebook Developers
     */
    ResponseList getCheckinComments(String checkinId, Reading reading) throws FacebookException;

    /**
     * Comments on a checkin.
     * @param checkinId the ID of a checkin
     * @param message comment text
     * @return The new comment ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Checkin#comments - Facebook Developers
     */
    String commentCheckin(String checkinId, String message) throws FacebookException;


    /**
     * Returns the users who like a checkin.
     * @param checkinId the ID of a checkin
     * @return likes
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Checkin#likes - Facebook Developers
     */
    ResponseList getCheckinLikes(String checkinId) throws FacebookException;

    /**
     * Returns the users who like a checkin.
     * @param checkinId the ID of a checkin
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers see Graph API#reading - Facebook Developers
     * @return likes
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Checkin#likes - Facebook Developers
     */
    ResponseList getCheckinLikes(String checkinId, Reading reading) throws FacebookException;

    /**
     * Likes the checkin.
     * @param checkinId the ID of a checkin
     * @return true if like is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Checkin#likes - Facebook Developers
     */
    boolean likeCheckin(String checkinId) throws FacebookException;

    /**
     * Unlikes the checkin.
     * @param checkinId the ID of a checkin
     * @return true if unlike is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Checkin#likes - Facebook Developers
     */
    boolean unlikeCheckin(String checkinId) throws FacebookException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy