Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A badge issuing test
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
static
test
.gitignore
.gitmodules
Procfile
README.md
app.js
config.js
package.json

README.md

digs /dɪgs/
n. Living quarters.
v.intr. Something a badger does.

What

Digs is an experiment in badge issuing to the OBI standard. It's intended as a testing/experimentation prototype, not as an actual badging solution.

Digs is really two pieces at the moment: a temporary JSON blob storage facility (Digs) and the BadgeBadger app.

Digs

Digs is a RESTful API with an optional library on top that provides basic CRUD-type operations for storing arbitrary bits of JSON.

Installation

$ git clone git://github.com/stenington/digs.git
$ cd digs
$ npm install
$ node app.js

Digs will now be running on localhost:8010.

API

GET PUT POST DELETE
/dwellers List all Replace all Create new, return id Delete all
/dwellers/:id Get json Create/replace X Delete

digs.js

Include it with:
<script src="http://_yourhost_/digs.js"></script>

digs.list().success(function(map){});                  => GET    /dwellers
digs.save({}).success(function(id){});                 => POST   /dwellers
digs.save({}, 'someId').success(function(){});         => PUT    /dwellers/someId
digs.retrieve('someId').success(function(json){});     => GET    /dwellers/someId
digs.erase('someId').success(function(){});            => DELETE /dwellers/someId

All the digs.js functions are thin wrappers around jQuery.ajax(), so you can use the .success(), .error(), and .complete() methods on the return.

Static serving

Digs will also serve anything you drop in the digs/static/ directory. That's where BadgeBager lives.

BadgeBadger

BadgeBadger makes use of Digs to host assertions for a badge issuing test and exploration platform. Visit http://localhost:8010/badgebadger/ to get started, the app includes a ton of explanatory information itself.

Something went wrong with that request. Please try again.