Giter VIP home page Giter VIP logo

cordova-plugin-digits's Introduction

cordova-plugin-digits

This plugin provides native mobile Digits.com integration for both Android and iOS.

Installation

This requires cordova 5.0+ (current stable 1.0.1)

cordova plugin add cordova-plugin-digits --variable FABRIC_API_KEY=your_api_key --variable FABRIC_CONSUMER_KEY=your_consumer_key --variable FABRIC_CONSUMER_SECRET=your_consumer_secret

It is also possible to install via repo url directly (unstable)

cordova plugin add https://github.com/JimmyMakesThings/cordova-plugin-digits --variable FABRIC_API_KEY=your_api_key --variable FABRIC_CONSUMER_KEY=your_consumer_key --variable FABRIC_CONSUMER_SECRET=your_consumer_secret

Supported Platforms

  • iOS
  • Android

Methods

  • window.plugins.digits.authenticate

window.plugins.digits.authenticate

Initiates the Digits native interface. If successful the authenticateSuccess is called, otherwise the authenticateFailed is called instead.

window.plugins.digits.authenticate(options, authenticateSuccess, authenticateFailed);

Parameters

  • options: Theming options for iOS.
  • authenticateSuccess: The callback that is passed the authenticated info.
  • geolocationError: (Optional) The callback that executes if authentication fails.

Example

// Currently only accentColor and backgroundColor is supported.
// Note: These have no effect on Android.
const options = {
  accentColor: '#ff0000',
  backgroundColor: '#ffffff',
};

window.plugins.digits.authenticate(options,
  (oAuthHeaders) => {
    console.log(oAuthHeaders);
  },
  (error) => {
    console.warn("[Digits]", "Login failed", error);
  }
);

Contributors

This plugin is based off the work of another plugin: https://github.com/cosmith/cordova-digits.

cordova-plugin-digits's People

Contributors

eleung avatar

Watchers

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