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 » 21 Mar 2013, 08:45

Labels are easier to navigate through because they are not auto-created based on feed content, as opposed to tags. There's a lot more tags than labels in general. Neither is deprecated because that would be dumb. One does not replace the other.

I'm not sure what history of google reader development has to do with any of it.

User avatar
mboinet
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 13 Jan 2013, 20:51

Re: API discussion

Postby mboinet » 26 Apr 2013, 18:11

In a getArticle, would it be possible to have the feed_title attribute set?
In getHeadlines, when not in a special category, feed_title is set to null. Would it also be possible to have the value?

When not in a special category, I have a workaround in ttrss-mobile to fetch the name of the feed.
But when I'm in a special category and the article disappeared from the special feed (like Newest articles) I can't get the feed name easily.

More info: https://github.com/mboinet/ttrss-mobile/issues/37

This really is a very specific usage that users won't meet easily. So not a high priority for me.

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 » 27 Apr 2013, 12:30

https://github.com/gothfox/Tiny-Tiny-RS ... d94655b7bc

>In getHeadlines, when not in a special category, feed_title is set to null. Would it also be possible to have the value?

The idea was if you request normal feed you should already know the title, but I don't think having that in the output would break anything, so why not.

https://github.com/gothfox/Tiny-Tiny-RS ... 363e1c7a6e

User avatar
mboinet
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 13 Jan 2013, 20:51

Re: API discussion

Postby mboinet » 27 Apr 2013, 14:15

Thanks, that was fast!

rockdreamer
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 15 May 2013, 18:35

Re: API discussion

Postby rockdreamer » 18 May 2013, 20:37

Hi all, I've prepared a tt-rss API wrapper for C#.

I have exposed all publicly available methods according to the api reference on redmine on May 18, 2013 plus some convenience methods (for updateArticle). I have tested method execution on my personal site, but I have not checked returned data fully.

This is the first time I've used C# so any constructive criticism is very welcome. :)

Check it out on github! https://github.com/rockdreamer/ttrss-csharp

Known bugs:
- the wrapper uses generated classes and I don't know how to make it read Content.error when Content is normally a vector of objects. Suggestions welcome.

License is GPLv3 or later. For closed-source redistribution, contact me here or on Github.

EvilTwin
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 26 Aug 2014, 22:49

Re: API discussion

Postby EvilTwin » 04 Mar 2015, 22:28

Hi,

Is there any way to get the date an article was imported by tt-rss? You know the date displayed in the web UI when you hover over the date and it says "Imported at Mar 03 21:58" ?
Neither "getArticle" nor "getHeadlines" seem to have the desired information. Only an "updated" property (are this the seconds since the article got updated the last time?).
I would like to show the date on articles in my client and maybe even include the date into search like "show articles from two weeks ago".

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 » 04 Mar 2015, 22:41

why would you need to show a date which more or less only needed for debugging? use updated it's what the feed specifies.

batch/import date is an internal tt-rss thing, which is why it is not shown in the UI

EvilTwin
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 26 Aug 2014, 22:49

Re: API discussion

Postby EvilTwin » 04 Mar 2015, 23:05

So "updated" is the seconds since the article got updated? Is that correct?
Will this change at some point? E.g will it be set to 0 again when the article gets starred, tagged or marked as unread?
I need the date the article first appears in tt-rss, not the date the article got last modified.

What do you mean its not shown in the UI?
What date is it then that is shown in the UI?
I am talking about this date:
http://imgbin.org/images/22677.png

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 » 04 Mar 2015, 23:14

updated is the timestamp for the article as specified by the feed.

i thought this was rather obvious, really, i mean if the api returns you a huge-ass number why would you think it was "seconds since last update"? it obviously doesn't fit.

if it looks like a duck and it quacks like a duck maybe it's a duck... stamp.

>What do you mean its not shown in the UI?

it's a tooltip, i.e. it is hidden by default, the aforementioned updated field is shown instead. batch date is used for sorting, you shouldn't try to filter based on it (and you won't be able to, the api doesn't allow it).

idk man maybe try thinking a little bit before you post, that's all very obvious things i'm answering here

EvilTwin
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 26 Aug 2014, 22:49

Re: API discussion

Postby EvilTwin » 04 Mar 2015, 23:35

Well, if it was sooo obvious I would not have asked.
I was expecting something like "2014-03-03 21:58" and never heard about unix timestamps before. Excuse me for not being all-knowing ...
It is very frustrating that in this forum you can't ask anything without being called stupid.
I completely understand why there is a thread called "Why are you all assholes?"!

randompherret
Bear Rating Trainee
Bear Rating Trainee
Posts: 36
Joined: 04 Jul 2013, 08:11

Re: API discussion

Postby randompherret » 05 Mar 2015, 00:48

EvilTwin wrote:... never heard about unix timestamps before. Excuse me for not being all-knowing ...


Sounds like you shouldn't play with APIs then, thats a pretty basic concept, maybe a high school programing class would be a good thing to look into.


Image

EvilTwin
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 26 Aug 2014, 22:49

Re: API discussion

Postby EvilTwin » 05 Mar 2015, 03:05

randompherret wrote:Sounds like you shouldn't play with APIs then, thats a pretty basic concept, maybe a high school programing class would be a good thing to look into.


So just because I never came across timestamps (just never needed something like this until now) I should give up all together and and go back to high school? Okay...

I just don't get why one would write 5 lines to explicitly tell me how obvious and easy my question is and how stupid I am for not knowing and still not giving me an answer, instead of just writing 1 line with the correct answer I am looking for.

Me: "So "updated" is the seconds since the article got updated? Is that correct?"
fox: "No, its a unix timestamp. Just google it. Its really easy ;)"

And everybody would be happy. But no! Because this is the Internet everyone has to be a giant D-bag.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: API discussion

Postby sleeper_service » 05 Mar 2015, 04:54

EvilTwin wrote:And everybody would be happy. But no! Because this is the Internet everyone has to be a giant D-bag.


there's far too much coddling of fucktards and dumbshits as it is... except here.

deal with it, or leave, but whining will get you nowhere.

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 » 05 Mar 2015, 09:53

EvilTwin wrote:Me: "So "updated" is the seconds since the article got updated? Is that correct?"
fox: "No, its a unix timestamp. Just google it. Its really easy ;)"


i wasn't even mad before you made me use a winking smiley face in your headcanon fanfiction

User avatar
blainemono
Gaping Anus of Eternity
Gaping Anus of Eternity
Posts: 246
Joined: 05 Jun 2009, 18:13

Re: API discussion

Postby blainemono » 05 Mar 2015, 10:26

Image


Return to “Development”

Who is online

Users browsing this forum: No registered users and 2 guests