try
{
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
string timestamp = Convert.ToInt64(ts.TotalSeconds).ToString();
string appkey = string.Empty;
string app_master_secret = string.Empty;
var param = new object();
if (model.platform == "android")
{
appkey = System.Configuration.ConfigurationManager.AppSettings["android_appkey"];
app_master_secret = System.Configuration.ConfigurationManager.AppSettings["android_App_Master_Secret"];
param = new
{
appkey = appkey,
timestamp = timestamp,
type = model.type,
device_tokens = model.device_tokens == null ? "" : model.device_tokens,
payload = new
{
body = new
{
ticker = model.ticker,
title = model.title,
text = model.text,
{
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
string timestamp = Convert.ToInt64(ts.TotalSeconds).ToString();
string appkey = string.Empty;
string app_master_secret = string.Empty;
var param = new object();
if (model.platform == "android")
{
appkey = System.Configuration.ConfigurationManager.AppSettings["android_appkey"];
app_master_secret = System.Configuration.ConfigurationManager.AppSettings["android_App_Master_Secret"];
param = new
{
appkey = appkey,
timestamp = timestamp,
type = model.type,
device_tokens = model.device_tokens == null ? "" : model.device_tokens,
payload = new
{
body = new
{
ticker = model.ticker,
title = model.title,
text = model.text,