Coder Social home page Coder Social logo

apid's Introduction

README

API data for API Debugger: https://itunes.apple.com/us/app/api-debugger/id1069711788?l=zh&ls=1&mt=8

APID用户交流微信群

添加API

fork本仓库,然后向index.json中增加API数据,给amoblin发pull request,合并进本仓库后,API Debugger里就可以看到新的API啦~

API数据格式

先看一个API的例子:

{
    "title" : "花瓣网",
    "id": "huaban_index",
    "method" : "GET",
    "url" : "http://api.huaban.com/favorite/wedding_events",
    "url_params" : "",
    "body_type" : "",
    "body_params" : "",
    
    "icon": "http://hbfile.b0.upaiyun.com/img/about/brand/webicon/files/HuabanWebIcon_64px.png",
    "value_path" : "pins",
    "layout" : "app_store",
    "content_mapping" : {
        "title" : "name",
        "image" : ["http://img.hb.aicdn.com/%s", "file.key"],
        "subtitle" : "description"
    },
    "item_action": "huaban_detail"
  • title:给这个API起的名字,自定义字符串
  • id:唯一标示这个API对象,自定义字符串
  • method:HTTP请求类型,可选集合:GET、POST、PUT、DELETE。目前1.0版本只支持GET方法
  • url:这是最关键的信息--API的网址
  • url_params:GET参数
  • body_type:只有method为POST时才有效,设置body的格式
  • body_params:只有method为POST时才有效,设置body的内容
  • icon:在API Debugger首页列表展示时显示的图片
  • value_path:希望展示的数据的key path,一般对应的值是一个list
  • layout:每一项的展示样式,可选集合:app_store、onle_title、only_image、landscape、image_and_intro、webview、custom等。具体效果试一下就知道了。以后会增加更多的布局。
  • content_mapping:内容映射。这里是定义value_path中的每一项数据到layout展示样式的映射规则。比如app_store这个布局,有3个展示位:图片、标题、副标题,对应就是imagetitlesubtitle,这三项对应的值应该从value_path中的元素来取,取的路径就是在这里定义的。
  • item_action:定义每一项的点击事件处理。值为另一个API的id。

API文档

大家可以把搜集到的API文档资料放到这里

apid's People

Contributors

amoblin avatar coderyi avatar

Watchers

 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.