Live data from Hacker News

Messages via JSON

refl.me

111–120 of 129 posts

Re: Messages via JSON

#111

If you need something like that, go for a Telegram bot. It's really simple to make, the API is very nice and developer friendly. It's not oAuth, just a simple secret. It even accepts parameters via GET, so writing a bash script that check something and sends a message via Curl is pretty easy. There are few APIs simpler than this one. This is also more efficient, as your app only sends data out when it needs to, inste…

I created a Telegram bot for one of my apps, but had to remove Telegram from my phone/computer after their terrible handling of Facebook linking. I made the mistake of linking my Telegram account to my Facebook account, which gave me the wonderful 'feature' of getting a notification any time one of my (due to the linked account being promotional) thousands of friends joined Telegram. These notifications play at any t…

Thank!

Re: Messages via JSON

#112
post #36

Earlier quoted context omitted.

There's another problem, if the author tells us that this is crc, while it's a MAC (not particularly strong tbh), it shows that we, as developers and users, cannot trust that cryptographic decisions of the author are of any consideration. For reference, crc is not a signature, its full name is "cyclic redundancy check", which is a really simple mathematical operation, that computes a specific remainder that comes fro…

Not one byte, but a number of bytes equal to the length of the CRC (typically 4). But yes, people saying "CRC" when they really mean "checksum" or "signature" is a pet peeve of mine, and I treat it as a code smell. CRC has a precise defined technical meaning. For the curious: CRC is linear with respect to XOR. This means that if you XOR two equal-length strings, the CRC will be the individual CRCs XORed together. It'…

I've done it for people with any level of programming. People have already got used to that "CRC" is "checksum". But I will think about it.

Re: Messages via JSON

#113
post #17
post #7

> Request signature format(crc): [time_stamp]_[md5(time_stamp+secret_key)] This should probably be an HMAC construction at the very least, and MD5 in general just should be discarded entirely in favor of BLAKE2b, SHA-2 or SHA-3. And ideally, it'd actually validate the rest of the contents as well.

Also the example PHP code doesn't validate the age of the passed timestamp so you could just replay a "signature" indefinitely... Given that, you might as well just use an unchanging token or Basic Auth. Assuming https, that wouldn't be terrible for this kind of use case. But put it in an Authorization header, not in a query parameter, so it doesn't end up in logs.

The documentation says it's a test of your choice.

Re: Messages via JSON

#115
post #91

If you need something like that, go for a Telegram bot. It's really simple to make, the API is very nice and developer friendly. It's not oAuth, just a simple secret. It even accepts parameters via GET, so writing a bash script that check something and sends a message via Curl is pretty easy. There are few APIs simpler than this one. This is also more efficient, as your app only sends data out when it needs to, inste…

I think the linked app is more supposed for one-off use-cases - e.g., you're a dev/admin and want to keep an eye on some web service. You could write a simple endpoint in python and have the app poll it over LAN. I think not needing to bother with any kind of third-party is hard to beat in terms of simplicity. > I don't think this app will ever work on iOS, due to Apple's policies. I've not much experience on iOS, so…

I don't think a simple endpoint in Python is any simpler than sending simple requests to an external API. You can do that even via Bash, Curl and Cron. Regarding iOS, using APIs improperly is one sure way to have problems with app review, see i.e. the recent Push Kit debate.

Re: Messages via JSON

#116
post #91

Earlier quoted context omitted.

I think the linked app is more supposed for one-off use-cases - e.g., you're a dev/admin and want to keep an eye on some web service. You could write a simple endpoint in python and have the app poll it over LAN. I think not needing to bother with any kind of third-party is hard to beat in terms of simplicity. > I don't think this app will ever work on iOS, due to Apple's policies. I've not much experience on iOS, so…

I don't think a simple endpoint in Python is any simpler than sending simple requests to an external API. You can do that even via Bash, Curl and Cron. Regarding iOS, using APIs improperly is one sure way to have problems with app review, see i.e. the recent Push Kit debate.

But you have an external API - meaning, you have to get a Telegram account, register a bot (and not forget to unregister it later), think about who else can see the bot, think about if it matters that Telegram can see the data, etc. If you plan to keep this up for some time, you'll also have to keep up with Telegram's policy changes, outages, etc.

Re: Messages via JSON

#118
post #6

Earlier quoted context omitted.

What's wrong with that?

Because it is the most inefficient approach possible. You either have potentially long delays before receiving a notification (if you poll service once an hour, average delay would be 30 minutes), or you do LOTS of polling, draining the battery/abusing the service. If you have 20 notifications / day and you check service every minute, in a day you'll make 24*60 poll requests, only 1,38% of which would yield some mean…

There is no need for frequent updates for a lot of data. This application is not for instant messages.

Re: Messages via JSON

#119
post #15

Earlier quoted context omitted.

This would be nice for websites and services users want to get push notifications from. I get that html5 notifications should be able to do this at some point but there is still merit in having another way of getting stuff to your phone and possibly desktop.

Thing is, it does not offer push notifications. It's very opposite of that - the app seems to just poll the service with regular intervals.

Yes, but the interval is set in JSON, which is convenient. Besides, there is a manual mode.

Re: Messages via JSON

#120
post #41
post #31

Earlier quoted context omitted.

My understanding is that you would be making your own. E.g. if you had a site that people could comment on, make a url that serializes those comments as JSON and then point this at that.

As pointed out elsewhere by Andrew_nenakhov, we have that already—it's RSS. Or Atom. Or JSON Feed if you really must have JSON for some reason.

There's no simplicity. REFL.ME is easier. Try it.
Post reply on HN