Code Monkey home page Code Monkey logo

godot-tapdaq's Introduction

Tapdaq plugin for Godot engine.

Register an account in Tapdaq https://www.tapdaq.com before using this module.

Installation

Use NativeLib Addon or NativeLib-CLI for installation.

Adapters

The core module has only SDK for Tapdaq mediation. For using any ad networks you should install specific adapters. For example install tapdaq-fan for Facebook Audience Network.

Usage

Wrapper on gd-script will be in your autoloading list. Use global name tapdaq anywhere in your code to use API.

API

loadBanner(id: String, isTop: bool, callback_id: int)

Load banner with specific zone ID. callback_id is instance_id from callback object.

loadInterstitial(id: String, callback_id: int)

Load interstitial with specific zone ID. callback_id is instance_id from callback object.

loadRewardedVideo(id: String, callback_id: int)

Load rewarded ad with specific zone ID. callback_id is instance_id from callback object.

bannerWidth(id: String) -> int

Returns current banner width. Returns 0 if there are no active banners.

bannerHeight(id: String) -> int

Returns current banner height. Returns 0 if there are no active banners.

showBanner(id: String)

Show banner with specific zone ID. The banner must be loaded before this call.

hideBanner(id: String)

Hide banner with specific zone ID.

removeBanner(id: String)

Completely remove banner view from the screen.

showInterstitial(id: String)

Show interstitial with specific zone ID. The interstitial must be loaded before call.

showRewardedVideo(id: String)

Show rewarded video ad with specific zone ID. The rewarded ad must be loaded before call.

Privacy settings

initWithGdpr(app_id: String, client_key: String, applies: bool, approval: bool)

Init SDK with GPDR status. If using Ogury plugin it can be done automatically.

updateGdprStatus(applies: bool, approval: bool)

Update GPDR status after initializing SDK

updateAgeRestrictedStatus(age_restricted: bool)

Update age restriction after initializing SDK

updateCCPAStatus(applies: bool, approval: bool)

Update CCPA status after initializing SDK

updateContentRating(rating: String)

Update content rating for AdMob (possible values: G, PG, T, MA )

updateUserId(uid: String)

Set custom user ID

Callbacks

When load ad you specified instance_id of callback object. This object can have methods to get callbacks from the SDK.

Rewarded video callbacks

_on_rewarded_video_ad_loaded(id: String)

_on_rewarded_video_ad_failed_to_load(id: String, error: String)

_on_rewarded_video_ad_opened(id: String)

_on_rewarded_video_ad_left_application(id: String)

_on_rewarded_video_ad_closed(id: String)

_on_rewarded_video_started(id: String)

_on_rewarded_video_completed(id: String)

_on_rewarded(id: String, reward: String, amount: int)

Banner callbacks

_on_banner_loaded(id: String)

_on_banner_failed_to_load(id: String)

_on_banner_failed_to_load(id: String, error: String)

_on_banner_shown(id: String)

Interstitial callbacks

_on_interstitial_loaded(id: String)

_on_interstitial_failed_to_load(id: String, error: String)

_on_interstitial_close(id: String)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.