Skip to content

zephia/olx

Repository files navigation

OLX Feed Generator

Documentation

Official OLX documentation about the OLX feed, can be found here

Installation

Using composer

$ composer require zephia/olx

Usage

<?php

// Instantiate serializer with configurations.
$serializer = \JMS\Serializer\SerializerBuilder::create()
   ->addMetadataDir(__DIR__ . '/resources/config/serializer')
   ->build();

// Generate document feed
$document = new Zephia\OLXFeed\Document($serializer);

// Generate Ad list
$adBag = new \Zephia\OLXFeed\Entity\AdBag;

$document->generate($adBag);

// <?xml version="1.0" encoding="UTF-8"?>
// <ads/>