xiezefan
10/28/2014 - 8:06 AM

Ding创建服务的JSON

Ding创建服务的JSON

//NEXT
{
  "title": "NEXT",
  "description": "NEXT 是36氪旗下的一个实验性项目,灵感来自于Product Hunt",
  "type": "SUBSCRIBE",
  "category_id": "6",
  "notify_url": "http://127.0.0.1/ding-node/next/product",
  "has_lbs": false,
  "has_ding": false
}

//豆瓣影评
{
  "title": "豆瓣影评",
  "description": "豆瓣电影最受欢迎的影评",
  "type": "SUBSCRIBE",
  "category_id": "3",
  "notify_url": "http://127.0.0.1/ding-node/douban/movie/review",
  "has_lbs": false,
  "has_ding": false
}

//豆瓣书评
{
  "title": "豆瓣书评",
  "description": "豆瓣读书最受欢迎的书评",
  "type": "SUBSCRIBE",
  "category_id": "3",
  "notify_url": "http://127.0.0.1/ding-node/douban/book/review",
  "has_lbs": false,
  "has_ding": false
}

//纵横中文网
{
  "title": "纵横中文网",
  "description": "订阅纵横中文网小说",
  "category_id": "2",
  "type": "NOTIFY",
  "notify_url": "http://127.0.0.1/ding-node/novel/zongheng",
  "name_pattern": "{book_name}",
  "desc_pattern": "{book_name}更新,将通知您",
  "has_lbs": false,
  "has_ding": false,
  "client_field": [
    {
      "key": "book_name",
      "type": "text",
      "name_ch": "书名"
    }
  ]
}

//起点中文网
{
  "title": "起点中文网",
  "description": "订阅起点中文网小说",
  "category_id": "2",
  "type": "NOTIFY",
  "notify_url": "http://127.0.0.1/ding-node/novel/qidian",
  "name_pattern": "{book_name}",
  "desc_pattern": "{book_name}更新,将通知您",
  "has_lbs": false,
  "has_ding": false,
  "client_field": [
    {
      "key": "book_name",
      "type": "text",
      "name_ch": "书名"
    }
  ]
}

//创世中文网
{
  "title": "创世中文网",
  "description": "订阅创世中文网小说",
  "category_id": "2",
  "type": "NOTIFY",
  "notify_url": "http://127.0.0.1/ding-node/novel/chuangshi",
  "name_pattern": "{book_name}",
  "desc_pattern": "{book_name}更新,将通知您",
  "has_lbs": false,
  "has_ding": false,
  "client_field": [
    {
      "key": "book_name",
      "type": "text",
      "name_ch": "书名"
    }
  ]
}

//明天下雨提醒
{
  "title": "明天下雨提醒",
  "description": "关注指定城市明天降雨状况",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/weather",
  "name_pattern": "{location}明天下雨",
  "desc_pattern": "{location}明天下雨将通知你",
  "has_lbs": false,
  "has_ding": false,
  "service_field": {
    "date": "1",
    "action": "下雨"
  },
  "client_field": [
    {
      "key": "location",
      "type": "city",
      "name_ch": "城市"
    }
  ]
}

//明天下雪提醒
{
  "title": "明天降雪提醒",
  "description": "关注指定城市明天降雪状况",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/weather",
  "name_pattern": "{location}明天降雪",
  "desc_pattern": "{location}明天降雪将通知你",
  "has_lbs": false,
  "has_ding": false,
  "service_field": {
    "date": "1",
    "action": "雪"
  },
  "client_field": [
    {
      "key": "location",
      "type": "city",
      "name_ch": "城市"
    }
  ]
}

//彩票
{
  "title": "彩票开奖结果",
  "description": "关注指定票种的开奖结果",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/lottery",
  "name_pattern": "{type}开奖结果",
  "desc_pattern": "{type}开奖将通知你",
  "has_lbs": false,
  "has_ding": false,
  "client_field": [
    {
      "type": "client_service_selector",
      "service_options": [
        {
          "name": "双色球",
          "fields": {
            "action": "doubleChromosphere"
          }
        },
        {
          "name": "福彩3D",
          "fields": {
            "action": "fucai3D"
          }
        },
        {
          "name": "七乐彩",
          "fields": {
            "action": "sevenHappyColor"
          }
        },
        {
          "name": "超级大乐透",
          "fields": {
            "action": "superLotto"
          }
        }
      ]
    }
  ]
}

//优酷
{
  "title": "优酷热剧",
  "description": "关注优酷热剧更新",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/youkuremind",
  "has_lbs": false,
  "has_ding": false,
  "client_field": [
    {
      "type": "client_service_selector",
      "service_options": [
        {
          "name": "暴走大事件",
          "fields": {
            "action": "z358fb9aafb7d11e3a705"
          }
        },
        {
          "name": "暴走看啥片儿",
          "fields": {
            "action": "zec070b7e332d11e4abda"
          }
        },
        {
          "name": "每日一暴",
          "fields": {
            "action": "z7d6b51a2f50211e3b2ad"
          }
        },
        {
          "name": "编辑部的故事",
          "fields": {
            "action": "z05475e00f50211e3a705"
          }
        },
        {
          "name": "老友记",
          "fields": {
            "action": "z153dfcf811a211e4a705"
          }
        },
        {
          "name": "飞碟说",
          "fields": {
            "action": "z2acd12a6ebcf11e28b3f"
          }
        },
        {
          "name": "侣行 第二季",
          "fields": {
            "action": "z49ae58ae30b911e38b3f"
          }
        }
      ]
    }
  ]
}

// RRS
{
  "title": "RRS订阅",
  "description": "每天推送订阅的文章",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/subscriberss",
  "has_lbs": false,
  "has_ding": false,
  "service_field": {
    "type": "rrs"
  },
  "client_field": [
    {
      "key": "action",
      "type": "client_service_selector",
      "service_options": [
        {
          "name": "36Kr",
          "fields": {
            "action": "http://www.36kr.com/feed"
          }
        },
        {
          "name": "知乎",
          "fields": {
            "action": "http://www.zhihu.com/rss"
          }
        },
        {
          "name": "虎啸",
          "fields": {
            "action": "http://www.huxiu.com/rss/0.xml"
          }
        },
        {
          "name": "伯乐在线",
          "fields": {
            "action": "http://blog.jobbole.com/feed/"
          }
        },
        {
          "name": "极客公园",
          "fields": {
            "action": "http://www.geekpark.net/rss"
          }
        },
        {
          "name": "什么值得买",
          "fields": {
            "action": "http://feed.smzdm.com"
          }
        }
      ]
    }
  ]
}

//PM2.5
{
  "title": "PM2.5超标",
  "description": "所关注城市PM2.5超标将提醒你",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/pm25",
  "name_pattern": "{location}PM2.5超标",
  "desc_pattern": "{location}PM2.5超标将提醒你",
  "has_lbs": false,
  "has_ding": false,
  "client_field": [
    {
      "key": "location",
      "type": "selector",
      "name_ch": "城市",
      "options": [
        {
          "name": "北京",
          "value": "北京"
        },
        {
          "name": "上海",
          "value": "上海"
        },
        {
          "name": "广州",
          "value": "广州"
        },
        {
          "name": "深圳",
          "value": "深圳"
        },
        {
          "name": "杭州",
          "value": "杭州"
        },
        {
          "name": "武汉",
          "value": "武汉"
        },
        {
          "name": "成都",
          "value": "成都"
        },
        {
          "name": "天津",
          "value": "天津"
        },
        {
          "name": "南京",
          "value": "南京"
        },
        {
          "name": "西安",
          "value": "西安"
        }
      ]
    }
  ]
}

//限行
{
  "title": "北京限行提醒",
  "description": "所关注的车牌尾号明天限行将提醒你",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/vehiclerestriction",
  "name_pattern": "车牌尾号{action}明天限行",
  "desc_pattern": "车牌尾号{action}明天限行将提醒你",
  "has_lbs": false,
  "has_ding": false,
  "client_field": [
    {
      "key": "action",
      "type": "selector",
      "name_ch": "车牌尾号",
      "options": [
        {
          "name": "0",
          "value": "0"
        },
        {
          "name": "1",
          "value": "1"
        },
        {
          "name": "2",
          "value": "2"
        },
        {
          "name": "3",
          "value": "3"
        },
        {
          "name": "4",
          "value": "4"
        },
        {
          "name": "5",
          "value": "5"
        },
        {
          "name": "6",
          "value": "6"
        },
        {
          "name": "7",
          "value": "7"
        },
        {
          "name": "8",
          "value": "8"
        },
        {
          "name": "9",
          "value": "9"
        },
        {
          "name": "字母",
          "value": "字母"
        }
      ]
    }
  ]
}

//网易热门
{
  "title": "网易热门新闻",
  "description": "有态度的新闻门户",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/nets_hot_news",
  "has_lbs": false,
  "has_ding": false
}

//地震
{
  "title": "地震快报",
  "description": "6级以上地震相关报道",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/earthquake_new",
  "has_lbs": false,
  "has_ding": false
}

//马蜂窝
{
  "title": "马蜂窝游记",
  "description": "马蜂窝热门游记推荐",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/mafengwo",
  "has_lbs": false,
  "has_ding": false
}

//100头条
{
  "title": "100头条",
  "description": "每天精选必读的微信头条",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/wechat100",
  "has_lbs": false,
  "has_ding": false
}

//微信热榜
{
  "title": "微信热榜",
  "description": "热门微信文章分类看",
  "category_id": "1",
  "notify_url": "http://127.0.0.1:10016/v1/factory/weixinre",
  "has_lbs": false,
  "has_ding": false,
  "client_field": [
    {
      "type": "client_service_selector",
      "service_options": [
        {
          "name": "微信综合热榜",
          "fields": {
            "action": "0"
          }
        },
        {
          "name": "微信创意·科技热榜",
          "fields": {
            "action": "1"
          }
        },
        {
          "name": "微信媒体·达人热榜",
          "fields": {
            "action": "2"
          }
        },
        {
          "name": "微信娱乐·休闲热榜",
          "fields": {
            "action": "3"
          }
        },
        {
          "name": "微信生活·旅行热榜",
          "fields": {
            "action": "4"
          }
        },
        {
          "name": "微信学习·工具热榜",
          "fields": {
            "action": "5"
          }
        },
        {
          "name": "微信历史·读书热榜",
          "fields": {
            "action": "6"
          }
        },
        {
          "name": "微信金融·理财热榜",
          "fields": {
            "action": "7"
          }
        },
        {
          "name": "微信美食·菜谱热榜",
          "fields": {
            "action": "8"
          }
        },
        {
          "name": "微信电影·音乐热榜",
          "fields": {
            "action": "9"
          }
        },
        {
          "name": "微信汽车热榜",
          "fields": {
            "action": "10"
          }
        }
      ]
    }
  ]
}