Idea Melt

Focus Mode

Library

Overview

Basics

We've built a small, lightweight client-side JavaScript library that's designed to facilitate requests between the browser and IdeaMelt's API. It abstracts away all the complexities of making API requests and provides a simple plug-and-play interface to work directly with the API from within the browser. It doesn't take away any functionality whilst making things super simple and really fast.

The library also adds event hook functionality. This makes it extremely easy for you to hook up IdeaMelt stories and notifications with other apps you have running on your site such as Realtidbits Comments, Disqus, and Livefyre Comments 3 - check it out.

Get the Library

Include this library on the page, it's only 8KB minified and ready for production.

<script src="http://www.ideamelt.com/static/apps/3.0/im.library.js"></script>

We don't recommend downloading the library and hosting it yourself because then you won't have immediate access to all the awesome improvements we make. Our worldwide CDN ensures super-fast delivery to your site with no hiccups.

NOTE: jQuery is a dependecy and must be loaded before the library. Grab a copy if you haven't already!

Initialize

Before you start making any requests, you'll need to initialize the library. Don't worry, it's super simple, just paste this code (fill in your own api_key!):

IdeaMelt.init({api_key: IDEAMELT_KEY})

The library also natively supports HTTPS secure requests. To enable this, simply initialize with the following code:

IdeaMelt.init({
    api_key: IDEAMELT_KEY,
    secure: true
})