GithubHelp home page GithubHelp logo

concuria / autoscout24 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from indielab/autoscout24

0.0 0.0 0.0 26 KB

PHP library to work with the AutoScout24 REST API.

Home Page: https://autoscout24.ch

PHP 100.00%

autoscout24's Introduction

AutoScout24 PHP REST API CLIENT

Latest Stable Version Total Downloads License

A very easy to use library to work with the AutoScout24 REST Api.

Examples

Before using the library you have to obtain your cuid and memberid from the AutoScout24 Support.

Getting Data

// setup client object
$client = new Client($cuid, $memberId);

// generate query object
$query = new VehicleQuery();
$query->setClient($client);
foreach ($cars->find() as $car) {
    $car->getTypeNameFull();
}

The above code is equal with the following short notation:

$client = new Client($cuid, $memberId);
$cars = (new VehicleQuery())->setClient($client)->find();
foreach ($cars as $car) {
    $car->getId();
}

In order to generate a response without pagination use:

$client = new Client($cuid, $memberId);
$cars = (new VehicleQuery())->setClient($client)->findAll();

Find a car by its id:

$client = new Client($cuid, $memberId);
$car = (new VehicleQuery())->setClient($client)->findOne($carId);

Filter and Sorting:

$client = new Client($cuid, $memberId);
$cars = (new VehicleQuery())->setClient($client)->setVehicleSorting('price_desc')->find();

See the VehiceQuery class for all filter and sorting methods like:

  • setVehicleSorting()
  • setVehicleTypeId()
  • setYearTo()
  • setEquipment()
  • setPage()
  • setItemsPerPage()
  • setMake()
  • setModel()

Meta Data

$client = new Clien($cuid, $memberId);
$data = (new MetaQuery())->setClient($client)->findPkw();

foreach ($data as $meta) {
    var_dump($meta->getParameterName(), $meta->getDescription());
}

filter by a type

$meta = (new MetaQuery())->setClient($this->client)->findPkw()->filter('sort');

autoscout24's People

Contributors

nadar avatar rainerch 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.