Skip to content

ar2rsawseen/GiderosGooglePlay

Repository files navigation

Plugin Reference API

<style> .ios{ color: green; } </style>

Methods

Methods and properties that are supported by both Android ans iOS are marked as green

  • googleplay:login() --login
  • googleplay:logout() --logout
  • googleplay:showSettings() --show settings screen
  • googleplay:showLeaderboard(leaderboardId) --show leaderboard screen
  • googleplay:reportScore(leaderboardId, score [,immediate]) --post score to service
  • googleplay:showAchievements() --show achievements screen
  • googleplay:reportAchievement(achId [, numSteps, immediate]) --achievement unlocked or progressed by specified amount of steps of total defined steps
  • googleplay:loadAchievements() --retrieve all defined achievemenets
  • googleplay:loadScores(leaderboardId [,timespan, participants, maxResults]) --retrieve all scores for specific leaderboard ina specific timespan for specific participans
  • googleplay:loadPlayerScores(leaderboardId [,timespan, participants, maxResults]) --retrieve all scores for specific leaderboard ina specific timespan for specific participans
  • googleplay:autoMatch(minPlayers, maxPlayers) --create a quick game between randomly selected players
  • googleplay:invitePlayers(minPlayers, maxPlayers) --allow user to invite players to a game
  • googleplay:joinRoom(invitationId) --joins the game you've been invited to
  • googleplay:showInvitations() --show screen for managing invitations
  • googleplay:showWaitingRoom(minPlayers) --show waiting room before the game with the list of players
  • googleplay:sendTo(playerId, data, isReliable) --send data to specific user by id
  • googleplay:sendToAll(data, isReliable) -- send to all users
  • googleplay:getCurrentPlayer() --get your current user name
  • googleplay:getCurrentPlayerId() --get your current user id
  • googleplay:getCurrentPlayerId() --get your current user id
  • googleplay:getAllPlayers() --retrieve information (id and name) for all users involved in game
  • googleplay:loadState(key) --load app state from slot key from the cloud
  • googleplay:updateState(key, data[, immediate]) --update app state for slot key with data bool immediate if it needs to be saved immediately
  • googleplay:deleteState(key) --delete app state for slot key
  • googleplay:resolveState(key, version, data) --resolve state conflict for slot key with version and data

Properties

  • GooglePlay.UNLOCKED --achievement state unlocked
  • GooglePlay.REVEALED --achievement state available to user
  • GooglePlay.HIDDEN --achievement state unknown to user
  • GooglePlay.ALL_TIME --leaderboard timespan all time
  • GooglePlay.WEEK --leaderboard timespan week
  • GooglePlay.TODAY --leaderboard timespan today
  • GooglePlay.FRIENDS --leaderboard participants
  • GooglePlay.ALL_PLAYERS --leaderboard participants

Events

Game Events

  • Event.DATA_RECEIVED
    • event.sender
    • event.data
  • Event.GAME_STARTED
  • Event.REPORT_ACHIEVEMENT_COMPLETE
    • event.achievementId
  • Event.LOAD_ACHIEVEMENTS_COMPLETE
    • event.achievements
    • event.achievements[].id
    • event.achievements[].name
    • event.achievements[].description
    • event.achievements[].status
    • event.achievements[].currentSteps
    • event.achievements[].totalSteps
    • event.achievements[].lastUpdate
  • Event.REPORT_SCORE_COMPLETE
  • Event.LOAD_SCORES_COMPLETE
    • event.name
    • event.leaderboardId
    • event.scores
    • event.scores[].name
    • event.scores[].timestamp
    • event.scores[].score
    • event.scores[].rank
    • event.scores[].playerId

Autorization Events

  • Event.LOGIN_ERROR
  • Event.LOGIN_COMPLETE

Cloud Events

  • Event.STATE_LOADED
    • event.key
    • event.isFresh
    • event.data
  • Event.STATE_ERROR
    • event.key
  • Event.STATE_CONFLICT
    • event.key
    • event.version
    • event.localData
    • event.serverData
  • Event.STATE_DELETED
    • event.key

Room Events

  • Event.DISCONNECTED_FROM_ROOM
    • event.roomId
  • Event.ROOM_CREATED
    • event.roomId
  • Event.LEFT_ROOM
    • event.roomId
  • Event.ROOM_CONNECTED
    • event.roomId
  • Event.CONNECTED_TO_ROOM
    • event.roomId
  • Event.ROOM_CONNECTING
    • event.roomId
  • Event.ROOM_AUTO_MATCHING
    • event.roomId
  • Event.JOINED_ROOM
    • event.roomId
  • Event.INVITATION_RECEIVED
    • event.invitationId (can be used to connect to room)

Peer Events

  • Event.PEER_INVITED
  • Event.PEER_JOINED
  • Event.PEER_DISCONNECTED
  • Event.PEER_CONNECTED
  • Event.PEER_LEFT
  • Event.PEER_DECLINED

About

Gideros plugin for GooglePlay Services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published