GithubHelp home page GithubHelp logo

hybridapi's Introduction

HybridAPI

这里提供的是目前饿了么APP支持的Hybrid API的兼容版本。 App 5.9于2016年3月28日发布,届时将不支持旧版方法。

以及,若有新需求也可以给本仓库提 issue ,会更新到 App 那边支持。

  1. 获取饿了么外卖 App 全局的 geohash 值。
  2. 显示 App 右上角的分享按钮,并定制分享文案。
  3. 下单选择红包。

安装与使用

1. 安装

<!-- 引入 HybridAPI -->
<script src="//github.elemecdn.com/uglifyjs!eleme/hybridAPI/0.2.2/hybrid-api.js"></script>

2. 使用

获取饿了么app全局的geohash值

hybridAPI.getGlobalGeohash(geohash => {
  alert('geohash:' + geohash);
});

显示 App 右上角的分享按钮,并定制分享文案

hybridAPI.share({
  title: '分享标题',
  text: '分享副标题',
  weibo: '微博分享的内容',
  // 注意!imgUrl 和 link 必须是以 http 或 https 开头的绝对 URL
  url: '分享链接',
  image_url: '分享图标'
});

下单选择红包

hybridAPI.selectHongbao(hongbaosn); // hongbaosn为选中红包的SN,必传项

hybridapi's People

Contributors

coffeexy avatar furybean avatar gogu avatar

Watchers

 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.