Git Product home page Git Product logo

frappe-das's Introduction

Frappe DAS Library

Frappe DAS is a open-source library to enhance your framework on Frappe Framework including:

  • Firebase Integration

Firebase Integration

Requirement:
  • Google Firebase Console Account
Setup on Frappe:
  • Setup on Firebase Setting (Your Project Name, URL, and Server Key)
  • Subscribe your Android/iOS Device using Frappe UserID
  • Try it on Firebase Console
Client-side (iOS/Android):
  • Get topic corresponding to User
  • Use topic corresponding to device
  • Subscribe to Firebase on device
http://{frappe_instance}/api/method/das.firebase.topic.get_topic?user=<USER>

Response:

{
    "message": {
        "code":200,
        "data": {
            "topic": <USER_TOPIC>,
            "ios" : <USER_TOPIC_IOS>,
            "android" : <USER_TOPIC_ANDROID>,
        }
    }
}

Server-side: You can check more documentation file on das/firebase/notification.py

  • Send basic notification (only title and body)
#Public Function: Send notification to iOS and Android Devices
"""
    user:String             -> corresponding to receiver (Link to User)
    title:String             -> title of the notification
    body:String                -> body of the notification
    badge:Int (optional)    -> badge of the notification
"""
send_notification_basic(user,title,body,badge=0)
  • Send notification with data
#Public Function: Send notification to iOS and Android Devices with data
"""
    user:String             -> corresponding to receiver (Link to User)
    title:String             -> title of the notification
    body:String                -> body of the notification
    data:String                -> data of the notification
    badge:Int (optional)    -> badge of the notification
"""
send_notification_data(user,title,body,data,badge=0)

Installation

Install using bench

$ bench get-app das https://github.com/davidcast95/frappe-das
$ bench install-app das

frappe-das's People

Contributors

kevinshianto avatar digitalasiasolusindodeveloper 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.