springimport/magento2-api-v1 问题修复 & 功能扩展

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

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

springimport/magento2-api-v1

最新稳定版本:1.0.8

Composer 安装命令:

composer require springimport/magento2-api-v1

包简介

Base Rest API v1

README 文档

README

This is wrapper over Guzzle for Magento 2 REST API. Alternatively, you can use Swagger Client.

Installation

The preferred way to install this extension is through composer.

php composer.phar require --prefer-dist springimport/magento2-api-v1 "*"

or

"springimport/magento2-api-v1": "*"

Usage

Once the extension is installed, simply use it in your code by :

use springimport\magento2\apiv1\Configuration,
    springimport\magento2\apiv1\ApiFactory;

class ApiClient
{

    public static function get()
    {
        $configuration = new Configuration;
        $configuration->setBaseUri('baseUri');
        $configuration->setConsumerKey('consumerKey');
        $configuration->setConsumerSecret('consumerSecret');
        $configuration->setToken('accessToken');
        $configuration->setTokenSecret('tokenSecret');

        return new ApiFactory($configuration);
    }
}

统计信息

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

GitHub 信息

  • Stars: 17
  • Watchers: 5
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-25