2017 © Pedro Peláez
 

lib qcloud-api

qcloud api for laravel5

image

daids/qcloud-api

qcloud api for laravel5

  • Monday, May 30, 2016
  • by daids
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

qcloud-api

qcloud api for laravel5, (*1)

云搜API

  • 配置
//config/app.php
...
Daids\QcloudApi\QcloudApiServicePorvider::class
...
'Yunsou' => 'Daids\QcloudApi\Facades\Yunsou'

```shell php artisan vendor:publish, (*2)

```php
//config/qcloud.php  填写你的配置项
'base' => [
    'appId' => '',
    'secretId' => '',
    'secretKey' => '',
],
'yunsou' => [
    'appId' => '' //云搜业务appId
]
  • 添加记录
    • Yunsou::add($data) $data为上传数据,结构以配置为主,
//例如:
$data = [
    'id' => 1,
    'title' => 'test'
]
  • 搜索记录
    • Yunsou::search($keyword, $page, $perPage) $page从0开始
//返回结果
$result = [
    'result' => true, 
    'data' => [
        "cost_time": 19,
        "display_num": 2,
        "echo": "",
        "eresult_num": 2,
        "result_list": [
            {
                "doc_id": "1",
                "doc_meta": "{
                    "id": "1",
                    "title": "test"
                }",
                "l2_score": 0,
                "search_debuginfo": ""
            },
            {
                "doc_id": "2",
                "doc_meta": "{
                    "id": "2",
                    "title": "test2"
                }",
                "l2_score": 0,
                "search_debuginfo": ""
            }
        ],
        "result_num": 2,
        "seg_list": [
            {
                "seg_str": "test"
            },
            {
                "seg_str": "test2"
            }
        ]
    ]
];

The Versions

30/05 2016

dev-master

9999999-dev

qcloud api for laravel5

  Sources   Download

MIT

The Requires

 

by daidongsheng