- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 sendy-api , 从代码中订阅用户。我正在使用javascript。我也关注了sendy-github .
我想在订阅之前检查用户的状态。如果用户已经取消订阅,我不想再次订阅。给出我试过的代码。
var Sendy = require('sendy-api'),
sendy = new Sendy('http://your_sendy_installation'),
sendyStatus = new Sendy('http://your_sendy_installation/api/subscribers/subscription-status.php'); //There is something wrong in this part I think
var eachUser = {em : 'abcd@xyz.com'};
sendyStatus.status({email: eachUser.em, list_id: 'someListID'}, function(err, userInfo)
{
console.log(userInfo)
});
得到如下错误:-
从 sendy 获取用户状态时出错{ [错误:[404 错误] 如果您在安装后看到此错误,请查看此常见问题解答以获得修复:https://sendy.co/troubleshooting#404-error] [消息]:'[404 错误] 如果您在安装后看到此错误,请查看此常见问题解答以获得修复:https://sendy.co/troubleshooting#404-error ' } 在 [2016 年 5 月 10 日星期二 12:55:30 GMT+0530 (IST)]jobScheduler:error: performJob failed{ [Error: [404 error] 如果您在安装后看到此错误,请查看此常见问题解答以获得修复:https://sendy.co/troubleshooting#404-error] [消息]:'[404 错误] 如果您在安装后看到此错误,请查看此常见问题解答以获得修复:https://sendy.co/troubleshooting#404-error ' } 在 [2016 年 5 月 10 日星期二 12:55:30 GMT+0530 (IST)]
任何人都知道如何解决这个问题?我做错了什么?
最佳答案
我忘记添加“api-key”所以我得到了错误,因为它写在 github 中.
现在的代码如下所示,并且可以正常工作:-
var Sendy = require('sendy-api'),
sendy = new Sendy('http://your_sendy_installation', 'api-key'); // Without api key it won't work.
var eachUser = {em : 'abcd@xyz.com'};
sendy.status({email: eachUser.em, list_id: 'someListID'}, function(err, userInfo)
{
console.log(userInfo) // will give status of the user.
});
关于javascript - 如何使用 sendy 检查用户状态(订阅与否),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37132066/
我正在使用 sendy-api , 从代码中订阅用户。我正在使用javascript。我也关注了sendy-github . 我想在订阅之前检查用户的状态。如果用户已经取消订阅,我不想再次订阅。给出我
我正在制作一个需要与 Sendy API 通信的 iPhone 应用程序.我相信它使用某种 JSON,但我不太确定,也不知道从哪里开始。我对 API 的 subscribe 部分特别感兴趣。 基本上,
发送响应头后停止代码执行但不使用 exit() 的正确方法是什么? 我知道脚本应该返回一个响应,但我如何强制它从 Controller 外部返回,例如从服务返回? 假设我的服务方法确实以这种方式返回响
我正在开发 ruby on rails 应用程序,并使用 sendy 和 amazon ses 进行营销事件。 我是否有可能将这个 sendy 服务器集成为我在 ruby on rails 开
我是一名优秀的程序员,十分优秀!