saleslayer/saleslayer-php-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

saleslayer/saleslayer-php-sdk

最新稳定版本:v1.0.3

Composer 安装命令:

composer require saleslayer/saleslayer-php-sdk

包简介

SalesLayer PHP SDK

README 文档

README

Sales Layer for Developers

Sales Layer's PHP SDK

This is the official PHP SDK for Sales Layer's PIM Platform.

Description

This SDK contains all the logic and connection methods to Sales Layer’s customizable API. And you can find more detailed documentation at our website.

Requirements

PHP 5.6 and later

Started

With Github

Access github and download the package.

With Composer

Using Composer is the recommended way to install the Sales Layer SDK for PHP. The SDK is available via Packagist under the saleslayer/saleslayer-php-sdk package. If Composer is installed globally on your system, you can run the following in the base directory of your project to add the SDK as a dependency:

composer require saleslayer/saleslayer-php-sdk

Examples

<?php

if (!class_exists('SalesLayer_Conn')) require_once 'SalesLayer-Conn.php';

$connector_id = 'CN000H0000C000';
$secret_key   = 'f035324ba8f98a6f33c05ee1ce36ef29';

// Instantiate the class
$SLconn = new SalesLayer_Conn($connector_id, $secret_key);

$SLconn->set_API_version('1.17');

$SLconn->get_info();

if ($SLconn->has_response_error()) {

	echo "<h4>Error:</h4>\n\n Code: ".$SLconn->get_response_error(). "<br>\nMessage: " . $SLconn->get_response_error_message();

} else {

	echo "<h4>Response OK</h4>\n".
		 "<p>".
		 "API version: <b>". $SLconn->get_response_api_version() ."</b><br />\n".
		 "Action: <b>". $SLconn->get_response_action() ."</b><br />\n".
		 "Time: <b>". $SLconn->get_response_time() ."</b> (GMT 0)<br />\n".
		 "Default language: <b>". $SLconn->get_response_default_language() ."</b><br /><br />\n".
		 "Information:<br />". print_r($SLconn->get_response_table_information(), 1) ."<br /><br />\n".
		 "Modified ID's:<br />" .print_r($SLconn->get_response_table_modified_ids(), 1) ."<br /><br />\n".
		 "Deleted ID's:<br />". print_r($SLconn->get_response_table_deleted_ids(), 1)  ."<br /><br />\n".
		 "Data:<br />". print_r($SLconn->get_response_table_data(), 1) ."<br /><br />\n".
		 "List files:<br />". print_r($SLconn->get_response_list_modified_files(), 1)."<br /><br />\n".
		 "</p>\n";
		 
	}
	
?>

Documentation & Important notes

⚠️ A Sales Layer account might be needed to access the documentation

PHP SDK Examples https://support.saleslayer.com/api-sdk-examples/example-1-simple-export
API Documentation https://support.saleslayer.com/api/introduction

统计信息

  • 总下载量: 15.61k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-13