Skip to content

Commit

Permalink
docs: update examples in testbed and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Feb 17, 2017
1 parent 49d4599 commit 29ba593
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,11 @@
$ipad_url: 'http://www.example.com/ipad',
$deeplink_path: 'content/123',
$match_duration: 2000,
more_custom: 'data',
even_more_custom: true,
this_is_custom: 41231,
this_is_date: Date.now()
custom_string: 'data',
custom_integer: Date.now(),
custom_boolean: true,
custom_array: [1, 2, 3, 4, 5],
custom_object: { 'random': 'dictionary' }
}

branchUniversalObj.generateShortUrl(analytics, properties).then(function (res) {
Expand Down Expand Up @@ -375,9 +376,11 @@
// optional fields
var properties = {
$desktop_url: 'http://www.example.com/desktop',
more_custom: 'data',
even_more_custom: true,
this_is_custom: 41231
custom_string: 'data',
custom_integer: Date.now(),
custom_boolean: true,
custom_array: [1, 2, 3, 4, 5],
custom_object: { 'random': 'dictionary' }
}

var message = 'Check out this link'
Expand Down Expand Up @@ -734,7 +737,7 @@
| stage | | Use this to categorize the progress or category of a user when the link was generated. For example, if you had an invite system accessible on level 1, level 3 and 5, you could differentiate links generated at each level with this parameter
| tags | | This is a free form entry with unlimited values `["string"]`. Use it to organize your link data with labels that don’t fit within the bounds of the above
| alias | | Specify a link alias in place of the standard encoded short URL e.g. `yourdomain.com/youralias`. Link aliases are unique, immutable objects that cannot be deleted. You cannot change the alias of existing links. Aliases on the legacy `bnc.lt` domain are incompatible with Universal Links and Spotlight
| type | `0` | Set to `1` to limit deep linking behavior of the generated link to a single use. Set type to `2` to make the link show up under [Marketing Dashboard](https://dashboard.branch.io/marketing) while adding `$marketing_title` to `data`.
| type | `0` | Set to `1` to limit deep linking behavior of the generated link to a single use. Set type to `2` to make the link show up under [Marketing Dashboard](https://dashboard.branch.io/marketing) while adding `$marketing_title` to `data`. Must be an `int`

- Properties

Expand Down
17 changes: 10 additions & 7 deletions testbed/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,11 @@ function BranchDeepLink () {
$ipad_url: 'http://www.example.com/ipad',
$deeplink_path: 'content/123',
$match_duration: 2000,
more_custom: 'data',
even_more_custom: true,
this_is_custom: 41231,
this_is_date: Date.now()
custom_string: 'data',
custom_integer: Date.now(),
custom_boolean: true,
custom_array: [1, 2, 3, 4, 5],
custom_object: { 'random': 'dictionary' }
}

// needs a universal object
Expand Down Expand Up @@ -222,9 +223,11 @@ function BranchShareSheet () {
// optional fields
var properties = {
$desktop_url: 'http://www.example.com/desktop',
more_custom: 'data',
even_more_custom: true,
this_is_custom: 41231
custom_string: 'data',
custom_integer: Date.now(),
custom_boolean: true,
custom_array: [1, 2, 3, 4, 5],
custom_object: { 'random': 'dictionary' }
}

var message = 'Check out this link'
Expand Down

0 comments on commit 29ba593

Please sign in to comment.