Page 1 of 1

API and categories in getFeeds

Posted: 04 Jun 2013, 22:49
by mightycoco
Hi,

I'm searching for the categories in the getFeeds call. I get the feeds with a cat_id assigned, but the returned json of getFeeds only contains the special categories (all/recetn/starred,etc) and the feeds but not the categories I have created...

Code: Select all

        {
            "feed_url": "http://blogs.msdn.com/ts/rss.xml",
            "title": "MSDN Terminal Services Team Blog",
            "id": 15,
            "unread": 9,
            "has_icon": true,
            "cat_id": 3,
            "last_updated": 1370369734,
            "order_id": 0
        },


Parameters I throw into getFeeds:

Code: Select all

            JObject j = new JObject();
            j["op"] = "getFeeds";
            j["sid"] = this.SessionID;
            j["cat_id"] = -4;
            j["unread_only"] = unreadOnly;
            j["include_nested"] = true;

            string response = await Post(this.Endpoint + "/api/", j.ToString(Formatting.None, null));


the getCategories call states
to display a root list of all (for backwards compatibility) or topmost categories, use getFeeds to traverse deeper.

which didn't help me much.

Thanks for any hints :)

Thanks,
MC

Re: API and categories in getFeeds

Posted: 04 Jun 2013, 23:26
by fox
I have a feeling you are looking for getFeedTree, otherwise maybe you need to read the documentation on the subject of what -4 actually means.

Re: API and categories in getFeeds

Posted: 04 Jun 2013, 23:31
by mightycoco
Thanks fox,

I know, -4 = all feeds, no cats

I was under the impression there is another way than fetching the tree - didn't wan't to add another call. However, a wise man someday said: Asumptions are the mother of all fuck ups!

thanks,
MC

edit: and thanks for the quick response.

Re: API and categories in getFeeds

Posted: 04 Jun 2013, 23:34
by fox
What are you trying to accomplish? You can get a flat list of all (or root nodes only) categories with getCategories.