risototh / e-pass-api
此包最新版本(v1.0)没有提供许可证信息。
使用Farnell Element 14 ePassAPI访问Farnell Element 14产品信息
v1.0
2019-02-28 12:29 UTC
This package is auto-updated.
Last update: 2024-09-29 05:49:39 UTC
README
示例
根据关键词搜索返回产品信息
<?php use Kapustko\Element14\EPassRest\Api; use Kapustko\Element14\EPassRest\Exception\RestApiException; $parameters = [ 'callInfo.apiKey' => '', 'term' => 'any:fuse', 'storeInfo.id' => 'uk.farnell.com', 'resultsSettings.offset' => 0, 'resultsSettings.numberOfResults' => 1, 'callInfo.responseDataFormat' => 'json' ]; try { echo Api::searchByKeyword($parameters); } catch (RestApiException $e) { echo $e->getMessage(); }
根据element14 / Newark element14 / Farnell element14订单代码搜索返回产品信息
<?php use Kapustko\Element14\EPassRest\Api; use Kapustko\Element14\EPassRest\Exception\RestApiException; $parameters = [ 'callInfo.apiKey' => '', 'term' => 'id:1278613', 'storeInfo.id' => 'uk.farnell.com', 'resultsSettings.offset' => 0, 'resultsSettings.numberOfResults' => 1, 'callInfo.responseDataFormat' => 'json' ]; try { echo Api::searchByKeyword($parameters); } catch (RestApiException $e) { echo $e->getMessage(); }
根据制造商零件编号搜索返回产品信息
<?php use Kapustko\Element14\EPassRest\Api; use Kapustko\Element14\EPassRest\Exception\RestApiException; $parameters = [ 'callInfo.apiKey' => '', 'term' => 'manuPartNum:LM339ADT', 'storeInfo.id' => 'uk.farnell.com', 'resultsSettings.offset' => 0, 'resultsSettings.numberOfResults' => 1, 'callInfo.responseDataFormat' => 'json' ]; try { echo Api::searchByKeyword($parameters); } catch (RestApiException $e) { echo $e->getMessage(); }