hitmeister / api-sdk-php

Kaufland.de Onlineshop (former real.de and Hitmeister) API SDK for PHP
https://www.real.de/api/v1/
MIT License
24 stars 29 forks source link

I use the sdk get warehouse data is null #115

Open fengmiq opened 3 years ago

fengmiq commented 3 years ago

$client = ClientBuilder::create()->setClientKey($client_key)->setClientSecret($client_seccret)->build(); $result = $client->warehouses()->find();

return data is null

warehouse_data

can you help me?

konradhausmann commented 3 years ago

Hello fengmiq, thanks for reaching out with this issue. I'll have a look into it!

konradhausmann commented 3 years ago

Hello fengmiq, find() is returning a cursor which is implementing the iterator. This cursor has not fetched any data from the backend, yet. The cursor will only fetch the data via lazy loading when its iterated. You could use the function iterator_to_array for example.