Skip to content
This repository was archived by the owner on Jan 16, 2020. It is now read-only.

Felix-Raj/library

A Small Library App Backend

A small library app backend. Half Baked.

Installation

  • Clone Me
  • Create a virtual environment if required.
  • Install dependencies from requirements.txt
  • Set environment variable DATABASE_URL to database connector URI.
  • Make migrations, migrate and run

APIs

Book related
  1. List all books

    /book/     
    
  2. Search by author in book list

    /book/?author=author_name
    
  3. Search by title in book list

    /book/?title=title_name
    
  4. Search by book tag

    /book/?booktag__tag=tag
    
  5. Search by book_id

    /book/?book_id=book_id
    
  6. Search by category

    /book/?category=category
    

    Where category can be magazine, book, comics.

  7. Or use a combination of any of 2, 3, 4, 5, 6

  8. See details of a book with pk pk

    /book/pk
    
  9. Create a new Book

    /book/new
    
  10. Add tag to a book with pk pk

    /book/pk/tag/?tags=tag1,tag2, tag 3
    
Library Users Related
  1. List all Library Users

    /lib_user/
    
  2. Search for user in list using pk

    /lib_user/?pk=pk
    
  3. Search for user in list using name

    /lib_user/?name=name
    
  4. Search for user in list using uid

    /lib_user/?uid=uid
    
  5. Combine any of 2,3 and 4

  6. Search for any using

    /lib_user/?search=term
    

    term can be author, title, booktag, book_id, category

  7. Specify ordering by

    /lib_user/?ordering=field_one, field_two
    

    field can be any of author, title, book_id, category

  8. Create a new user

    /lib_user/new
    
  9. Get users with upcoming birthdays

    /lib_user/birthdays/
    
  10. List books lent by a user, using users pk

    /lib_user/pk/lent/pending/
    
  11. See recent birthdays

       /lib_user/birthdays/
    
  12. Activate an user

        /lib_user/pk/activate/
    
  13. Deactivate an user

        /lib_user/pk/deactivate
    
Lent Related
  1. List all lents

    /lib_user/lent/
    
  2. List all lents - search for user with pk pk

    /lib_user/lent/?lib_user=pk
    
  3. List all lents - search for book with pk pk

    /lib_user/lent/?book=pk
    
  4. List all lents - search for user with name containing name

    /lib_user/lent/?lib_user__name=name
    
  5. List all lents - search for book with name containing name

    /lib_user/lent/?book_title=name
    
  6. List all lents - can mix any of the above queries

  7. Create new Lent

    /lib_user/lent/new/
    
  8. Upcoming or Missed Dues

    /lib_user/lent/recent_dues/
    

Notes

Users can add note

  1. List all notes

    /note/
    
  2. Create new note

    /note/new/
    
  3. Delete note

     /note/pk/delete
    

Demo

A Sample of API can be found here.

Releases

No releases published

Packages

 
 
 

Contributors

Languages