The final thing I want to briefly discuss are general ideas to improve the search. Right now the search is unusable for an actual application. Here’s what you get when you search for ‘apple’:

  1. calories:”50"

Cranberry apple juice! Not even close.

So what’s going on here? Well the results depend on how the USDA database works. So if we want to improve our results we need a better understanding of how their search works, or at the very least, understand what tools are at…


Recap:

Welcome back! In the previous post we discussed how to build a basic API to connect with a third-party application. That was the hard part. Now all we need is a way for the user to post the information to the database. That’s what we’ll do here.

Posting to the database

To do this it helps to create a little more UI. Let’s make it so that the result returned from the USDA shows up on the user’s screen. …


Introduction

Okay, in the last post I briefly mentioned what you should have in place before building the API. Now’s the fun part. Put on your detective hat, because a lot of the time that’s what this feels like. Searching around for clues, and slowly piecing the puzzle together.

Ready?

Great!

Let’s build an API.

Background

Before building something, it’s good to know what we’re building. So let’s start with a more detailed discussion of what an API is. …


Connecting with an API requires that you already have a number of things set up in your program. Since the focus of this series is about connecting with an API, I’ll leave a detailed explanation of this set up for another series. Below I briefly discuss what the structure of your program should look like before building the API. I move from back to front.

Backend

You’ll want to make sure you have a basic server set up and ready to. The server should be connected to a database (so make sure you have a database). Let’s call the database…


Have you ever wondered how to connect your application to other websites like Amazon, or Google Maps, or the Weather Channel?

Me too!

Have you ever heard the term ‘API’ and just nodded along like you’re a pro even though you have no idea what it means?

Yeah…me too.

But don’t worry. This series will make it so that you not only understand what an API is, but also the basics of how to build one. Or, put differently, by the end of the series you’ll understand the basics of how to connect your application with other third-party applications. …

MATTHEW Dworkin

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store