标签(空格分隔): Dingdong
GET /user/followed 关注列表
package cn.jpush.sms.test; | |
import org.apache.commons.lang.StringUtils; | |
import redis.clients.jedis.HostAndPort; | |
import redis.clients.jedis.JedisCluster; | |
import java.util.HashSet; | |
import java.util.Set; | |
/** |
use ding; | |
drop table tb_user; | |
create table tb_user ( | |
id varchar(36) primary key, | |
password varchar(256) not null, | |
registration_id varchar(36), | |
alias varchar(36), | |
avatar varchar(36), |
[ | |
{ | |
"title": "Creative Lab获腾讯、Line1.1亿美元战略投资", | |
"cover_pic": "http://a.36krcnd.com/photo/2014/abbf36b722f8b052d152c340b4dfffd8.jpg", | |
"tag": [ | |
"腾讯", | |
"投资" | |
], | |
"create_time": "2014-11-12", | |
"summary": "据韩国先驱报及Business Korea报道,即时通信巨头腾讯以及 Line 联合对韩国的游戏工作室 4:33 Creative Lab 进行了 1.1 亿美元的战略投资。" |
[ | |
{ | |
"title": "创世网小说更新TEST", | |
"type": "SUBSCRIBE", | |
"description": "所关注的小说更新,将叮咚你", | |
"category_id": "1", | |
"notify_url": "http://127.0.0.1:3000/novel/chuangshi", | |
"name_pattern": "{book_name}更新", | |
"desc_pattern": "{book_name}更新,将叮咚你", | |
"has_lbs": false, |
推送到所有平台(如未指定platform,默认推送到所有平台)
{ "platform" : "all" }
指定推送特定平台
Redis Key | Type | Value | Value Example ----|----|---- service:{sid}|hash|Service Object | {"name": "明天下雨提醒我", "category": "天气", ...} client.service.id:{sid}:${data}|string|ClientService's id | UUID - "klfdfd-fdsafdafdasfdas" client.service:{cid}|hash|ClientService Object | {"data":"data string", "parentId":"0542", ...} client.service.follower:{cid}|set|ClientService's id set |UUID - "abcd-efdasdasdasdasdasd" user:{uid}|hash|User Object | {"id":"UUID", "password":"123123123", ...} user.followed:{uid}|set|User followed service set | UUID - "abcd-efdasdasdasdasdasd" user.client.service.remark:{uid}:{cid}|string|Remark|生日提醒 1992-09-12 => 我的生日 client.service.push.token:{push_token}|string|User's ID| UUID - "abcd-efdasdasdasdasdasd"
//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 | |
} |
//参数 time_unit=day start=2014-09-25 duration=50 | |
//BUG | |
//1.出现这种非法的日期 2014-09-32 | |
//2.返回的JSON中,步长这个属性,文档显示是step, 但返回的是duration | |
{ | |
"time_unit": "day", | |
"start": "2014-09-25", | |
"duration": 50, |