facebook4j.api
Interface GameMethods

All Known Subinterfaces:
Facebook
All Known Implementing Classes:
FacebookImpl

public interface GameMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
 boolean deleteAchievement(java.lang.String userId, java.net.URL achievementURL)
          Deletes the achievement for a user.
 boolean deleteAchievement(java.net.URL achievementURL)
          Deletes the achievement for the current user.
 boolean deleteScore()
          Deletes the current score for the current user.
 boolean deleteScore(java.lang.String userId)
          Deletes the current score for a user.
 ResponseList<Achievement> getAchievements()
          Returns the achievements for the current user.
 ResponseList<Achievement> getAchievements(Reading reading)
          Returns the achievements for the current user.
 ResponseList<Achievement> getAchievements(java.lang.String userId)
          Returns the achievements for a user.
 ResponseList<Achievement> getAchievements(java.lang.String userId, Reading reading)
          Returns the achievements for a user.
 ResponseList<Score> getScores()
          Returns the current scores for a user in games.
 ResponseList<Score> getScores(Reading reading)
          Returns the current scores for a user in games.
 ResponseList<Score> getScores(java.lang.String userId)
          Returns the current scores for the current user in games.
 ResponseList<Score> getScores(java.lang.String userId, Reading reading)
          Returns the current scores for the current user in games.
 java.lang.String postAchievement(java.lang.String userId, java.net.URL achievementURL)
          Posts the achievement for a user.
 java.lang.String postAchievement(java.net.URL achievementURL)
          Posts the achievement for the current user.
 boolean postScore(int scoreValue)
          Posts the score for the current user.
 boolean postScore(java.lang.String userId, int scoreValue)
          Posts the score for a user.
 

Method Detail

getAchievements

ResponseList<Achievement> getAchievements()
                                          throws FacebookException
Returns the achievements for the current user.

Returns:
achievements
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#achievements - Facebook Developers

getAchievements

ResponseList<Achievement> getAchievements(Reading reading)
                                          throws FacebookException
Returns the achievements for the current user.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
achievements
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#achievements - Facebook Developers

getAchievements

ResponseList<Achievement> getAchievements(java.lang.String userId)
                                          throws FacebookException
Returns the achievements for a user.

Parameters:
userId - the ID of a user
Returns:
achievements
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#achievements - Facebook Developers

getAchievements

ResponseList<Achievement> getAchievements(java.lang.String userId,
                                          Reading reading)
                                          throws FacebookException
Returns the achievements for a user.

Parameters:
userId - the ID of a user
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
achievements
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#achievements - Facebook Developers

postAchievement

java.lang.String postAchievement(java.net.URL achievementURL)
                                 throws FacebookException
Posts the achievement for the current user.

Parameters:
achievementURL - the unique URL of the achievement which the current user achieved
Returns:
achievement (instance) ID for the current user
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#achievements - Facebook Developers

postAchievement

java.lang.String postAchievement(java.lang.String userId,
                                 java.net.URL achievementURL)
                                 throws FacebookException
Posts the achievement for a user.

Parameters:
userId - the ID of a user
achievementURL - the unique URL of the achievement which the user achieved
Returns:
achievement (instance) ID for the user
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#achievements - Facebook Developers

deleteAchievement

boolean deleteAchievement(java.net.URL achievementURL)
                          throws FacebookException
Deletes the achievement for the current user.

Parameters:
achievementURL - the unique URL of the achievement to delete
Returns:
true if delete is succressful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#achievements - Facebook Developers

deleteAchievement

boolean deleteAchievement(java.lang.String userId,
                          java.net.URL achievementURL)
                          throws FacebookException
Deletes the achievement for a user.

Parameters:
userId - the ID of a user
achievementURL - the unique URL of the achievement to delete
Returns:
true if delete is succressful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#achievements - Facebook Developers

getScores

ResponseList<Score> getScores()
                              throws FacebookException
Returns the current scores for a user in games.

Returns:
scores
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#scores - Facebook Developers

getScores

ResponseList<Score> getScores(Reading reading)
                              throws FacebookException
Returns the current scores for a user in games.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
scores
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#scores - Facebook Developers

getScores

ResponseList<Score> getScores(java.lang.String userId)
                              throws FacebookException
Returns the current scores for the current user in games.

Parameters:
userId - the ID of the user
Returns:
scores
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#scores - Facebook Developers

getScores

ResponseList<Score> getScores(java.lang.String userId,
                              Reading reading)
                              throws FacebookException
Returns the current scores for the current user in games.

Parameters:
userId - the ID of the user
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
scores
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#scores - Facebook Developers

postScore

boolean postScore(int scoreValue)
                  throws FacebookException
Posts the score for the current user.

Parameters:
scoreValue - numeric score with value
Returns:
true if post is succressful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#scores - Facebook Developers

postScore

boolean postScore(java.lang.String userId,
                  int scoreValue)
                  throws FacebookException
Posts the score for a user.

Parameters:
userId - the ID of a user
scoreValue - numeric score with value
Returns:
true if post is succressful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#scores - Facebook Developers

deleteScore

boolean deleteScore()
                    throws FacebookException
Deletes the current score for the current user.

Returns:
true if delete is succressful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#scores - Facebook Developers

deleteScore

boolean deleteScore(java.lang.String userId)
                    throws FacebookException
Deletes the current score for a user.

Parameters:
userId - the ID of a user
Returns:
true if delete is succressful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#scores - Facebook Developers