README.md in prestashopper-0.1.0 vs README.md in prestashopper-0.2.0

- old
+ new

@@ -1,5 +1,9 @@ +[![Gem Version](https://badge.fury.io/rb/prestashopper.svg)](https://badge.fury.io/rb/prestashopper) +[![Build Status](https://semaphoreci.com/api/v1/amatriain/prestashopper/branches/master/badge.svg)](https://semaphoreci.com/amatriain/prestashopper) +[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/amatriain/prestashopper/master) + # Prestashopper Prestashopper is a ruby gem to interact with a Prestashop API. It has been tested with Prestashop v1.6.1.2 Prestashop is an open source e-commerce application written in PHP: [visit the homepage](https://www.prestashop.com/). @@ -38,9 +42,29 @@ ### Checking if an API key is valid ``` Prestashopper.valid_key? 'my.prestashop.com', 'VALID_KEY' => true +``` + +### Getting an API instance +``` +api = Prestashopper::API.new 'my.prestashop.com', 'VALID_KEY' +``` + +### Listing resources that can be accessed from an API instance +``` +api.resources + => [:customers, :orders, :products] +``` + +### Gettting products +``` +products = api.get_products +products[0].description +=> "product 1" +products[0].price +=> "24.71" ``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. The documentation can be generated from the yard comments running `yard doc`.