App Client API Reference

FeedHenry provides a client side API to access the FeedHenry platform and your App Cloud functionality from client devices in a cross-platform way. By abstracting-out the platform-specific implementations, you can build apps which work across a wide range of platforms and can also access powerful server-side functionality.

If you are not familiar with our client-server architecture, please refer to our Introductory material.

Using the API

The client API has implementations in multiple languages - JavaScript, ObjectiveC & Java - but all share a common usage pattern.

JavaScript

The JavaScript API is provided in the $fh namespace and uses a common convention for most functions, which takes the format:

$fh.doSomething(parameterObject, successFunction, failureFunction)

where parameterObject is an ordinary JavaScript object. The successFunction callback is called if the operation was successful and the failureFunction callback is called if the operation fails. All of these arguments are optional. If there is only one function, it is taken as the success function.

The successFunction callback is called with one argument, a result object, which is again an ordinary JavaScript object. The failureFunction callback is called with three arguments: an error code string, an object containing additional error properties (if any), and finally the original parameterObject.

Download our JavaScript SDK

ObjectiveC for iOS

The iOS API takes the following format

[FH initWithSuccess: success AndFailure: failure];

Download our iOS SDK
Checkout iOS SDK API Documentation

Java for Android

The Android API takes the following format

FH.init(this, new FHActCallback() {

  @Override
  public void success(FHResponse resp) {
    //NOTE: other FH methods can only be called after FH.init succeeds
  }

  @Override
  public void fail(FHResponse arg0) {

  }
});

Download our Android SDK
Checkout Android SDK API documentation