ACS审查条件失败(ACS review condition failure)

编程入门 行业动态 更新时间:2024-10-14 04:28:53
ACS审查条件失败(ACS review condition failure)

我正在使用Titanium appcelerator在Android应用程序中工作。 现在我正在尝试ACS REVIEWS ..我得到了整个db结果,我需要按id过滤。 为此,我试图把Where条件..但它不工作..

我的Json

{ "id": "52ea3eba08a3e5704b330c2a2a", "rating": 3, "created_at": "2014-01-30T11:59:54+0000", "updated_at": "2014-01-30T11:59:54+0000", "user": { "id": "52e5f3881356b440b4b09c805", "created_at": "2014-01-27T05:50:00+0000", "updated_at": "2014-01-29T04:29:49+0000", "external_accounts": [ ], "confirmed_at": "2014-01-27T05:50:00+0000", "username": "Gk", "role": "j", "admin": "false", "custom_fields": { "phone": "91959454651", "usertype": "0", "status": "1", "ios_deviceid": "", "country_code": "IN", "verify_code": "4574", "verified": "1", "contact_sms": "1", "contact_message": "1", "contact_email": "1", "contact_phone": "0", "android_gcmid": "APA91bE0mcScNlXbCENZ2D_9jylgwdwOJ6vYTqnI_Kzqx2lqLWblnn6mT4PJ6iZRNxUGA66Ke7RJ0CKC44DL3mturNs_w3QT7KhTVIWbQE2tJgBHU7gpzB2GG4sFGXL6LiayJ5zEn_AGhxBlw" } }, "reviewed_object": { "type": "Post", "id": "52e7800313556440b4b0aa134" }, "custom_fields": { } }, { "id": "52ea3e9d4430d0b1e0c1c16", "rating": 3, "created_at": "2014-01-30T11:59:25+0000", "updated_at": "2014-01-30T11:59:25+0000", "user": { "id": "52e8fe464643d0b130b85f5", "first_name": "Ganesh", "last_name": "test", "created_at": "2014-01-29T13:12:38+0000", "updated_at": "2014-01-29T13:12:38+0000", "external_accounts": [ ], "confirmed_at": "2014-01-29T13:12:38+0000", "username": "john", "role": "r", "admin": "false" }, "reviewed_object": { "type": "Post", "id": "52e7800343556b4dsfsdfh3434" }, "custom_fields": { } }, ]

我想使用此ID过滤..

"reviewed_object": { "type": "Post", "id": "52e7800343556b4dsfsdfh3434" }

我应该在我的WHERE条件中写什么

Cloud.Reviews.query({ page : 1, per_page : 20, where : { rating : { '$gt' : 1.0 }, }, order : "-created_at" }

I'm working in an android app using Titanium appcelerator. Now i'm trying out ACS REVIEWS .. I'm getting the whole db result , i need to filter by id. For that i tried to put Where condition ..But it doesn't working..

My Json

{ "id": "52ea3eba08a3e5704b330c2a2a", "rating": 3, "created_at": "2014-01-30T11:59:54+0000", "updated_at": "2014-01-30T11:59:54+0000", "user": { "id": "52e5f3881356b440b4b09c805", "created_at": "2014-01-27T05:50:00+0000", "updated_at": "2014-01-29T04:29:49+0000", "external_accounts": [ ], "confirmed_at": "2014-01-27T05:50:00+0000", "username": "Gk", "role": "j", "admin": "false", "custom_fields": { "phone": "91959454651", "usertype": "0", "status": "1", "ios_deviceid": "", "country_code": "IN", "verify_code": "4574", "verified": "1", "contact_sms": "1", "contact_message": "1", "contact_email": "1", "contact_phone": "0", "android_gcmid": "APA91bE0mcScNlXbCENZ2D_9jylgwdwOJ6vYTqnI_Kzqx2lqLWblnn6mT4PJ6iZRNxUGA66Ke7RJ0CKC44DL3mturNs_w3QT7KhTVIWbQE2tJgBHU7gpzB2GG4sFGXL6LiayJ5zEn_AGhxBlw" } }, "reviewed_object": { "type": "Post", "id": "52e7800313556440b4b0aa134" }, "custom_fields": { } }, { "id": "52ea3e9d4430d0b1e0c1c16", "rating": 3, "created_at": "2014-01-30T11:59:25+0000", "updated_at": "2014-01-30T11:59:25+0000", "user": { "id": "52e8fe464643d0b130b85f5", "first_name": "Ganesh", "last_name": "test", "created_at": "2014-01-29T13:12:38+0000", "updated_at": "2014-01-29T13:12:38+0000", "external_accounts": [ ], "confirmed_at": "2014-01-29T13:12:38+0000", "username": "john", "role": "r", "admin": "false" }, "reviewed_object": { "type": "Post", "id": "52e7800343556b4dsfsdfh3434" }, "custom_fields": { } }, ]

I want to filter using this id..

"reviewed_object": { "type": "Post", "id": "52e7800343556b4dsfsdfh3434" }

What should i write in my WHERE Condition..

Cloud.Reviews.query({ page : 1, per_page : 20, where : { rating : { '$gt' : 1.0 }, }, order : "-created_at" }

最满意答案

我添加了我的帖子ID条件没有where声明..它工作得很好..

我的代码:

Cloud.Reviews.query({ page :1, per_page : 20, post_id : Your Post id }, function(e) { if (e.success) {

i have added my post id condition without where statement ..It worked perfectly..

My Code:

Cloud.Reviews.query({ page :1, per_page : 20, post_id : Your Post id }, function(e) { if (e.success) {

更多推荐

本文发布于:2023-07-27 20:22:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1295008.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:条件   ACS   review   failure   condition

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!