What's Best Buy Ruby?
Best Buy Ruby is a new gem developed entirely here, at Rootstrap. It's basically a wrapper for the different Best Buy APIs. It offers a simple and intuitive interface that allows users to access the required API with as much customizations as they like.
Why use it?
Best Buy offers a really powerful API. The different options provided range from pagination and sorting methods to incredibly flexible item queries and response formats.
But with great power comes great responsibility.
While all these options are great, they can make requests quite messy to build. When you find yourself having to add the API key, the response format, page and page size, all this with a couple of conditions in the search query, building the URL can become quite troublesome.
Most healthy projects working with this API must build some kind of module to manage these options, even when the amount of interactions made with the API are low.
And that's where [.c-inline-code]best_buy_ruby[.c-inline-code] comes to save the day.
It's built entirely around the goal of making the API both easily accessible and fully customizable at the same time.
Let's see a quick example. With the gem, this request:
Can be written like this: