GithubHelp home page GithubHelp logo

dirish / phextopia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geiger-it/phextopia

0.0 1.0 0.0 40 KB

A PHP Library for Nextopia

License: GNU General Public License v3.0

Ruby 13.31% PHP 86.69%

phextopia's Introduction

Phextopia

A Nextopia PHP Client Library to consume their json api.

Install

composer require geiger-it/phextopia

Simple Mode:
$client = new \Phextopia\Client( $clientId = '74PuWjnHUbN7pfh9XtPzVVknfmFxPcYk' );
$search = new \Phextopia\Search($client);

$result = $search->find(); // automatically retrieves $_GET['keywords'] = 'shirt'
Hard Mode:
$client = new \Phextopia\Client( $clientId = '74PuWjnHUbN7pfh9XtPzVVknfmFxPcYk', $useGET = false);
$search = new \Phextopia\Search($client);

$result = $search->find('shirt');

// or with all the options:

$result = $search->find('shirt', [
    'xml' => 1,
    'page' => 3,
    // (optional) overrides $_SERVER['REMOTE_ADDR']
    'ip' => $request->getClientIp(), 
    // (optional) user_agent overrides $_SERVER['HTTP_USER_AGENT']
    'user_agent' => $request->getUserAgent(), 
    'res_per_page' => '12',
    'force_or_search' => '1:10',
    'requested_fields' => 'Name,Price,Sku,Image',
    'trim_length' => '80',
    'abstracted_fields' => 'Name,Description',
    'initial_sort' => 'Platform:ASC',
    'initial_sort_order' => 'Linux,Windows,Mac',
    'no_metaphones' => '4:10',
    //...
]);
Page Builder Usage:
    $client = new \Phextopia\Client( $clientId = '74PuWjnHUbN7pfh9XtPzVVknfmFxPcYk' );
    $page = new Phextopia\PageBuilder($client);
    
    $result = $page->load('My Test Page');

phextopia's People

Contributors

esmithgeiger avatar dirish avatar zyglobe avatar

Watchers

 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.