定制 mysmile/apiclient 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mysmile/apiclient

最新稳定版本:v1.3.0

Composer 安装命令:

composer require mysmile/apiclient

包简介

Rest api client for MySmile CMS

关键字:

README 文档

README

Latest Stable Version License Build Status Coverage Status SensioLabsInsight

Rest api client Client for MySmile CMS.

Requirements

  • PHP 5.3+
  • Curl

Installation

The best way to install MySmile Api Client is use composer:

  1. Update your composer.json
{
    "require": {
        "mysmile/apiclient": "dev-master"
    }
}
  1. Run composer update

Usage

Manager configuration

    $endpoint   = 'http://demo.mysmile.com.ua/api'; // please set your endpoint instead of demo
    $manager    = Manager::getInstance()
        ->setEndpoint($endpoint);

For developing purpose it's possible to configure proxy:

    $proxy   = 'http://127.0.0.1:8888';
    $manager = Manager::getInstance()
        ->setProxy();

Get language list

    $language = new Language($manager);
    $response = $language->getData();

Get contact

    $contact    = new Contact($manager);
    $response   = $contact->getData();

Get content list

   $params     = array('lang' => 'en');// list of available languages can be get using Language Resource 
   $content    = new Content($manager);
   $response   = $content->getData($params);

Get content by slug

   $params     = array('lang' => 'en', 'slug' => 'index'); // how to get list of available slugs is presented in the example above
   $content    = new Content($manager);
   $response   = $content->getData($params);

Example

Mobile version of MySmile that is based on MySmile Api Client can be found here /doc/example.

Installation

Run composer update in /doc/example.

License

BSD-3-Clause

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-01-01