Giter Site home page Giter Site logo

skroutz's Introduction

Skroutz

Travis Latest Stable Version Minimum PHP Version

PHP7 Client for skroutz API

Installation

composer require ilazaridis/skroutz

Usage Examples

Once you have an Identifier and a Secret you are ready to generate an access token:

<?php

require_once 'vendor/autoload.php';
use ilazaridis\skroutz\Client as Client;

$client = new Client('identifier', 'secret');

and consume it:

print_r($client->category('40')->fetch());  // get category with id=40

fetch(bool $decode = true, string $apiVersion = '3.1') will return an associative array using latest version of api by default. You can pass a boolean and a string if you want to change these values.

  • List the children categories of a category
$client->category('40')->children()->fetch()
  • Retrieve a single shop location
$client->shop('452')->location('2500')->fetch()
  • Retrieve manufacturer's categories order by name
$client->category('25')->manufacturers()->params(['order_by' => 'name', 'order_dir' => 'asc'])->fetch()

The query string is passd as associative array using the params() method. In case we have multiple values of the same parameter (i.e. filter_ids[]), we are passing them as comma seperated values:

  • Filter SKUs of specific category using multiple filter ids
$client->category('40')->skus()->params(['filter_ids[]' => '355559,6282'])->fetch()

Note

Some of the API methods have not been implemented due to access restriction. Currently, the acquired permission level is public and everything on that level was implemented.

skroutz's People

Contributors

ilazaridis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.