From a84ddcaeed560e6cc4a07aedd02dad5de38fc760 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 15 Feb 2021 12:09:01 +0000 Subject: [PATCH] readme update --- README.md | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9ff4e0e..17f9de5 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,14 @@ This README aims to document functionality of backend as well as required steps - [Load location data](#load-location-data) - [Load taxonomy data](#load-taxonomy-data) - [Endpoints](#endpoints) +- [Product Search](#product-search) - [Massive Data Load Endpoints](#massive-data-load-endpoints) + - [COOP and Managing User Data Load](#coop-and-managing-user-data-load) + - [Product Data Load](#product-data-load) - [GeoIP Setup](#geoip-setup) - [Development Utils](#development-utils) + - [Fake product data generation](#fake-product-data-generation) + ## First Steps @@ -154,7 +159,7 @@ Endpoint url: `/api/v1/stats/` logs about user interaction with products links -## Geo location +### Locations Location ednpoints: @@ -164,8 +169,30 @@ Location ednpoints: - `/api/v1/cities/` -## Massive Data Data Endpoints +## Product Search +Endpoint: `/api/v1/product_search/` + +Query parameters: + + - `query_string`: text from the search input box + + +Response format: + +```json +{ + "filters": { + "singles": ["tag1", "tag2"], // for tags that aren't nested + "entry_1": ["subtag 1", "subtag 2"], // for tree tags + "entry_2": ["subtag 1", "subtag 2"] // one per penultimate tag in tree + }, + "products" : [], // list of serialized instances, in order of relevancy +} + +``` + +## Massive Data Load Endpoints ### COOP and Managing User Data Load @@ -186,7 +213,6 @@ CSV headers: `id,nombre-producto,descripcion,imagen,url,precio,gastos-envio,cond Only admin users have access to endoint - ## GeoIP Setup Module: `geoip2` @@ -204,7 +230,7 @@ Optional: ## Development Utils -### Fake product load +### Fake product data generation To create a dataset of fake companies and products: