Find file History
Permalink
..
Failed to load latest commit information.
ApiList-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
Authorize-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
CartAddModel-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
CartList-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
MaterialInfo-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
MaterialList-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
ModelDownload-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
ModelGet-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
ModelUpdate-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
ModelUpload-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
OrderGet-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
OrderPost-oauth1-pecl.php phone number must be 10 digits, update sample while we are at it Aug 11, 2016
OrderReprint-oauth1-pecl.php adding Content-Type header for our remaining php POST samples Sep 1, 2016
PriceModel-oauth1-pecl.php adding Content-Type header for our remaining php POST samples Sep 1, 2016
PrinterGet-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
PrinterList-oauth1-pecl.php fix error messages to display actual errors from the server instead o… Aug 10, 2016
README.md Added new script in PHP readme Jul 14, 2016
ShapeJSCustomization-oauth1-pecl.php e -> E to follow conventions Aug 11, 2016
access_token.php - initial import of php-pecl clients - add shapeways-node 116455c33f2… Dec 5, 2012
api_url_base.php - initial import of php-pecl clients - add shapeways-node 116455c33f2… Dec 5, 2012
consumer_key.php - initial import of php-pecl clients - add shapeways-node 116455c33f2… Dec 5, 2012
error.php fix error messages to display actual errors from the server instead o… Aug 10, 2016

README.md

Shapeways REST API sample PHP/PECL applications

Sample applications for the Shapeways REST API in PHP/PECL

Installation

  1. install php
  2. install php-pear
  3. pecl install oauth

Configuration

  1. Get an oauth1 Consumer Key at http://www.shapeways.com/myapps and store the Consumer Key in consumer_key.php
  2. Run Authorize-oauth1-pecl.php to :
    • get temporary credentials (aka a Request Token)
    • authorize the Consumer Key with the Request Token via the presented URL to get the Verifier code
    • enter the Verifier code to request an Access Token
    • store the Access Token in access_token.php.

Sample scripts

  • ApiList-oauth1-pecl.php Shows your rate limiting data in JSON format.
  • CartAddModel-oauth1-pecl.php Add a model to your shopping cart.
  • CartList-oauth1-pecl.php Show your cart contents.
  • MaterialList-oauth1-pecl.php Show the list of all material properties.
  • MaterialInfo-oauth1-pecl.php Show material properties.
  • ModelDownload-oauth1-pecl.php Download a model.
  • ModelGet-oauth1-pecl.php Show model properties.
  • ModelUpdate-oauth1-pecl.php Update model properties.
  • ModelUpload-oauth1-pecl.php Upload a model.
  • PrinterList-oauth1-pecl.php Show a list of all properties of all printers.
  • PrinterGet-oauth1-pecl.php Show all properties of a printer.

TODO