Page 1 of 1

Error in getArticle

Posted: 15 May 2013, 18:54
by rockdreamer
Hi, I'm preparing a C# API for tt-rss (mostly for my own educational purposes and because I own a WP7.8 device).

I'm getting an error when calling the getArticle api.

post data is

Code: Select all


The response I get is:

Code: Select all

Query <i>SELECT id,title,link,content,cached_content,feed_id,comments,int_id,
         SUBSTRING(updated,1,16) as updated,
         FROM ttrss_entries,ttrss_user_entries
         WHERE   id IN () AND ref_id = id AND owner_uid = 2</i> failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ref_id = id AND owner_uid = 2' at line 6

It looks like the article_ids are not passed to the query.
According to the api documentation getArticle:
Requests JSON-encoded article object with specific ID.

article_id (integer) - article ID to return as of 15.10.2010 git or 1.5.0 supports comma-separated list of IDs
Since 1.4.3 also returns article attachments.

what is the proper way of encoding article_ids with comma? Thanks :)

Re: Error in getArticle

Posted: 15 May 2013, 20:32
by rockdreamer
my bad, I just noticed I was sending the wrong parameter name (article_ids instead of article_id).

I'll publish the API as soon as I get all unit tests rolling