From 8f71e9cd6d22efd94ddd496a3339ac39626dfb1a Mon Sep 17 00:00:00 2001 From: Ethan Neff Date: Fri, 18 Nov 2016 15:35:48 -0800 Subject: [PATCH] docs: style updates --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 014758d2..698b2d67 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ Branch.initSession().then(function(res) { console.log(res); }).catch(function(err) { - console.error(err); + alert('Error: ' + JSON.stringify(err)); }); ``` @@ -451,7 +451,7 @@ $ipad_url: 'www.ipad.com', more_custom: 'data', even_more_custom: true, - this_is_custom: 41231 + this_is_custom: 321 }; branchUniversalObj.generateShortUrl(analytics, properties).then(function(res) { @@ -601,11 +601,11 @@ -
Example (set) ```js - var userId = "email_or_id"; + var userId = 'email_or_id'; Branch.setIdentity(userId).then(function(res) { - alert(JSON.stringify(res)); + alert('Response: ' + JSON.stringify(res)); }).catch(function(err) { - alert(JSON.stringify(err)); + alert('Error: ' + JSON.stringify(err)); }); ```
@@ -677,6 +677,7 @@ alert('Error: ' + JSON.stringify(err)); }); ``` + ```js var amount = 10; Branch.redeemRewards(amount).then(function(res) { @@ -696,6 +697,7 @@ alert('Error: ' + JSON.stringify(err)); }); ``` + ```js Branch.loadRewards().then(function(res) { alert('Response: ' + JSON.stringify(res));