Commit 738e56ef authored by Pyone Thant Win's avatar Pyone Thant Win
Browse files

api testing

parent c895bad3
CREATE DATABASE calorie_estimation;
\ No newline at end of file
CREATE TABLE credentials(
user_id serial PRIMARY KEY,
password VARCHAR(50) NOT NULL,
email VARCHAR(100) NOT NULL,
first_name CHAR(50) NOT NULL,
last_name CHAR(50) NOT NULL);
\ No newline at end of file
import pip._vendor.requests as requests
resp = requests.get("")
if resp.status_code != 200:
raise APIError('GET /tasks/ {}'.format(resp.status_code))
for to in resp.json():
CREATE TABLE meal_log(
meal_id serial,
user_id integer NOT NULL,
food CHAR(50) NOT NULL,
calorie int NOT NULL,
time_eaten TIME,
date_eat DATE
\ No newline at end of file
CREATE TABLE overview(
user_id int NOT NULL,
date_eaten DATE,
daily_calories int
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment