API discussion

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

Re: API discussion

Postby fox » 13 Apr 2011, 15:37


nils.braden
Bear Rating Trainee
Bear Rating Trainee
Posts: 43
Joined: 25 Oct 2010, 12:12
Contact:

Re: API discussion

Postby nils.braden » 14 Apr 2011, 15:32


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

Re: API discussion

Postby fox » 14 Apr 2011, 15:47


nils.braden
Bear Rating Trainee
Bear Rating Trainee
Posts: 43
Joined: 25 Oct 2010, 12:12
Contact:

Re: API discussion

Postby nils.braden » 14 Apr 2011, 15:57


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

Re: API discussion

Postby fox » 14 Apr 2011, 17:14

Attachments
ScreenShot.png
ScreenShot.png (69.8 KiB) Viewed 5719 times

nils.braden
Bear Rating Trainee
Bear Rating Trainee
Posts: 43
Joined: 25 Oct 2010, 12:12
Contact:

Re: API discussion

Postby nils.braden » 14 Apr 2011, 17:52


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

Re: API discussion

Postby fox » 14 Apr 2011, 21:05


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

Re: API discussion

Postby fox » 14 Apr 2011, 21:23

Also, I have added support for passing parameters using JSON in raw POST data instead of this whole HTTP query thing. It's available in trunk.

nils.braden
Bear Rating Trainee
Bear Rating Trainee
Posts: 43
Joined: 25 Oct 2010, 12:12
Contact:

Re: API discussion

Postby nils.braden » 15 Apr 2011, 00:20


nils.braden
Bear Rating Trainee
Bear Rating Trainee
Posts: 43
Joined: 25 Oct 2010, 12:12
Contact:

Re: API discussion

Postby nils.braden » 01 May 2011, 18:47

Hi,

I did just hit an issue with getCounters when Categories are disabled. I always had this enabled so I didn't care much for non-category-stuff but it seems theres happening some strange stuff.

I noticed all Feeds have a category-id but the corresponding category is only visible if you enable categories. The imported feeds nevertheless are inserted in a category and with my reader (which ignores the possibility of feeds without category or disabled categories) you have to use the categories. Its a thing i should perhaps tackle some day but at the moment its not easy to put Feeds in a list of categories like in main-view of the webinterface (All Articles etc are handled as categories in the android-app).

Strange thing now is, the getCounters api-call seems to ignore categories when they are disabled so the reader doesn't display any categories at all (i delete categories, then fetch new ones to make sure deleted categories are removed some day). So when getCounters doesn't provide categories the categories are only displayed when I subsequently call getCategories (and it must be in this order).

I am thinking about decoupling the getCounters call completely because it is the slowest api-call (not sure yet if it is the server or JSON-parsing) but this would lead to unpredictable behaviour when it comes to the order in which calls are made. Any ideas about that? Do you think it would make sense to include categories in getCounters no matter if they are enabled or not? Or should i somehow make sure getCategories is called afterwards and include the feeds in the main view as the webinterface does? Guess thats the way to do it in the future..

Greetings,
nils

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

Re: API discussion

Postby fox » 03 May 2011, 09:48

Yeah, I think that including categories in the API call is the way to go here. I'll try to fix this when I have some time.

btw, I have found an issue with ttrss-reader. It seems that headlines can get stuck in the feed view, e.g. I open the feed, some headlines load. I close it since there was nothing interesting. Open it a week later to see several new headlines load and those that have been loaded before staying there still apparently unread. They are no longer in the API reply, I guess, so the reader never figures out that they should be long gone.

To be honest I would really like to be able to disable any client caching altogether and make it work like mobile/ with a prettier native UI. :)

nils.braden
Bear Rating Trainee
Bear Rating Trainee
Posts: 43
Joined: 25 Oct 2010, 12:12
Contact:

Re: API discussion

Postby nils.braden » 03 May 2011, 13:00


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

Re: API discussion

Postby fox » 03 May 2011, 13:53

Can you just (optionally?) delete stored feed data before saving whatever got received? That should solve the problem of having potentially expired, I guess.

Edit: well yeah or delete everything on launch, that would work too. :)

nils.braden
Bear Rating Trainee
Bear Rating Trainee
Posts: 43
Joined: 25 Oct 2010, 12:12
Contact:

Re: API discussion

Postby nils.braden » 03 May 2011, 14:02

Do you think it would be enough if I just fix the problem with the unread articles so you can ignore the caching? It shouldnt make a difference if it caches and shows the right articles or if it doesn't cache and shows the right articles, should it? Another guy wants exactly the same except it should be done on-demand so ther would be a button for purging everything, a preference for purging everything on launch and a preference for purging everything in a feed on update. And all this while I don't see why we need it at all =)

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

Re: API discussion

Postby fox » 03 May 2011, 16:54

Well obviously my idea is superior and you should implement it and only it. :) j/k

Anyway, as long as the articles won't stay in the headlines view anymore, as far as I'm concerned this will be fixed.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 3 guests