bartmachielsen/SupermarktConnector

Onduidelijkheid prijs opvragen

Closed this issue · 2 comments

Hallo,

Haalt deze script ook prijzen binnen krijg hem namelijk niet aan de praat als ik hem run krijg ik niks terug?

Hallo, ik heb geprobeerd om de connector open te laten voor andere ontwikkelaars.

Ik zal zometeen een voorbeeld toevoegen waarin ik producten ophaal.

De structuur van een product resultaat is:

{
      "quantity": 0,
      "fromPrice": 0.99,
      "hqIdSource": "AH_HQ",
      "frozen": false,
      "isPBO": false,
      "mainCategory": {
        "sortingSequence": 1,
        "title": "Aardappel, groente, fruit",
        "value": "6401",
        "links": [
          {
            "href": "https://ms.ah.nl/rest/ah/taxonomy/categories/6401",
            "rel": "self"
          },
          {
            "href": "https://ms.ah.nl/rest/ah/taxonomy/categories/6401/products",
            "rel": "products"
          }
        ],
        "images": [
          {
            "url": "https://static.ahold.com/cmgtcontent/media//001002000/000/001002086_002_Shelf-_0000_Aardappelen-groente-fruit.png",
            "height": 198,
            "width": 198
          }
        ]
      },
      "iconsResource": {
        "icons": [
          "goedkoopje"
        ]
      },
      "availableForOrdering": true,
      "links": [
        {
          "href": "https://ms.ah.nl/rest/ah/product/wi54074?futureBonus=false",
          "rel": "self"
        }
      ],
      "stickerResource": {
        
      },
      "description": "AH Komkommer",
      "basePrice": {
        "price": 0.99,
        "unitPriceDescription": ""
      },
      "extendedAttributes": [
        {
          "key": "np_goedkoopje",
          "values": [
            "Goedkoopje"
          ]
        },
        {
          "key": "da_lactosevrij",
          "values": [
            "Lactosevrij"
          ]
        },
        {
          "key": "da_gkk",
          "values": [
            "Gezondere keuze"
          ]
        },
        {
          "key": "da_vegetarisch",
          "values": [
            "Vegetarisch"
          ]
        },
        {
          "key": "np_vorm",
          "values": [
            "heel"
          ]
        },
        {
          "key": "da_glutenvrij",
          "values": [
            "Glutenvrij"
          ]
        }
      ],
      "images": [
        {
          "url": "https://static.ah.nl/static/product/AHI_434d50313535333334_2_LowRes_JPG.JPG",
          "height": 708,
          "width": 708
        },
        {
          "url": "https://static.ah.nl/static/product/AHI_434d50313535333334_2_80x80_JPG.JPG",
          "height": 80,
          "width": 80
        },
        {
          "url": "https://static.ah.nl/static/product/AHI_434d50313535333334_2_48x48_GIF.GIF",
          "height": 48,
          "width": 48
        },
        {
          "url": "https://static.ah.nl/static/product/AHI_434d50313535333334_2_200x200_JPG.JPG",
          "height": 200,
          "width": 200
        }
      ],
      "score": 0,
      "allerhandebox": false,
      "outOfStock": false,
      "productBlocked": false,
      "itemId": "wi54074",
      "brandName": "AH",
      "salesUnitSize": "per stuk",
      "hqId": 508672,
      "category": {
        "sortingSequence": 1,
        "title": "Komkommer (vers)",
        "value": "1259",
        "links": [
          {
            "href": "https://ms.ah.nl/rest/ah/taxonomy/categories/1259",
            "rel": "self"
          },
          {
            "href": "https://ms.ah.nl/rest/ah/taxonomy/categories/1259/products",
            "rel": "products"
          }
        ]
      }
    }

See this commit for the created examples. example.py. Make sure that you are using python 3+ and have the requests library installed (python -m pip install requests)