TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Tips to prevent adoption of your API

85 点作者 clukic将近 4 年前

9 条评论

georgekin将近 4 年前
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 未加载
clukic将近 4 年前
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 未加载
cmckn将近 4 年前
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_utkin将近 4 年前
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-scratch将近 4 年前
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.
jjgreen将近 4 年前
Any guesses which &quot;major fitness brand&quot; this is?
评论 #27531112 未加载
评论 #27530104 未加载
slver将近 4 年前
Gotta say never heard of an api like this before that serves everything once. Forever.
评论 #27530573 未加载
emptyparadise将近 4 年前
&gt;Instead of responding to your API requests we’ll call you back.<p>How...? <i>Why?</i>
评论 #27530635 未加载
评论 #27531237 未加载
评论 #27530533 未加载
phreack将近 4 年前
At some point you seriously need to say enough. This is so ridiculous as to not be remotely worth it.
评论 #27531650 未加载