Shopify = { };

Shopify._IsNonEmptyString = Match.Where(function(x) {
    check(x, String);
    return x.length > 0;
});


@@ -115,8 +115,1045 @@
 0;%0A%7D);%0A%0A
+// Load ShopifyApp from Shopify's CDN.  It must be initialized by calling%0A// ShopifyApp.init.%0A//%0A// @param callback(err, ShopifyAPI) %7BFunction%7D Called on success or failure.  Optional on server.%0AShopify.getEmbeddedAppAPI = function(callback) %7B%0A    var url = %22https://cdn.shopify.com/s/assets/external/app.js%22;%0A%0A    if (callback) %7B%0A       HTTP.get(url, function(err, res) %7B%0A            if (err) %7B%0A                callback(err);%0A                return;%0A            %7D%0A%0A            if (res.statusCode !== 200) %7B%0A                callback(%22Request failed: %22 + res.statusCode, null);%0A                return;%0A            %7D%0A%0A            eval(res.content);%0A            callback(null, this.ShopifyApp);%0A        %7D);%0A%0A    %7D else if (!Meteor.isServer) %7B%0A        throw new Error(%22Invalid usage: must provide callback on client%22);%0A    %7D else %7B%0A        var res = HTTP.get(url);%0A        if (res.statusCode !== 200) %7B%0A            throw new Error(%22Failed to load ShopifyAPI%22);%0A        %7D%0A%0A        eval(res.content);%0A        return this.ShopifyApp;%0A    %7D%0A%7D;%0A%0A

Add Shopify.getEmbeddedAppAPI.