Skip to content

A JavaScript library for interacting with the ohmage server API.

Notifications You must be signed in to change notification settings

ohmage/ohmage.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ohmage 2.x js library

Description

A JavaScript library for interacting with the 2.x version of the ohmage server API.

Usage

Include the ohmage.js or ohmage.min.js file with your project (along with the direct dependencies jQuery and jquery.cookie). Take a look at the sample app in the examples/ directory for some inspiration!

Documentation

In general, the code is documented inline. If you'd like to see details on how to interact with the ohmage 2.x api see details here.

Development

If you'd like to add API calls or change code it'd be great if you could add a git pre-commit hook to minify the code. Make sure uglifyjs is installed (npm install -g uglifyjs) and add this file:

localhost:ohmage.js$ cat .git/hooks/pre-commit
#!/bin/bash

# minify/compress ohmage.js
uglifyjs ohmage.js -m -c -o ohmage.min.js

# add to commit
git add ohmage.min.js

# thanks and exit
echo 'ohmage.js minified successfully'
exit

and then chmod +x .git/hooks/pre-commit.