package com.fos.demo.push;

import com.fos.core.push.MessageClient;
import com.fos.core.push.ProductPayload;

public class DemoPushProductMain {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        // 生成一个应用的信息
        ProductPayload payload = ProductPayload.newPayload()
                .setServerToken("okay123456")
                .setPushToken("TEDA123456")
                .setProductName("创未来")
                .setAppPackageName("com.teda.makerunion")
                .setDescription("创未来");
        System.out.println("POST: "+payload);
        String server = "http://123.56.146.81:1880/v1/";
        String ret    = MessageClient.post(server, payload);// 调用推送接口
        // {"flag":1,"msg":"ok","mkey":56} 返回接口flag=1则说明发送成功，其余为发送不成功
        System.out.println(ret);
    }

}
