facebook4j.api
Interface GameMethods

All Known Subinterfaces:
Facebook

public interface GameMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

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

String postAchievement(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

String postAchievement(String userId,
                       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(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(String userId,
                          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(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(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(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(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


Copyright © 2019. All rights reserved.