TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tips to prevent adoption of your API

85 pointsby clukicalmost 4 years ago

9 comments

georgekinalmost 4 years ago
This appears to be the Garmin API, which supports OAuth1a, has no public documentation, and the limitations are pretty well detailed as well on the company blog of the author:<a href="https:&#x2F;&#x2F;blog.smashrun.com&#x2F;2021&#x2F;05&#x2F;21&#x2F;a-new-garmin-api&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.smashrun.com&#x2F;2021&#x2F;05&#x2F;21&#x2F;a-new-garmin-api&#x2F;</a>.<p>What an awful experience, I hope I never have to use it.
评论 #27532228 未加载
评论 #27531424 未加载
评论 #27531620 未加载
clukicalmost 4 years ago
A couple of things I omitted for brevity:<p>The async server response doesn&#x27;t contain the data. It contains a <i>link</i> to retrieve the data. So make a request and then wait to for a link to be sent to your server that you can use to retrieve the data for a limited time.<p>The responses sent to the server don&#x27;t correspond one to one to the requests. One response may contain data for many requests, and many responses may contain data for one request. Each response contains data for many UATs.
评论 #27538555 未加载
评论 #27533654 未加载
cmcknalmost 4 years ago
I’m a bit confused as to why a “unit test” would ever be hitting a real, external API. I would call that an integration test, E2E test, etc. that probably shouldn’t be run frequently (as part of a normal build, for example).<p>This API sounds like garbage, don’t get me wrong; and because of that, mocking it’s behavior is going to be almost impossible.
评论 #27531055 未加载
评论 #27531460 未加载
评论 #27531194 未加载
评论 #27530826 未加载
评论 #27539788 未加载
andrey_utkinalmost 4 years ago
On the same topic: API Practices If You Hate Your Customers <a href="https:&#x2F;&#x2F;queue.acm.org&#x2F;detail.cfm?id=3375635" rel="nofollow">https:&#x2F;&#x2F;queue.acm.org&#x2F;detail.cfm?id=3375635</a>
denton-scratchalmost 4 years ago
It sounds pretty malevolent to me.<p>But I&#x27;m disinclined to attribute malevolence to people without a motive. So I&#x27;m inclined to think they had to implement an API for some contractual reason; they put their best architect on it, with a brief to minimise server load at all costs; he then handed it off to the most junior developer team.<p>BTW: API implementors don&#x27;t generally design their API around the unit-testing requirements of the API&#x27;s users. Please don&#x27;t test the API I wrote; I&#x27;ve already tested it. Test your own code.
jjgreenalmost 4 years ago
Any guesses which &quot;major fitness brand&quot; this is?
评论 #27531112 未加载
评论 #27530104 未加载
slveralmost 4 years ago
Gotta say never heard of an api like this before that serves everything once. Forever.
评论 #27530573 未加载
emptyparadisealmost 4 years ago
&gt;Instead of responding to your API requests we’ll call you back.<p>How...? <i>Why?</i>
评论 #27530635 未加载
评论 #27531237 未加载
评论 #27530533 未加载
phreackalmost 4 years ago
At some point you seriously need to say enough. This is so ridiculous as to not be remotely worth it.
评论 #27531650 未加载