2.1.0 • Published 8 years ago

montagedata v2.1.0

Weekly downloads
107
License
-
Repository
github
Last release
8 years ago

==================

Javascript Montage

A Javascript wrapper for the Montage API

Installation

Install dependencies::

npm install

Run tests::

gulp test

Compile to ES5::

gulp build

Compile for the browser::

webpack

Usage

From a script tag::

Create a client object::

import {Client, Query} from 'montagedata'

//generate a token var client = new Client({ username: "YOUR_USERNAME", password: "YOUR_PASSWORD", api_version: 1, //default domain: "test" //Your Montage subdomain url: "" //full url to montage api, for testing });

client.auth().then(response => { var token = response.token.value; });

//client with only a token (recommended) var client = new Client({ token: "YOUR_TOKEN", domain: "test" //Your Montage subdomain });

File Uploads

Pass a FormData object like so::

client.files(formData).then(function(response){ console.log(response) })

Using a client::

var query = new Query() .where({"rating__gt": 4}) .limit(10) .order("rating", -1); client.documents("movies", query).then(movies => { console.log(movies); });

2.1.0

8 years ago

0.5.2

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago