Syncing Data With Firebase Using Ionic Framework

$scope.list = function() { fbAuth = fb.getAuth(); if(fbAuth) { var sync = $firebase(fb.child(“users/” + fbAuth.uid)); var syncObject = sync.$asObject(); syncObject.$bindTo($scope, “data”); } } Once syncObject is bound to $, which is provided by AngularFire, data will be synchronized consistently in three ways (UI, $, and Firebase): Calling ${title: result}); will update the UI and also […]

SWAPI — The Star Wars API

$ curl -X GET { "name": "Luke Skywalker", "height": "1.72 m", "mass": "77 Kg", "hair_color": "Blond", "skin_color": "Caucasian", "eye_color": "Blue", "birth_year": "19 BBY", "gender": "Male", "homeworld": "", "films": [ "", "", "" ], "species": [ "" ], "vehicles": [ "", "" ], "starships": [ "", "" ], "created": "2014-12-09T13:50:51.644000Z", "edited": "2014-12-10T13:52:43.172000Z", "url": "" } […]

Reqres – Test your front-end against a real API

Reqres simulates real application scenarios. If you want to test a user authentication system, Reqres will respond to a successful login/register request with a token for you to identify a sample user, or with a 403 forbidden response to an unsuccessful login/registration attempt. Great to see an initiative like this. Nearly three years ago I […]

Slate – Beautiful static documentation for your API

Slate helps you create beautiful API documentation. Think of it as an intelligent, responsive documentation template for your API. Slate – Beautiful static documentation for your API → Tutorial: Writing API Documentation with Slate → Related: Swagger, a dynamic documentation generator

Building an HTML5 Text Editor with the FileSystem APIs

// Save a file in the FileSystem. function saveFile(filename, content) { filesystem.root.getFile(filename, {create: true}, function(fileEntry) { fileEntry.createWriter(function(fileWriter) { fileWriter.onwriteend = function(e) { // Update the file browser. listFiles(); // Clean out the form field. filenameInput.value = ”; contentTextArea.value = ”; // Show a saved message. messageBox.innerHTML = ‘File saved!’; }; fileWriter.onerror = function(e) { console.log(‘Write […]


Speaking of APIs and documentation in the previous post: Swagger is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services. Describe your API in a JSON file like this, and Swagger will turn it into that. Alternatively you can provide your project with Swagger Annotations and then run it […]

Your API Consumers Aren’t Who You Think They Are

Traditionally, you’d expect most inquiries about APIs to be very technical: How can I upload bulk attachments with multipart POST bodies? Increasingly, questions are becoming more like amateur Stack Overflow questions: How do I hook the Microsoft Access into the REST? The users behind such questions aren’t tech-illiterate, they simply have no idea how to […]