readme update

This commit is contained in:
Sam
2021-02-15 12:09:01 +00:00
parent 10ac56c5e9
commit a84ddcaeed

View File

@@ -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: