Giter VIP home page Giter VIP logo

easy-smartprogram's Introduction

EasySmartProgram

百度智能小程序SDK,参照easy-wechat实现

Build Status codecov Latest Stable Version Latest Unstable Version Total Downloads License

功能

  • 小程序登录
  • 小程序授权信息解密
  • 小程序模板消息管理,发送模板消息
  • swan_id校验组件
  • 信息流资源
  • 获取unionid

安装

composer require f-oris/easy-smartprogram

基本使用

参考easy-wechat使用文档,因为是仿着做的,所以小程序各组件提供的方法,含义,用法基本上和easy-wechat一致

获取unionid

// 配置好config,获取code...

$app = new Application($config);
$session = $app->auth->session($code);
$uionidData = $app->auth->getUnionid($session['openid']);
// {"unionid": "St6PVMkgMDeh92Uq2EWfx6H"}

信息资源流

// 注意:此功能尚未在实际产品上应用验证,慎用

// 配置好config ...
$app = new Application($config);

// Resource操作,传入参数见官方文档说明
$app->resource->submit($data);
$app->resource->delete($path);

// Sitemap操作,传入参数见官方文档说明
$app->site_map->submit($url, $desc, $type, $frequency);
$app->site_map->delete($url);

License

MIT License

Copyright (c) 2019-present F.oris [email protected]

easy-smartprogram's People

Contributors

itsanr-oris avatar

Stargazers

Pitozoo avatar Sanjay Kumari avatar zacks avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.