drupal-ios-sdk-example icon indicating copy to clipboard operation
drupal-ios-sdk-example copied to clipboard

Trouble "get"ting views with arguments.

Open paulen opened this issue 14 years ago • 7 comments

"Get"ting views from the example app (v7) didn't work from the original source (with services views module.) It would say "404 Not found: Could not find the controller."

Changing the ViewsViewController.m getView method's call of "[views runMethod];" to "[views viewsGet:[viewNameField text]];" works and will do gets for the specified view name but seems to ignore the other arguments now. Any thoughts/ideas?

Thanks very much!

paulen avatar Aug 25 '11 23:08 paulen

I'm having the same issue. Any help would be appreciated!

Kvart avatar Sep 14 '11 07:09 Kvart

I'm seeing something similar. No matter how I try to pass display_id in, I see:

HTTP/1.0 404 Not found: Display on view testimonials could not be found

I've tried [views addParam:@"page_1" forKey:@"display_id"], but it doesn't seem to help.

barryw avatar Sep 15 '11 11:09 barryw

Any luck working around this? I've had the same problem as well and opened an issue on the services views module here: http://drupal.org/node/1287618 but no comments yet...

ggg-triple avatar Oct 05 '11 19:10 ggg-triple

I've tried everything I can imagine but with no luck. Right now I'm using RSS feeds to get some data from views, but of course it's really not even a workaround.

Kvart avatar Oct 06 '11 05:10 Kvart

Hang on guys, so sorry its taken me awhile to get back to you. Ill push an updated version tonight with instructions.

kylebrowning avatar Oct 18 '11 20:10 kylebrowning

OK, can you try now? Make sure to update services views.

kylebrowning avatar Nov 14 '11 20:11 kylebrowning

I think I'm having a related issue. Or maybe I just don't know what I'm doing (because I don't). I'm trying to add a parameter for the offset. I can do this manually in the url (i.e. http://www.myexample.com/api/views/blog_ios?offset=5) gets me the stuff for 10 blogs, but starting at the fifth one. This is what I want. But when I try [views addParam:@"5" forKey:@"offset"]; in "- (IBAction) getView" in ViewsViewController.m it seems to ignore the parameter completely. It looks to me like runMethod ignores parameters unless the RequestMethod is "POST" or "PUT", but viewsGet changes the RequestMethod to "GET" (which is what I assume it should be).

I had to do this in order to get views at all: As paulen said:

Changing the ViewsViewController.m getView method's call of "[views runMethod];" to "[views viewsGet:[viewNameField text]];" works and will do gets for the specified view name but seems to ignore the other arguments now.

When I left it as [views runMethod]; I got "404 Not Found: Could not find resources (null)" and the URL output is empty.

Thanks for all the work you've done on this. It's really helped me out so far. There's just a few view related things that are giving me issues.

jedimasterjsa avatar Nov 19 '11 20:11 jedimasterjsa