Jump to content

[Official][Update 8/15] Linus Tech Tips API

loganryan99

Will that break the current URLs then? Because I wouldn't want to rely on them if they will break at some point in the fairly near future, even if it just means adding code to ignore it if the link is broken.

 

I will be months before that happens, and when we upgrade you're going to have to change the way your plugin works anyways

Link to comment
Share on other sites

Link to post
Share on other sites

I will be months before that happens, and when we upgrade you're going to have to change the way your plugin works anyways

Yeah, but it's worth knowing that the addon will cease to function in all forum-related aspects when you upgrade. Once IPB4 is available in places, I'll try and make the addon ready before it's rolled out here, but obviously there could be some forum-specific changes that break it (in other words, could I have a sneak peak a couple of weeks before you release it, although I know it's a long way away).

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 months later...

Just came back after a while to ask if we can get a preview of our notifications rather than just the notification. Looks like it's already been done, thanks @

I am good at computer

Spoiler

Motherboard: Gigabyte G1 sniper 3 | CPU: Intel 3770k @5.1Ghz | RAM: 32Gb G.Skill Ripjaws X @1600Mhz | Graphics card: EVGA 980 Ti SC | HDD: Seagate barracuda 3298534883327.74B + Samsung OEM 5400rpm drive + Seatgate barracude 2TB | PSU: Cougar CMX 1200w | CPU cooler: Custom loop

Link to comment
Share on other sites

Link to post
Share on other sites

Hey @ do you think it would be possible that you could post in this thread when you update your API so that we can get notifications? That way, I'll be able to implement the API asap after it's released.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Hey @ do you think it would be possible that you could post in this thread when you update your API so that we can get notifications? That way, I'll be able to implement the API asap after it's released.

 

I do, but I just haven't updated this in a long time.

Link to comment
Share on other sites

Link to post
Share on other sites

I do, but I just haven't updated this in a long time.

Oops. Why did I not notice at the time :(

Sorry.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 months later...

has here been any work done to this api since october or did it die a painful death?

 

complete overhaul is coming soon

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 months later...

@[member=Cat :)]

 

Seems like the notification API is a bit broken. If any of the topic titles have quotation marks in them it will make parsers mistake them for other elements.

 

Example

"title":"AnnoyedShelf liked a post you made in AMD Kaveri Refresh "God...","date":"1426567308"

As you can see the quotation used in front of "God..." breaks my parser as it thinks it's the beginning of another element.

 

Also would it be possible to update the API and change out the "url" for the actual post url? Instead of a link that goes to "My Notifications" why not one that goes straight to the quoted/liked post instead? This will make leveraging the API much easier (at least for what I'm looking to do). I don't think it will break any of the existing software made with the API.

Link to comment
Share on other sites

Link to post
Share on other sites

@[member=Cat :)]

 

Seems like the notification API is a bit broken. If any of the topic titles have quotation marks in them it will make parsers mistake them for other elements.

 

Example

"title":"AnnoyedShelf liked a post you made in AMD Kaveri Refresh "God...","date":"1426567308"

As you can see the quotation used in front of "God..." breaks my parser as it thinks it's the beginning of another element.

 

Also would it be possible to update the API and change out the "url" for the actual post url? Instead of a link that goes to "My Notifications" why not one that goes straight to the quoted/liked post instead? This will make leveraging the API much easier (at least for what I'm looking to do). I don't think it will break any of the existing software made with the API.

 

As far as I know, the API is mostly deprecated because it will stop working when we update to IPB4 anyway (and there's not much we can do about that). As an addon developer, I'm hoping that a replacement will be implemented, but I can't promise anything.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 weeks later...

As far as I know, the API is mostly deprecated because it will stop working when we update to IPB4 anyway (and there's not much we can do about that). As an addon developer, I'm hoping that a replacement will be implemented, but I can't promise anything.

Hopefully we all can come together and collaborate on what/how the new API should work along with what information should be provided with it. For example IPB3 requires an auth_key for completing basic tasks like marking notifications as "read" which is something I would like to see added to the API if IPB4 also requires it. The move to using SSL should allow more sensitive information like this to be viable in the API.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

Seems another problem with the notification API. Viewing the notification log and marking "all as read" marks everything in the API as unread.

"read":false
Link to comment
Share on other sites

Link to post
Share on other sites

 

Seems another problem with the notification API. Viewing the notification log and marking "all as read" marks everything in the API as unread.

"read":false,"

Yeah, there are some other weird behaviours with it to do with what happens to the unread status when you click the links as well. I will look into it, but I don't have much time at the moment, and based on my brief look at the code I'm not sure why it's doing that.

Edit: try it now

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Yeah, there are some other weird behaviours with it to do with what happens to the unread status when you click the links as well. I will look into it, but I don't have much time at the moment, and based on my brief look at the code I'm not sure why it's doing that.

Edit: try it now

Works now.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 month later...

@colonel_mortis

 

Having a similar problem again. The API is automatically marking unread private messages as "read" even though they've never been viewed.

 

JKjnA5e.png

 

Which is leading to unread messages now showing up in the sub menu of my community software (since it's filtering by unread).

 

9rADsK2.png

 

As you can see here hovering without any menu items. I guess that would imply the API is bugged in some regard.

 

Also what time zone does the community use? (e.g. America/Vancouver). I'm looking to do time differences in my software (e.g. bla bla quoted you 15 minutes ago) which relies on the time zone that these timestamps are coming from.

Link to comment
Share on other sites

Link to post
Share on other sites

@colonel_mortis

 

Having a similar problem again. The API is automatically marking unread private messages as "read" even though they've never been viewed.

 

 

 

Which is leading to unread messages now showing up in the sub menu of my community software (since it's filtering by unread).

 

 

 

As you can see here hovering without any menu items. I guess that would imply the API is bugged in some regard.

 

Also what time zone does the community use? (e.g. America/Vancouver). I'm looking to do time differences in my software (e.g. bla bla quoted you 15 minutes ago) which relies on the time zone that these timestamps are coming from.

There's nothing we can do about it. I don't actually know why the forum adds those notifications to the full notification view (though not the notification dropdown), but they don't ever show as being unread.

The timestamps given on the notification page are UNIX timestamps, which are defined as being UTC, so when calculating, assume it's UTC+0.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

  • 7 months later...

Any updates with this and the new forum software?

I am a happy wuffy

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Wferr said:

Any updates with this and the new forum software?

The basic API page, https://linustechtips.com/main/page/api.php, is still up and functional, and it may get additional features at some time in the future. The other API pages are no longer available.

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Interesting...

 

Time to try my hand at writing a client in Python!

 

Note: Can anyone explain to me how to use CM_API and CM_NOTIF_API? 

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, UnbrokenMotion said:

Note: Can anyone explain to me how to use CM_API and CM_NOTIF_API?

They are no longer supported (I've now updated the OP to reflect this).

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×