Module igeSdk
Publishing Sdk for ige engine.
Functions
def init(...)
-
Initialize the Sdk.
igeSdk.init()
def release(...)
-
Release the Sdk instance.
igeSdk.release()
Classes
class Advertisement
-
Static methods
def hideBanner(...)
-
Request to hide ad banner.
Advertisement.hideBanner(callback: Callable[[errCode: int, message: str], None])
Parameter
callback: [Optional] callback function.
def isInterstitialAvailable(...)
-
Check if interstitial ad is available.
Advertisement.isInterstitialAvailable()
Return
result: bool
def isRewardedVideoAvailable(...)
-
Check if rewarded video is available.
Advertisement.isRewardedVideoAvailable()
Return
result: bool
def showBanner(...)
-
Request to show ad banner.
Advertisement.showBanner(position: int, callback: Callable[[errCode: int, message: str], None])
Parameter
position: one of values below: igeSdk.AdPosition_TopLeft, igeSdk.AdPosition_TopCenter, igeSdk.AdPosition_TopRight, igeSdk.AdPosition_CenterLeft, igeSdk.AdPosition_Centered, igeSdk.AdPosition_CenterRight, igeSdk.AdPosition_BottomLeft, igeSdk.AdPosition_BottomCenter, igeSdk.AdPosition_BottomRight callback: [Optional] callback function.
def showInterstitial(...)
-
Request to show interstitial ad.
Advertisement.showInterstitial(placement: str, callback: Callable[[errCode: int, message: str], None])
Parameter
placement: [Optional] name of the placement. callback: [Optional] callback function.
def showRewardedVideo(...)
-
Request to show rewarded video.
Advertisement.showRewardedVideo(placement: str, callback: Callable[[errCode: int, message: str, reward: str, ammount: float], None])
Parameter
placement: [Optional] name of the placement. callback: [Optional] callback function.
class Analytics
-
Static methods
def customEvent(...)
-
Send a custom tracking event.
Analytics.customEvent(eventName: str, eventValue: float)
Parameter
eventName: Event name to record. eventValue (Optional): Event value.
def levelFailed(...)
-
Send tracking event when a level has failed.
Analytics.levelFailed(levelName: str, score: int)
Parameter
levelName: Level to record. score: Final score.
def levelPassed(...)
-
Send tracking event when a level has passed.
Analytics.levelPassed(levelName: str, score: int)
Parameter
levelName: Level to record. score: Final score.
def levelStarted(...)
-
Send tracking event when a level has started.
Analytics.levelStarted(levelName: str)
Parameter
levelName: Level to record.
class CrossPromo
-
Static methods
def hideSquare(...)
-
Hide the square cross promotion ads.
CrossPromo.hideSquare(levelName: str, score: int)
def isInGdprCountry(...)
-
Check if user is in GDPR country, useful to display 'Show GDPR' button in 'About' section.
CrossPromo.isInGdprCountry()
def showGdpr(...)
-
Show GDPR dialog manually, by implementing 'Show GDPR' button in the UI.
CrossPromo.showGdpr()
def showInterstitial(...)
-
Show interstitial cross promotion ad. Only show if user is not in GDPR region, or has accepted the term of usage.
CrossPromo.showInterstitial()
def showSquare(...)
-
Show square cross promotion ad. Only show if user is not in GDPR region, or has accepted the term of usage.
CrossPromo.showSquare(x: float, y: float, w: int, h: int)
Parameter
x: float value. If 0.0 < x < 1.0, use normalize coordination based on device width percentage. y: float value. If 0.0 < y < 1.0, use normalize coordination based on device heigh percentage. w: width of the banner. h: heigh of the banner.
class IAPProduct
-
Instance variables
var description
-
Product's description
var id
-
Product's id
var locale
-
Product's locale
var originalPrice
-
Product's original price (before discount if any)
var price
-
Product's price
var title
-
Product's title
class InAppPurchase
-
Static methods
def listProducts(...)
-
Query all the IAP products available on the store.
InAppPurchase.listProducts(callback: Callable[[status: int, products: List[IAPProduct]], None])
Parameter
callback: Callback function, to retrieve the data from store.
def purchase(...)
-
Purchase a product. The callback return a list of IAPProduct, which is also useable for setting a product which is 'bundle'.
InAppPurchase.purchase(productId: str, callback: Callable[[status: int, products: List[IAPProduct]], None])
Parameter
productId: product Id to purchase. callback: Callback function, to retrieve the data from store.
def restore(...)
-
Restore the previous purchases, needed only on iOS because restore purchase on iOS need user inputs which is quite annoying. The callback return a list of IAPProduct which are purchased.
InAppPurchase.restore(callback: Callable[[status: int, products: List[IAPProduct]], None])
Parameter
callback: Callback function, to retrieve the data from store.