GithubHelp home page GithubHelp logo

basilnajjar / bassa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scorelab/bassa

0.0 2.0 0.0 1.37 MB

Automated Download Queue for Enterprise to take the best use of Internet bandwidth

License: GNU General Public License v3.0

Python 35.33% Shell 0.52% JavaScript 45.83% HTML 12.89% CSS 5.43%

bassa's Introduction

PyPi version badge

logo

Automated Download Queue for Enterprise to take the best use of Internet bandwidth

Installation

  $ ./setup.py
  $ cd components/core/
  $ sudo python setup.py develop

Test Server

  $ cd components/core/
  $ python Main.py

Main functionalities

  • Provides an interface for users to add their downloads as links or torrent magnet links
  • Provide users an interface to view and download the files in local server
  • Provide a rating system to users to rate the files residing in local server
  • Automatically start and stop downloading in given time frame
  • Automatically clean the disks and make room for new downloads
  • Notify user when his/her download is completed
  • Mark inappropriate downloads
  • Provides admins an interface to deal with inappropriate files

URL endpoints

http://localhost:5000/api/login

Form data: user_name, password Returns auth token in response header for successful login

http://localhost:5000/api/user

POST

Headers: Content-type : Application/JSON, token: JSON: {"user_name":"<username>", "password":"<password>", "auth":<authleval>, "email":"<email>"}

Auth levals

  • 0:ADMIN
  • 1:STUDENT
  • 2:ACADEMIC
  • 3:NONACADEMIC
GET

Headers: token: Returns JSON of all the users

DELETE

http://localhost:5000/api/user/<username> Deletes the user from system. Adviced not to use.

PUT

http://localhost:5000/api/user/<username> Headers: Content-type : Application/JSON, token: JSON: {"user_name":"<username>", "password":"<password>", "auth":<authleval>, "email":"<email>"} Update the given user

http://localhost:5000/api/regularuser

POST

Headers: Content-type : Application/JSON JSON: {"user_name":"<username>", "password":"<password>", "email":"<email>"}

http://localhost:5000/api/user/blocked

GET

Headers: token: Returns JSON of all the blocked users

POST

http://localhost:5000/api/user/blocked/<username> Headers: token: Block the given user

http://localhost:5000/api/download

POST

Headers: Content-type : Application/JSON, token: JSON: {"link":"<download link>"}

GET

http://localhost:5000/api/download/<page> Headers: token: Returns JSON of all the completed downloads. Page contains 15 records ordered by added time. Page number is a int.

Status

  • 0:DEFAULT- not started
  • 1:STARTED - started ot finished yet
  • 2:DELETED - download completed but deleted from disk
  • 3:COMPLETED - download completed
  • 4:ERROR - download error
DELETE

http://localhost:5000/api/download/<id> Deletes the download only if it is not starteed

http://localhost:5000/api/download/rate/

POST

Headers: Content-type : Application/JSON, token: JSON: {"rate":"<rating between 0-5>"} Adds the rating to download. If exists, update.

http://localhost:5000/api/user/downloads/\<page>

GET

Headers: token: Returns JSON of all the downloads of current user. Page contains 15 records ordered by added time. Page number is a int.

http://localhost:5000/api/download/\<id>

GET

Headers: token: Returns file as multipart form data. Does not return a new auth token header

http://localhost:5000/api/user/requests

GET

Headers: token: Returns a JSON of all the users who has signed up and not been approved yet

http://localhost:5000/api/user/approve/\<username>

POST

Headers: Content-type : Application/JSON, token: Approve the user with given username

Bassa UI

Install dependencies with

  $ cd ui/
  $ npm install

To start

run gulp serve

bassa's People

Contributors

agentmilindu avatar basilnajjar avatar malithsen avatar orkosinha avatar paarandika avatar rehrumesh avatar scorpionhiccup avatar tharindupr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.