Download the PHP package hmalicha/etsy-php without Composer
On this page you can find all versions of the php package hmalicha/etsy-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package etsy-php
Etsy PHP SDK
Based on Etsy Rest API description output, this wrapper provides a simple client with all available methods on Etsy API (thanks to the __call
magic PHP method!), validating its arguments on each request (Take a look to https://github.com/inakiabt/etsy-php/blob/master/src/Etsy/methods.json for full list of methods and its arguments).
I'm looking for help
Lately, I couldn't dedicate the time I think this repo deserved, so I'm looking for help!
Requirements
Note: I will be working on remove this dependencies
- cURL devel:
- Ubuntu:
sudo apt-get install libcurl4-dev
- Fedora/CentOS:
sudo yum install curl-devel
- Ubuntu:
- OAuth pecl package:
sudo pecl install oauth
- And then add the line
extension=oauth.so
to yourphp.ini
Installation
The following recommended installation requires composer. If you are unfamiliar with composer see the composer installation instructions.
Add the following to your composer.json
file:
Usage
All methods has only one argument, an array with two items (both are optional, depends on the method):
-
params: an array with all required params to build the endpoint url.
Example: getSubSubCategory: GET /categories/:tag/:subtag/:subsubtag
- data: an array with post data required by the method
Example: createShippingTemplate: POST /shipping/templates
OAuth configuration script
Etsy API uses OAuth 1.0 authentication, so lets setup our credentials.
The script scripts/auth-setup.php
will generate an OAuth config file required by the Etsy client to make signed requests.
Example:
It will show an URL you must open, sign in on Etsy and allow the application. Then copy paste the verification code on the terminal. (On Mac OSX, it will open your default browser automatically)
Generated OAuth config file
After all, it should looks like this:
Initialization
Examples
Asociations
You would be able to fetch associations of given your resources using a simple interface:
To read more about associations: https://www.etsy.com/developers/documentation/getting_started/resources#section_associations
JSON params
There are some methods that Etsy requires to be a JSON string encoded param (ie: param "variations" for "createListingVariations"). For these cases, those params should be defined like this:
Testing
Changelog
- 1.0
- Init commit, working module.
Author
Iñaki Abete web: http://github.com/inakiabt email: [email protected] twitter: @inakiabt
Contribute
Found a bug? Want to contribute and add a new feature?
Please fork this project and send me a pull request!
License
mobiledevice is licensed under the MIT license:
www.opensource.org/licenses/MIT