Categorygithub.com/fmartingr/bazaar
repository
0.3.2
Repository: https://github.com/fmartingr/bazaar.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

bazaar

A service/library to extract product information from URLs.

Configuration

Variable nameDefaultDescription
HTTP_ENABLEDtrueEnable/Disable the HTTP server
HTTP_PORT8080Port to serve the HTTP in

Servers

HTTP

  • POST /item

    Parameters:

    • url: The URL to extract information from

    Responses:

    • 200: Information extracted
    • 400: Shop not supported, missing parameters
    • 500: Internal error, check logs
  • GET /liveness

    Responses:

    • 200: Server running

Data model

Currently, this information is extracted from the site (if possbile):

{
    "description": "...",
    "image_url": "https://...",
    "in_stock": false,
    "name": "...",
    "price": 0.0,
    "price_text": "0,0 €",
    "release_date": "2019-03-08T00:00:00Z",
    "url": "https://..."
}

pkg/models/product.go

Supported sites

Support is handled in a best effort basis. Some sites do not provided all exposed fields.