0.0
No release in over 3 years
Low commit activity in last 3 years
prestashop webservice api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 5.0
~> 10.0
~> 2.1
~> 0.9

Runtime

 Project Readme

PrestaShop

PrestaShop is a ruby gem to interact with a Prestashop API

this gem was originally forked from Prestashopper

Installation

add presta_shop Gemfile

gem 'presta_shop'

Usage

verify PrestaShop api is enabled

PrestaShop.api_enabled? 'my.prestashop.com'
 => true

check api key is valid

PrestaShop.valid_key? 'my.prestashop.com', 'VALID_KEY'
 => true

create a PrestaShop api object

api = PrestaShop::API.new 'my.prestashop.com', 'VALID_KEY'

list resources available for the api key

api.resources
 => [:customers, :orders, :products] 

get a list of ids for an available resource

order_ids = api.orders.list
 => [1, 2, 3, 4, 5, 6]

get a specific resource by id

order = api.order.find(1)
 => #<PrestaShop::Order id=1, ...>

get an array of resources

orders = api.orders.find(1, 2, 3)
 => [#<PrestaShop::Order id=1, ...>, #<PrestaShop::Order id=2, ...>, #<PrestaShop::Order id=3, ...>]