bookshelf-tastypie

0.5.0 • Public • Published

bookshelf-tastypie

Django Tastypie models for Bookshelf

Build Status Coverage Status Code Climate devDependencies Status peerDependencies Status Downloads

Table of contents

Installation

NPM

npm install bookshelf-tastypie --save

Yarn

yarn add bookshelf-tastypie

Usage

Load models to registry

require('bookshelf-tastypie')(bookshelf);

or load model/collection

let ApiKey = require('bookshelf-tastypie')(bookshelf).ApiKey;

Available models / collections

Tastypie.ApiKey

ApiKey model

toString() -> string

String representation of api key

generate_key() -> string

Static function to generate unique keys

ApiKey = bookshelf.model('Tastypie.ApiKey')
new_key = ApiKey.generate_key()

Tastypie.ApiKeys

ApiKey collection

Tastypie.ApiAccess

toString() -> string

String representation od api access

Tastypie.ApiAccesses

TODO

  • tests
  • create ApiKey when Django user is created

Package Sidebar

Install

npm i bookshelf-tastypie

Weekly Downloads

0

Version

0.5.0

License

MIT

Last publish

Collaborators

  • tomi77