api
57 posts · All topics
- — AI Slop: A Slack API Rate Limiting Disaster
Yesterday I described AI-generated code as “plausible-looking, locally coherent, globally wrong.” Here’s a concrete example from my own codebase.
- — Turning Hypermedia APIs into MCPs
I’ve written and talked extensively about Hypermedia APIs for about a decade. The HATEOAS constraints in representing resources for a RESTful API has numerous advantages in API ...
- — Using Claude Code with Google Sheets
Let’s get Claude Code to connect to Google Sheets. We’ll use this Google Sample Spreadsheet.
- — Fixing Bugs in the OpenSearch API Documentation using API Spec Tests
I’ve previously written about the OpenSearch OpenAPI Specification.
- — Using OpenSearch Cat API Response Formats
I’ve been working on the new OpenSearch OpenAPI Specification that aims to properly document OpenSearch RESTful APIs. The spec is to be used to auto-generate OpenSearch clients ...
- — Writing a Channel Slack Bot with Granular Permissions
In 2020 Slack introduced granular permissions and has begun enforcing that legacy applications use them. I’ve previously migrated a simple bot to use those in-place, but it has ...
- — Making Raw JSON REST Requests to OpenSearch
OpenSearch clients implement various high-level REST DSLs to invoke OpenSearch APIs. Efforts such as opensearch-clients#19 aim at generating these from spec in order to always b...
- — Making AWS SigV4 Authenticated Requests to Amazon OpenSearch
Amazon OpenSearch and Amazon OpenSearch Serverless use AWS SigV4 for authentication. We’ve made it dead easy to make authenticated requests across all OpenSearch clients in open...
- — Walking Ethereum Transaction Logs to Find Lost Robbies w/Etherscan API
On July 17, 2018, I spoke at the Christies first ever annual Tech Summit entitled “Exploring Blockchain”, in London. I even got a freebie NFT!
- — Migrating Classic Slack Ruby Bots to Granular Permissions
Slack recently introduced granular permissions and is now requiring all new apps to use those. The old apps are called classic apps, and new apps are called … apps. Slack also p...
- — Calling a GraphQL API in Redwood.js
I recently needed to stand up a demo app that invoked an AWS AppSync GraphQL API. The existing endpoint (not available publicly) returned restaurant data for a given zip with th...
- — Writing a New OpenWeatherMap.org API Ruby Client
I have been writing Ruby clients for various services for a few years now using the same pattern described in Writing a New Strava API Ruby Client. That itself was built on the ...
- — Handling of HTTP Headers in Grape with Rack and Rails
I recently helped debug Grape#1880, an issue a developer had with HTTP headers in Grape and Rack. It wasn’t immediately obvious.
- — Using Strava Webhook Events API
Strava Webhook Events API seems to give developers trouble. Last year I wrote a new Strava Ruby client that made things significantly easier and came with some handy tools.
- — Solving Slack-Side Disconnects in slack-ruby-client
In June 2018 users started reporting slack-side disconnects in their Ruby bots, reported via slack-ruby-client#208, regardless of the concurrency library (Eventmachine or Cellul...
- — Writing a New Strava API Ruby Client
Despite an existing Swagger-compatible API, most of Strava interactions written in Ruby don’t use any auto-generated code and prefer strava-api-v3 (update: this gem was yanked i...
- — Dealing with Strava API OAuth Token Migration
Strava has recently announced changes to the Strava OAuth flow. On October 15, 2019 all applications using the old flow will stop working.
- — Google Finance Web API Ruby Client
There’s a bunch of financial market APIs out there, and after having tried a few for slack-market I still ended up using Yahoo Finance, undocumented, but wildly popular, “API”. ...
- — Generating and Handling Errors in GraphQL in Ruby
In a previous post I walked you through building and consuming a GraphQL API in Ruby. That was the happy path. In this post we’ll generate and handle some errors.
- — Building and Consuming a GraphQL API with Ruby on Rails
In the past few weeks I’ve convinced myself that GraphQL can work well for any micro-service. This post is a full walk-through of getting a working GraphQL API on Ruby on Rails....
- — Grape Framework 1.0 Released
I took a deep breath, and released Grape Framework 1.0. We’re at 8,066 Github stars and 965 forks. I still think Grape is the best way to build Ruby RESTful APIs. I’ve written m...
- — Your First Slack Bot Service (Video)
I gave a talk entitled “Your First Slack Bot Service” at the inaugural New York City Slack Meetup.
- — Running Slack Bots on DigitalOcean with Dokku
Slack bot experimentation, especially for not-too-serious purposes, has become a little too expensive on Heroku. There’s no free tier for maintaining apps running 24/7, so the d...
- — Why does Slack API rtm.start send you all this data?
Like many, I found it easy to immediately criticize the Slack Web and RealTime API design. I would have wanted a RESTful implementation and not an RPC one. I would have liked fo...
- — When Robots Die - Slack account_inactive and Closed Connections
One of the things you have to be aware when writing a bot is disabled integrations and closed connections. The first case is simple - when someone disables a bot integration, Sl...
- — Writing a Slack Bot Service for Multiple Teams
- — The Easiest Way to Write a Slack Bot in Ruby
I’ve extracted and improved upon common code from slack-gamebot and slack-mathbot and made slack-ruby-bot. It’s probably the easiest way to make a Slack bot in Ruby today.
- — Slack Bot Real Time Messaging API Integration in Ruby Tutorial
I’ve been recently contributing to slack-pongbot, a node.js Slack bot for setting up ping-pong matches at Artsy.
- — Designing a Hypermedia API with Grape & Roar
Slides from my talk last night @ API Craft NYC: https://www.slideshare.net/dblockdotorg/designing-a-hypermedia-api-with-grape-roar.
- — Serving Hypermedia with a Grape API and Roar
I’ve begun experimenting with Hypermedia APIs a bit more seriously, trying to come up with a good infrastructure for the next version of the Artsy API. It might even be a public...
- — Grape Mounted behind Goliath
Got a chance to play with Goliath for a bit. You don’t need to do much work to mount Grape behind it. Grape figures out content-negotiation and formatting for you, so just strea...
- — Evolving APIs using Grape API Versioning
I’ve seen two common API versioning strategies in the wild. The first is to use a single API version and gradually deprecate methods. This usually means introducing new API rout...
- — Grape vs. Poncho
There are a number of excellent micro-frameworks to author RESTful APIs in Ruby. Let’s take a look at the newcomer, Poncho, from the Stripe team, brought up on the Grape mailing...
- — Grape 0.4.0 Released w/ Stricter JSON Format Support & More
I’m very excited to Release Grape 0.4.0 today. Again, thanks to the 10 (!) contributors to this release.
- — Measuring Performance in Grape APIs w/ NewRelic RPM
If you’re not using NewRelic, here’s a pretty picture to convince you to try it out. And a blog post on measuring performance in Grape APIs with NewRelic RPM on the Art.sy Engin...
- — TaxCloud: SOAP Service Integration in Ruby
- — Wrapping Responses with Grape and Rack
Grape’s after blocks don’t allow you to modify response text or status code [#200]. So how can you wrap an API response?
- — Grape 0.2.0 Released
After almost a year of active development with 200+ commits, Grape 0.2.0 has finally been released. It’s the code from the “frontier” branch that we’ve been using in production ...
- — Grape API Mounted on RACK w/ Static Pages, Tests, JQuery UI, Backbone.js and Even Mongo
Expanding from my previous post on a Grape API mounted on RACK.
- — Grape API Mounted on RACK w/ Static Pages
tl;dr – the source is here
- — Grape vs. Webmachine
One of my favorite talks at QCon 2011 was about Webmachine. I was very curious to see what those well-disciplined Erlang people had come up with. At the end of the talk I had le...
- — Grape: Describing and Documenting an API
Building a software platform is not just an investment in the future, it’s a software architecture philosophy. A proper API is a manifestation of some of the core principles of ...
- — Favorite Talks from QConfSF 2011
- — Rendering Markdown Documents in Rails
There’s got to be a prettier way of implementing this.
- — Grape: Routing Multiple Methods
Sometimes you want to support both GET and POST in a Grape API.
- — NoRails: Application Design in Times of APIs
A recent post “Rails is Not Your Application” caught my attention. It was fundamentally right, but the suggested implementation was misguided.
- — New Relic: Performance Instrumentation with Grape API
We’re using Grape in our Rails app on Heroku, which comes with New Relic instrumentation out-of-the-box. Let’s get the Grape API route details to show in New Relic as well.
- — IE9: Cache-Busting with Grape Middleware
Ran into a series of weird bugs with IE9. Turned out that a lot of our API requests were cached on the client. I am not sure whether this is some clever plot to make things work...
- — Embedding API Sandboxes in Documentation
Oh, I know how much you want this!
- — Modularizing a RoR Grape API: Multiple Versions
We made some progress with modularizing our Grape API in the last post. But we only had one version and declared Api_v1 as our main API entry. Unless you’re Netflix and need an ...
- — Modularizing a RoR Grape API
A lot of people ask me whether we use Rails controllers for our API. We don’t, we use Grape. Grape is a Rack-based system and a DSL that provides a cleaner separation, some API-...
- — Grape: API Authentication w/ Devise
Now that we have dealt with exceptions in our API we need to provide various methods of authentication. We’re going to be talking grape and devise.
- — Grape: trapping all exceptions within the API
We’ve been using Grape to provide a RESTful API. Grape is a micro-framework for Ruby that makes it really easy.
- — Wrapping the Idee PixMatch RESTful API in a Ruby Gem
I had a nice time today wrapping up the Idee PixMatch API in a Ruby gem. PixMatch is a general image matching engine that allows you to perform large scale image comparisons and...
- — Rails: Passing Arrays in a Query String
I found this quite unusual. I needed to receive an array with some nested hashes part of a query string into a JSON API. Passing encoded JSON wasn’t looking hot. Turns out, in R...
- — FoodCandy.com: Implementing Facebook Connect and Signup w/ Graph API
- — Implementing AtomPUB in .NET
I’ve been wanting to implement a POST protocol for my blog for a while. The urge got really bad since I’ve started using LiveWriter at my day job. It’s such a nice piece of soft...
