GitXplorerGitXplorer
c

pieshop

public
24 stars
5 forks
0 issues

Commits

List of commits on branch master.
Unverified
9af3a2c1b923fa6a907428d15af7e12710e1e19a

Not really applicable anymore. :-)

ccodysoyland committed 15 years ago
Unverified
ae3c0d6fd19500fdf59b9cc619ae308b1f0c7cd7

Update readme.

ccodysoyland committed 15 years ago
Unverified
a21f6020c9f62813f36a553e7c570e53816509e3

Add offset support.

ccodysoyland committed 15 years ago
Unverified
32404d6f846e481842f576bfef554c82e4846c05

Add test for resource methods.

ccodysoyland committed 15 years ago
Unverified
46b65be83ea1ebae6d266dfe35e994d62cd878c8

Add support for filtering.

ccodysoyland committed 15 years ago
Unverified
1a416fe3add522486ed814564b04cf20d8b4b814

Fix query copying function.

ccodysoyland committed 15 years ago

README

The README file for this repository.

pieshop

pieshop is a Javascript client for RESTful APIs. It is being developed as a client for django-tastypie.

Python dependencies (for running tests)

  • django
  • django-tastypie
  • mimeparse
  • django-qunit

features

  • callback-driven chainable query interface inspired by Django's ORM
  • resource objects (aka "models")
  • filtering
  • limit/offset

goals

The primary goal is to develop a complete Javascript abstraction of the django-tastypie RESTful API. Other goals include:

  • pluggable backends (more than just django-tastypie)
  • support for HTTP methods GET, POST, PUT, and DELETE.
  • validation/error handling
  • more delicious pie-themed goodness

Example usage

Person = pieshop.resource({
    'resource_uri': 'http://mysite.com/api/person/',
    'get_full_name': function(person) {
        return person.first_name + person.last_name;
    }
});

pieshop.query(Person).limit(10).offset(10).filter({'sex': 'female'}).each(function(person) {
    console.log(person);
    console.log(person.get_full_name());
});

license

Copyright (c) 2010 Cody Soyland

Released under new-style BSD license