google-code-export / wordpress-web-service

Automatically exported from code.google.com/p/wordpress-web-service
2 stars 1 forks source link

getPosts method returns only 5 posts #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hey,

'getPosts' method returns only 5 posts even if I pass 100 in args.

Please advise.

Thanks.

Original issue reported on code.google.com by ido.elk...@gmail.com on 16 Oct 2010 at 3:09

GoogleCodeExporter commented 9 years ago
Sorry for my very late answer.
Can you tell me what the value of your args variable exactly is?

Original comment by 0x1010...@gmail.com on 18 Mar 2011 at 8:05

GoogleCodeExporter commented 9 years ago
Was just having a look at wpws-soap.php, get_posts method of WordPress expects 
an array and as per the WSDL for wpws, args for wp_WebService::getPosts method 
is a string. So I guess irrespective of whatever is sent in args, get_posts is 
returning results for default values of args where numberposts is set to 5 as 
per http://codex.wordpress.org/Template_Tags/get_posts

Original comment by uday.bid...@gmail.com on 25 Jun 2011 at 1:04

GoogleCodeExporter commented 9 years ago
How are you supposed to pass an array when it is asking for a string?

I have modified the code to unserialize a serialized array and that works great 
but is that the best way? If it is I am more than happy to submit my code 
changes.

Original comment by fab.lu...@gmail.com on 5 Sep 2011 at 9:35

GoogleCodeExporter commented 9 years ago
Hi can you please provide the code changes?. I am not so familiar with PHP and 
I am using this functionality with .Net and I too have the same problem
PostArray ps = client.getPosts("");

Since the argument expected is a string I am not sure how to pass an array

Original comment by rohangha...@gmail.com on 9 Nov 2011 at 5:20

GoogleCodeExporter commented 9 years ago
Could you please provide me with a sample array you want to pass?

Please also try passing the condensed string in the form "key1=val1&key2=val2".
E.g. "numberposts=10&category=5"

Original comment by 0x1010...@gmail.com on 9 Nov 2011 at 12:14

GoogleCodeExporter commented 9 years ago
Hi,

My apologies for taking long to respond..... but the "key1=val1&key2=val2" 
worked well thanks for the support. I now need to work on adding  method to get 
distinct categories.

Original comment by rohangha...@gmail.com on 16 Nov 2011 at 4:54

GoogleCodeExporter commented 9 years ago
If you make any progress you're free to send me a patch so I can add the 
functionality to WPWS.

Original comment by 0x1010...@gmail.com on 23 Nov 2011 at 5:19

GoogleCodeExporter commented 9 years ago
Please for God sake! at least write a two line documentation! I am searching 
for 3 hours how to pass arguments e.g. postsnumbers!

The web service itself is fine, but when it comes with no documentation, 
then... :(

Original comment by Arman1...@gmail.com on 17 Oct 2013 at 3:47

GoogleCodeExporter commented 9 years ago
I'm sorry, but I'm currently working on my PhD. For that reason I don't find 
time to work on the plugin.
If you feel like it needs improvement, I invite you to join the project.

Original comment by 0x1010...@gmail.com on 17 Oct 2013 at 6:18