Giter Club home page Giter Club logo

appdataroom-javascript-bridge's Introduction

AppDataRoom-Javascript-Bridge

Javascript bridge that provides native functionality to web bundles running within App Data Room

#####Usage:

Simply include the adrJSBridge.js file and call any of the public methods. See index.html for usage examples.

adr.sendEmail("[email protected]", "", "test subject", "test body", onSuccess, onError);

##Public Methods:

###sendEmailEncoded Sends an email via the platform's native mail application using base 64 encoding for the parameters Support: iOS v1.7.9+

#####Parameters

  • to
    • (string) destination email address
  • cc
    • (string) carbon copy email address
  • subject
    • (string) subject of email
  • body
    • (string) body of email
  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###sendEmailWithPDFAttachmentFromHTML Sends an email via the platform's native mail application with a PDF attachment that is generated from the supplied HTML markup, also using base 64 encoding for the parameters Support: iOS v1.7.9+

#####Parameters

  • to
    • (string) destination email address
  • cc
    • (string) carbon copy email address
  • subject
    • (string) subject of email
  • body
    • (string) body of email
  • attachmentHTML
    • (string) HTML to save as PDF and attach to email NOTE: this supports SVG
  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###sendEmail Deprecated in v1.7.9, use sendEmailEncoded instead Sends an email via the platform's native mail application Support: iOS v1.7.0+, Windows v1.1+

#####Parameters

  • to
    • (string) destination email address
  • cc
    • (string) carbon copy email address
  • subject
    • (string) subject of email
  • body
    • (string) body of email
  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###getItem Gets a value for a specified key from the native local database Support: iOS v1.7.0+

#####Parameters

  • key
    • (string) key to retrieve
  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###setItem Sets a value for a specified key to the native local database Support: iOS v1.7.0+

#####Parameters

  • key
    • (string) key to store
  • value
    • (string) value to store
  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###logEvent Logs an event to the App Data Room analytics engine, which will then be queued to be sent up to Media Manager when a connection is available Support: iOS v1.7.0+

#####Parameters

  • object
    • (string) object parameter of event
  • action
    • (string) action parameter of event
  • additionalParams
    • (string) key value pair listing of additional parameters (example: "email:[email protected]")
  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###scanPDF417Barcode Scans a PDF 417 barcode and returns the text encoded in the barcode (encoded in base64) Support: iOS v1.7.2+, Cat Sales 2.1 +

#####Parameters

  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###captureLead Captures a lead and returns the scan string (encoded in base64) Support: iOS v1.7.2+, Cat Sales 2.1 +

#####Parameters

  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###getCurrentUserName Returns the currently logged in user's name (first and last) (encoded in base64) Support: iOS v1.7.8+, Cat Sales 2.2 +

#####Parameters

  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###getCurrentUserEmail Returns the currently logged in user's email (encoded in base64) Support: iOS v2.6+, Cat Sales 2.3 +

#####Parameters

  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

###getCurrentUserRegions Returns the currently logged in user's regions (encoded in base64) Support: iOS v2.6.3+

#####Parameters

  • successCallback
    • (function) function to be called on success
  • errorCallback
    • (function) function to be called on error

appdataroom-javascript-bridge's People

Contributors

angelo0000 avatar rippleadder avatar xosuma avatar

Watchers

 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.