From b1b7eeff0ceca97c56de2a68ba51011c53af9a27 Mon Sep 17 00:00:00 2001 From: Tochukwu Solomon Ewiwilem Date: Fri, 19 Jun 2020 14:25:12 +0100 Subject: [PATCH 1/3] dependency update from upstream --- ExcelApi/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExcelApi/settings.py b/ExcelApi/settings.py index cccc498..f90670e 100644 --- a/ExcelApi/settings.py +++ b/ExcelApi/settings.py @@ -21,7 +21,7 @@ # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = os.environ.get('EXCELAPI_KEY') +SECRET_KEY = 'BarneyIsADinosaur' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True From 060e79c6fe4109372cfca99fdd4f4041a7d50e84 Mon Sep 17 00:00:00 2001 From: Tochukwu Solomon Ewiwilem Date: Tue, 23 Jun 2020 14:17:27 +0100 Subject: [PATCH 2/3] update documentation.md --- Documentation.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/Documentation.md b/Documentation.md index 2705454..378e23e 100644 --- a/Documentation.md +++ b/Documentation.md @@ -4,7 +4,7 @@ In a few lines of code, your excel data can be retrieved and manipulated directl DISCLAIMER: This service is still under construction # Overview -The Excel MicroAPI can perform the following +The Excel MicroAPI can perform the following (aat the time of this publication) 1. Parse valid json 2. Print duplicate content present in data 3. Add row to excel data @@ -28,7 +28,39 @@ DELETE : To delete resource * 405 ```Method Not Allowed``` - requested method is not supported for resource. -# Describing Endpoints +# Endpoints +After the following the steps in the README.md file, to clone the Excel MicroAPI on your local machine and run your server: +Test with postman or simply input the endpoints in the address started by the development server + +```diff ++ GET http://127.0.0.1:8000/api/v1/getall/ + +Returns all the files stored, the titles with which they were stored and the location they were stored at. + +```diff +! POST http://127.0.0.1:8000/api/v1/add + +When testing, +json data: +{"title":The title(a name the user can remember) that the user wishes to use to store the file "content":File Upload} + +```diff +! POST http://127.0.0.1:8000/api/v1/parse +When testing, +Key: content, +Value: Excel file upload Returns: Json with Parsed values and process_time to Parse Excel file + +```diff +! POST http://127.0.0.1:8000/api/v1/add_row/ +During test, +KEY 1: "content ", +VALUE1: excel file upload +KEY 2: "data", VALUE2: {"sheet":, "updated": SAMPLE_REQUEST: {"sheet":"sheet1", "updated":["May-01",73,455] + +```diff +! POST http://127.0.0.1:8000/api/v1/search +Inputing a column in which to search and keyword to search for, the response returned is "status: True or False" + ```diff -! **POST** -``` ###### http://127.0.0.1:8000/api/v1/getall/ \ No newline at end of file +! POST http://127.0.0.1:8000/api/v1/printduplicates/ +Duplicate content found in excel file is returned. When testing, KEY: "content" VALUE: duplicate content present in uploaded file \ No newline at end of file From b41a02469d77865fc9a54a17ee578e32dd56fb51 Mon Sep 17 00:00:00 2001 From: Tochukwu Solomon Ewiwilem Date: Tue, 23 Jun 2020 14:19:42 +0100 Subject: [PATCH 3/3] update documentation.md --- Documentation.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Documentation.md b/Documentation.md index 378e23e..2781f87 100644 --- a/Documentation.md +++ b/Documentation.md @@ -4,7 +4,7 @@ In a few lines of code, your excel data can be retrieved and manipulated directl DISCLAIMER: This service is still under construction # Overview -The Excel MicroAPI can perform the following (aat the time of this publication) +The Excel MicroAPI can perform the following (at the time of this publication) 1. Parse valid json 2. Print duplicate content present in data 3. Add row to excel data @@ -12,9 +12,13 @@ The Excel MicroAPI can perform the following (aat the time of this publication) # Authentication ## Allowed HTTPs requests + PUT : To create resource + POST : Update resource + GET : Get a resource or list of resources + DELETE : To delete resource # Error Codes @@ -34,24 +38,26 @@ Test with postman or simply input the endpoints in the address started by the de ```diff + GET http://127.0.0.1:8000/api/v1/getall/ - +``` Returns all the files stored, the titles with which they were stored and the location they were stored at. ```diff ! POST http://127.0.0.1:8000/api/v1/add - +``` When testing, json data: {"title":The title(a name the user can remember) that the user wishes to use to store the file "content":File Upload} ```diff ! POST http://127.0.0.1:8000/api/v1/parse +``` When testing, Key: content, Value: Excel file upload Returns: Json with Parsed values and process_time to Parse Excel file ```diff ! POST http://127.0.0.1:8000/api/v1/add_row/ +``` During test, KEY 1: "content ", VALUE1: excel file upload @@ -59,8 +65,10 @@ KEY 2: "data", VALUE2: {"sheet":, "updated":