Giter VIP home page Giter VIP logo

django-admob-ssv's Introduction

Django Admob Server-Side Verification (SSV)

PyPI PyPI - License

A Django app providing a view that handles Admob Server-Side Verification callbacks. Successfull verifications trigger a custom signal. Separate apps may listen to that signal and reward the user based on the information received via the callback.

Taken from the Admob SSV documentation:

Server-side verification callbacks are URL requests, with query parameters expanded by Google, that are sent by Google to an external system to notify it that a user should be rewarded for interacting with a rewarded video ad. Rewarded video SSV (server-side verification) callbacks provide an extra layer of protection against spoofing of client-side callbacks to reward users.

Requirements

Installation

pip install django-admob-ssv

Configuration

  1. Add a path for the django_admob_ssv.views.admob_ssv view to your urlpatterns.
from django.urls import path
from django_admob_ssv.views import admob_ssv

urlpatterns = [
    path('admob-ssv/', admob_ssv),
]
  1. Listen to the django_admob_ssv.signals.valid_admob_ssv signal.
from django.dispatch import receiver
from django_admob_ssv.signals import valid_admob_ssv

@receiver(valid_admob_ssv)
def reward_user(sender, query, **kwargs):
    ad_network = query.get('ad_network')
    ad_unit = query.get('ad_unit')
    custom_data = query.get('custom_data')
    # ...

Take a look at this list of all SSV callback parameters.

Also make sure you connect your receiver properly, otherwise it won't get called. (Take a look at the "Where should this code live?" box).

Examples

Take a look at the "Configuration" section above and the provided example_project.

django-admob-ssv's People

Contributors

doctorjohn avatar ji3g4m6zo6 avatar

Watchers

James Cloos avatar

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.