$callbackUrl
$callbackUrl : string
API Client for obtaining OAuth token/secret and making API calls to api.shapeways.com
__construct(string $consumerKey, string $consumerSecret, string|null $callbackUrl, string|null $oauthToken, string|null $oauthSecret)
Create a new \Shapeways\Client
string | $consumerKey | your app consumer key |
string | $consumerSecret | your app consumer secret |
string|null | $callbackUrl | your app callback url |
string|null | $oauthToken | a users oauth token if it is already known |
string|null | $oauthSecret | a users oauth secret if it is already known |
addModel(array $params) : array
Upload a model for the user
https://developers.shapeways.com/docs#POST_-models-v1
array | $params | the model data to set |
the json response from the api call
addModelFile(int $modelId, array $params) : array
Add a new file for the model
https://developers.shapeways.com/docs#POST_-models-modelId-files-v1
int | $modelId | the modelId for the model |
array | $params | the file data to upload |
the json response from the api call
addModelPhoto(int $modelId, array $params) : array
Upload a new photo for the model
https://developers.shapeways.com/docs#POST_-models-modelId-photos-v1
int | $modelId | the modelId for the model to associate the photo with |
array | $params | the photo data to upload |
the json response from the api call
addToCart(array $params) : array
Add a model to the users shopping cart
https://developers.shapeways.com/docs#POST_-orders-cart-v1
array | $params | the model data for adding to the cart |
the json response from the api call
deleteModel(int $modelId) : array
Remove the users model with the given $modelId
https://developers.shapeways.com/docs#DELETE_-models-modelId-v1
int | $modelId | the modelId of the model to remove |
the json response from the api call
getPrice(array $params) : array
Calculate the price from the provided parameters
https://developers.shapeways.com/docs#POST_-price-v1
array | $params | the parameters used to calculate the price |
the json response from the api call
getApiInfo() : array
Get the current api info
https://developers.shapeways.com/docs#GET_-api-v1-
the json response from the api call
getCart() : array
Get the users shopping cart
https://developers.shapeways.com/docs#GET_-orders-cart-v1
the json response from the api call
getCategories() : array
Get a list of all categories
https://developers.shapeways.com/docs#GET_-categories-v1
the json response from the api call
getCategory(int $catId) : array
Get information for the provided categoryId
https://developers.shapeways.com/docs#GET_-categories-categoryId-v1
int | $catId | the categoryId to get the information for |
the json response from the api call
getMaterial(int $materialId) : array
Get information for the provided materialId
https://developers.shapeways.com/docs#GET_-materials-materialId-v1
int | $materialId | the materialId to get information for |
the json response from the api call
getMaterials() : array
Get a list of materials
https://developers.shapeways.com/docs#GET_-materials-v1
the json response from the api call
getModel(int $modelId) : array
Get a model
https://developers.shapeways.com/docs#GET_-models-modelId-v1
int | $modelId | the modelId |
the json response from the api call
getModelFile(int $modelId, int $fileVersion, bool $includeFile) : array
Get a model's file
https://developers.shapeways.com/docs#GET_-models-modelId-files-fileVersion-v1
int | $modelId | the modelId which the file belongs to |
int | $fileVersion | the file version |
bool | $includeFile | whether or not to include the raw file in the response (default: False) |
the json response from the api call
getModelInfo(int $modelId) : array
Get information for the provided modelId
https://developers.shapeways.com/docs#GET_-models-modelId-info-v1
int | $modelId | the modelId for the model to retreive |
the json response from the api call
getModels(int $page) : array
Get a list of models
https://developers.shapeways.com/docs#GET_-models-v1
int | $page | the page of models to get (default: 1) |
the json response from the api call
getPrinter(int $printerId) : array
Get the information for the provided printerId
https://developers.shapeways.com/docs#GET_-printers-printerId-v1
int | $printerId | the printerId for the printer you want to get info for |
the json response from the api call
getPrinters() : array
Get the full list of printers available
https://developers.shapeways.com/docs#GET_-printers-v1
the json response from the api call
updateModelInfo(int $modelId, array $params) : array
Update a models information
https://developers.shapeways.com/docs#PUT_-models-modelId-info-v1
int | $modelId | the modelId of the model to update |
array | $params | the values to update |
the json response from the api call