API and categories in getFeeds

Development-related discussion, including bundled plugins
mightycoco
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 23 Mar 2013, 20:46

API and categories in getFeeds

Postby mightycoco » 04 Jun 2013, 22:49

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

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: API and categories in getFeeds

Postby fox » 04 Jun 2013, 23:26

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.

mightycoco
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 23 Mar 2013, 20:46

Re: API and categories in getFeeds

Postby mightycoco » 04 Jun 2013, 23:31

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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: API and categories in getFeeds

Postby fox » 04 Jun 2013, 23:34

What are you trying to accomplish? You can get a flat list of all (or root nodes only) categories with getCategories.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 3 guests