Free Your Data
I'm a huge fan of the Data Liberation Front, a group within Google that obsesses over freeing the data. If you ever want to know how to export/access your data from Google's data centers, this single site details everything. The goals are simple; you want to create
- a way to export your data in an open, interoperable format…
- that shouldn't cost the user anything…
- and take as little time as possible
This is a pretty strong edict. Any company with APIs should be able to do this; LinkedIn is no exception. The LinkedIn Developer Site documents the APIs we have available. During brainstorming, I wanted an application that makes it one-click-simple to get your profile information and download it. Docs in hand, it was time to create a "Sign in With LinkedIn" button and start accessing data.
API.Raw() call. The results are then mashed together in the final payload. When we've got all the parts, we can do the download. For the GitHub version, a client side result is displayed. It's also possible to use the simple PHP script to trigger a download of the JSON data. The total engineering took about 3 hours from no API key to completion and completed debugging.
One of the more interesting things done in the application is the liberal use of the
.Raw() API call. While there are shortcut methods to get various data components,
Raw affords us several advantages. First, you don't have to accept the defaults. Since this application is designed to grab as much data as possible, it needed to ask for more than just the default commonly used fields. Second, as the number of URLs grows, it becomes very easy to change the data structure to allow an unlimited number of attributes to be retrieved, without adding much additional code. Finally, some endpoints just don't have convenience methods build in yet. For those items, we needed some way to get at the data- the original purpose
Raw was built. Since our URLs don't change in the v1 API, this is a pretty stable solution that also affords us the power we're looking for.