Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 808 Bytes

Label.md

File metadata and controls

39 lines (30 loc) · 808 Bytes

Label client

Client initialization

To see example of initialization, please look at Implementation part of our README

Get list of all labels

Method returns LabelIterator containing Label entity.

use MpApiClient\Common\Interfaces\LabelClientInterface;

/** @var LabelClientInterface $labelClient */
$labels = $labelClient->list();
echo json_encode($labels, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);

Example above prints out

[
  {
    "id": "TIP2",
    "title": "Náš tip"
  },
  {
    "id": "SALE",
    "title": "Výprodej"
  },
  {
    "id": "FDEL",
    "title": "Doprava zdarma"
  },
  ...
]

See more examples here