• Public
  • Public/Protected
  • All

Class GamePush





#apiClient: default
#projectConfig: PlayerProjectConfig
#serverTime: number
_achievementsService: default
_channelsService: default
_documentsService: default
_events: EventLite = ...
_filesService: default
_gamesCollectionsService: default
_imagesService: default
_leaderboardsService: default
_paymentsService: default
_playerService: default
_projectService: default
_storage: Storage
achievements: Achievements

Achievements manager

ads: Ads

Ads manager

analytics: Analytics

Analytics manager

app: default

Ads manager

avatarGenerator: string

Current selected avatar generator

avatarGeneratorTemplate: string

Current selected avatar generator template URL

channels: default

Channels manager

devtools: { changeLanguage: any; closeSticky: any; purchaseProduct: any; resumeSubscription: any; showCounter: any; showFullscreen: any; showPreloader: any; showRewardedVideo: any; showSticky: any; showToast: any; unsubscribe: any }

Devtools manager, only in dev

Type declaration

  • changeLanguage:function
    • changeLanguage(language: Lang): Promise<void>
  • closeSticky:function
    • closeSticky(): void
  • purchaseProduct:function
    • purchaseProduct(product: Product): Promise<boolean>
  • resumeSubscription:function
    • resumeSubscription(product: Product, purchase: PlayerPurchase): Promise<boolean>
  • showCounter:function
    • showCounter(apiReqCounter: number): void
  • showFullscreen:function
    • showFullscreen(): Promise<boolean>
  • showPreloader:function
    • showPreloader(): Promise<boolean>
  • showRewardedVideo:function
    • showRewardedVideo(): Promise<boolean>
  • showSticky:function
    • showSticky(): Promise<boolean>
  • showToast:function
    • showToast(__namedParameters: Toast): void
  • unsubscribe:function
    • unsubscribe(product: Product, purchase: PlayerPurchase): Promise<boolean>
documents: Documents

Documents manager

files: Files

Images manager

fullscreen: Fullscreen

Fullscreen manager

gamesCollections: GamesCollections

Games Collections manager

images: Images

Images manager

isGameplay: boolean = false

Check is in gameplay

isMobile: boolean

Is on mobile device

isPaused: boolean = false

Check game paused

language: Lang

Current selected language

leaderboard: Leaderboard

Leaderboard manager

loader: { dec: any; inc: any }

Global loader manager

Type declaration

overlay: { changeAvatarGenerator: any; changeLanguage: any; close: any; login: any; openAchievements: any; openDocument: any; openGamesCollections: any; openLeaderboard: any; pickPlayerOnConflict: any; share: any; unlockAchievement: any }

Overlay manager

Type declaration

  • changeAvatarGenerator:function
    • changeAvatarGenerator(avatarGenerator: string): void
  • changeLanguage:function
    • changeLanguage(lang: Lang): Promise<void>
  • close:function
    • close(): void
  • login:function
    • login(): Promise<{ secretCode?: string; type: string }>
  • openAchievements:function
    • openAchievements(achievementsInfo: FetchPlayerAchievementsOutput, __namedParameters?: { scrollTo?: string | number }): Promise<void>
    • Parameters

      • achievementsInfo: FetchPlayerAchievementsOutput
      • __namedParameters: { scrollTo?: string | number } = {}
        • Optional scrollTo?: string | number

      Returns Promise<void>

  • openDocument:function
    • openDocument(document: Document): Promise<void>
  • openGamesCollections:function
    • openGamesCollections(gamesCollection: GamesCollection): Promise<void>
  • openLeaderboard:function
    • openLeaderboard(query: GetLeaderboardQuery, leaderbordInfo: RatingData): void
  • pickPlayerOnConflict:function
    • pickPlayerOnConflict(conflictInfo: Omit<PlayerSyncConflict, "__typename">): Promise<PlayerState>
    • Parameters

      • conflictInfo: Omit<PlayerSyncConflict, "__typename">

      Returns Promise<PlayerState>

  • share:function
    • share(shareType: ShareType, options: ShareOptions): Promise<boolean>
  • unlockAchievement:function
    • unlockAchievement(achievement: Achievement): void
payments: Payments

Payments manager

platform: Platform

Platform info

player: MyPlayer

Player manager

players: Players

Players manager

projectId: number
ready: Promise<GamePush>

Resolves when all platform and project data was loaded

  • platform SDK loaded
setBackground: ((__namedParameters: Partial<BackgroundSettings>) => void) = setBackground

Type declaration

    • (__namedParameters: Partial<BackgroundSettings>): void
    • Parameters

      • __namedParameters: Partial<BackgroundSettings>

      Returns void

socials: Socials

Socials manager

variables: GameVariables

Game variables manager


  • get isAllowedOrigin(): boolean
  • get isDev(): boolean
  • get nativeSDK(): any
  • get serverTime(): string


  • changeAvatarGenerator(): Promise<void>
  • changeLanguage(lang: Lang): Promise<void>
  • gameStart(): Promise<void>
  • gameplayStart(): Promise<void>
  • gameplayStop(): Promise<void>
  • generateAvatar(hash: any, size: number): string
  • loadOverlay(): Promise<void>
  • You can preload overlay to fast open when required

    Returns Promise<void>

  • off<ET>(type: ET, handler: ((event: GPEvents[ET]) => void)): void
  • on<ET>(type: ET, handler: ((event: GPEvents[ET]) => void)): void
  • once<ET>(type: ET, handler: ((event: GPEvents[ET]) => void)): void
  • pause(): void
  • resume(): void

Generated using TypeDoc