alexjamesbrown / JoeBlogs

Wordpress / Metaweblog API Wrapper
53 stars 40 forks source link

Mapping breaks when wp.getCommentCount returns int if there is a '0' and string if there is an actual number #22

Open punjabisoul opened 11 years ago

punjabisoul commented 11 years ago

Hi Alex Thanks for writing this awesome API!!

I am trying to download post data from my wordpress blog, but the following happens: Call var commentcount = wordPressWrapper.GetCommentCount(post.PostID.ToString()); in a try/catch block

FIX: Looking at the XML-RPC documentation

CHANGE: In the /classes/CommentCount.cs and /xmlRpcStructs/CommentCount.cs change all the types from int to object and then handle actual conversion outside the API i.e. in my project like: commentcount.Approved.ToString()

Hope this helps

alexjamesbrown commented 11 years ago

Hey, If you could do a pull request on this i'll merge it in,

Thanks