😀微软小冰检测图片颜值评分接口
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src Update BaseFace.php Nov 16, 2017
tests 增加赋诗功能 Sep 9, 2017
.gitignore first commit 🎉 Apr 10, 2017
LICENSE Initial commit Apr 10, 2017
README.md 补充文档 Sep 9, 2017
composer.json 完善所有接口 Apr 10, 2017
composer.lock 完善所有接口 Apr 10, 2017

README.md

face

face 是基于微软小冰接口的颜值检测工具

PS:其中某些接口还有一些参数,能够定位某些tag的位置,但因过于复杂这里没有实现

Install

composer require hanson/face

Usage

<?php
$face = new \Hanson\Face\Foundation\Face();

$result = $face->score->get('https://ws2.sinaimg.cn/large/685b97a1gy1fehkmbi6hvj20u00u07ab.jpg');

/**

[
    'score' => 6.8,
    'text' => '哥们颜值才6.8分,一下让整体颜值从7.3跌到7.1ORZ',
    'url' => 'http://mediaplatform.trafficmanager.cn/image/fetchimage?key='
];

**/

Document

<?php
$face = new \Hanson\Face\Foundation\Face();

// 获取颜值实例
$instance = $face->score;

// 获取受欢迎实例
$instance = $face->popular;

// 获取关系实例
$instance = $face->relation;

// 获取请客实例
$instance = $face->bill;

// 获取时尚穿衣实例
$instance = $face->clothing;

// 获取赋诗实例
$instance = $face->poem;

// 所有实例均有一个方法 get
$result = $instance->get($url);

Achievement

Score 颜值分数

Bill 请吃饭

Popular 最受欢迎

Relation 关系

Clothing 穿衣风格