Closed (fixed)
Project:
Services
Version:
6.x-2.2
Component:
Code
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2010 at 15:52 UTC
Updated:
31 Aug 2010 at 22:30 UTC
I successfully connected and gotten data from the system.connect and node.get. Currently I'm not using any authentication while I figure out the basics of this module. Using the json server.
But no matter what I do, whenever I try to use views.get, I always get "Missing Required Arguments".
Now this is a simple view that just displays a list of node titles. No arguments required. It works fine in the Services browser when I try it. Anonymous user have access to it, etc.
My ajax call, which is working for other methods:
$.ajax({
url: service_url,
dataType: "jsonp",
data: {"method" : "views.get", "view_name" : "rest_a" },
success: function(data){
if (data["#error"] == false) {
console.log(data);
$("#progress").toggle();
} else {
console.log(data);
alert( "Error: " + data["#data"] );
$("#progress").toggle();
}
}
});
Any insight and help is appreciated!
Thanks!
Comments
Comment #1
jazzdrive3 commentedSo is this issue queue the right place to post this? Or is it the json server that is the issue?
If the views service won't work, I might as well not use this module at all and come up with something else to power my iphone app.
Thanks.
Comment #2
jazzdrive3 commentedOk, finally figured it out. Did a print_r before the services module called the error and found that it still thought the "view_name" argument was missing.
Tried the following and it suddenly started working!
The views.get method, at least going through the json server, needs escaped quotes around the view_name argument.
Comment #3
marcingy commented