1.1.4 • Published 9 years ago

supportive-js v1.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Supportive.js

A vanilla, dependency-free browser JS library for the Supportive.io API.

Read the full documentation here.

Install

Via bower:

bower install --save supportive-js

Via npm:

npm install --save supportive-js

Via Download:


Quick Start

<script type="application/javascript" src="<path_to_supportive_js>/supportive.js"></script>
var support = new Supportive( 'your_app_id', 'your_api_token' );
var user =  {
                identifier  : 'ashheskes',
                email       : 'ash@supportive.io',
                name        : 'Ash Heskes',
                custom_data :
                    {
                        test : true
                    }
            };

support. init( user, function( error, user, messages ) {

    if ( error ) return alert( ':( Something went wrong!' );

    /* do stuff... */
} );
support. on( 'message', function( message ) {
    
    /* do stuff... */
} );
support. once ( 'init', function (  ) {
    
    support. send( 'Feedback!', 'I love your App.', { page : 'home' }, function( error, message ) {

        if ( error ) return alert( ':( Something went wrong!' );
        
        /* do stuff... */
    } );
} );
1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago