Skip to content

eisvillageserver/api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api

NOTE: This repository is no longer updated, all relevant code is moved to INTEGRATION

The api repository is a REST client used by our webapp to access the information in the database.

NOTE: In the future, the integration file will deal with the api and generating the database files.

Setup

  1. Clone eisvillageserver/database and run the copyContentData and syncBoxes function to obtain an up to date copy of eisvsfiles.db
  2. Copy the generated eisvsfiles.db into the root of this repository
  3. Run pip install flask
  4. Run pip install flask_restful
  5. Run pip install sqlalchemy
  6. Run pip install flask-cors
  7. Run python api.py

API

Using your favourite rest client.:

GET /categories

Returns a list of categories of files

GET /categories/documents

Returns a list of files with the category Documents

GET /categories/images

Returns a list of files with the category Images

GET /categories/music

Returns a list of files with the category Music

GET /categories/apps

TODO: Returns a list of files with the category Applications

GET /categories/videos

Returns a list of files with category Videos

POST /:id

TODO: Increase the download count of the file with UID id

webapp

The webapp repository contains the UI code involved with the village facing web application. This web application allows you to download files hosted by the village server.

Setup

  1. Install Ruby (https://www.ruby-lang.org/en/)
  2. Compile the sass into css by running compass watch in the terminal at the root of this repository
  3. Run sync.py from the database repository. Copy the downloaded files from the (in the boxid folder) from the database repository into the root of this repository
  4. Copy eisvsfiles.db into the api repository generated by sync.py
  5. Run python api.py in the api repository to start the api server
  6. In a new command line window run python server.py
  7. Navigate to localhost:1234 to view the webapp!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors