Giter Club home page Giter Club logo

pls's Introduction

IYBA Private Listing API - PHP Library

PLS API - IYBA Private Listing System API

Installation

Via Composer: Here's what you add to your composer.json file to have src/API.php automatically imported into your vendors folder:

{
    "require": {
        "iyba/pls": "dev-master"
    }
}

Of course, you'll then need to run composer update.

How to use

Instantiate API class

use IYBA\PLS\API;
    
$settings = [
    'key' => 'YOUR API KEY' (String, Required), // Example: 'dcabf94ad97d6f09914c8be1a302891520a5964d'
    'id' => USER ID (Number, Required), // Example: 56
    'endpoint' => 'https://api.iyba.pro' (Optional)
];
    
$api = new API($settings);

Example

use IYBA\PLS\API;
    
$settings = [
    'key' => 'dcabf94ad97d6f09914c8be1a302891520a5964d',
    'id' => 56,
    'endpoint' => 'https://api.iyba.pro'
];
    
$api = new API($settings);

Filter vessels

Method: vessel($filters_array)

$api->vessel([
    'page' => 1,
    'currency' => 'usd',
    'price' => '0,1000000'
]);

Optionally get_filters() method returns complete query string, hence we can rewrite the above call as

$api->vessel($api->get_filters());

Fetch vessel using it's ID and language filter

Method: vessel(id, $api->get_filters())

$api->vessel(82, 'lang=fr');

Filter charter vessels

Method: charter('filter string')

$api->charter('page=1&currency=usd&price=0,1000000');
$api->charter($api->get_filters()); // As explained above

Fetch charter details using vessel ID and language filter

Method: charter(id, $this->get_filters())

$api->charter(82, 'lang=fr');

Fetch brokerage details (Yours)

Method: brokerage()

$api->brokerage();

Fetch brokerage by it's ID

Method: brokerage(id)

$api->brokerage(5);

Vessel and Charter filters

Method: filters($resource, $filters)

$api->filters('vessel', 'lang=fr&status=On');

pls's People

Contributors

nbhargav3 avatar

Watchers

 avatar

Forkers

btechgautam

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.