Skip to content

This is a PHP wrapper for the Dandomain API

License

Notifications You must be signed in to change notification settings

99kennetn/dandomain-api

 
 

Repository files navigation

Dandomain API PHP Wrapper

Latest Version on Packagist Software License Build Status Coverage Status Quality Score

This is a PHP wrapper for the Dandomain API. Internally it uses Guzzle to send requests.

Installation

composer require loevgaard/dandomain-api 

Usage

<?php
use Loevgaard\Dandomain\Api\Api;

$api = new Api('https://www.your-shop.dk', 'insert api key');

// Get modified products
$dateStart = \DateTime::createFromFormat('Y-m-d', '2018-01-01');
$dateEnd = new \DateTime();

$modifiedProductCount = $api->productData->countByModifiedInterval($dateStart, $dateEnd);
$pageSize = 100;
$pages = ceil($modifiedProductCount / $pageSize);

for($page = 1; $page <= $pages; $page++) {
    $products = $api->productData->getDataProductsInModifiedInterval($dateStart, $dateEnd, $page, $pageSize);
}

About

This is a PHP wrapper for the Dandomain API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%