This is my selection test for C3G's project proposal for Ingesting the Canadian Common CV
- Clone or download the git repository, and open the folder.
$ git clone https://github.com/adbrik/gsoc-cvv-test.git
$ cd gsoc-cvv-test
- Create and activate a virtual environment:
$ python3 -m venv venv
$ . venv/bin/activate
- Install the requirements inside the app folder
$ pip install -r requirements.txt
- Once the process finishes execute app.py
$ python app.py
If there is no sqlite database, it will be generated.
The api is available at
127.0.0.1:5000
/ returns a markdown rendering of this README.
/posts There are two options:
- /posts
- returns all posts by the order they went into the database.
- /posts?sortby=<variable>
- if <variable> is view this : returns all posts sorted by ViewCount (DESC)
- if <variable> is score this : returns all posts sorted by Score (ASC)
/postsearch
- /postsearch?search=<variable>
- returns posts that contain in the Title or Body.
- if <variable> is null, then all posts will be returned.