chatfuel-api
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -7,2 +7,4 @@ 'use strict'; | ||
var urlButton = function urlButton(url, title) { | ||
var extensions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
if (!url) { | ||
@@ -19,3 +21,4 @@ throw new Error('Expected a url parameter'); | ||
url: url, | ||
title: title | ||
title: title, | ||
messenger_extensions: extensions | ||
}; | ||
@@ -22,0 +25,0 @@ |
{ | ||
"name": "chatfuel-api", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "A library to simplify sending messages and broadcasts to a Chatfuel bot", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -9,2 +9,6 @@ # chatfuel-api | ||
## Requirements | ||
Node version 6 and later are required. Earlier versions are not supported. | ||
## Install | ||
@@ -24,3 +28,5 @@ | ||
TODO | ||
``` | ||
import { Chatfuel, broadcast } from 'chatfuel-api'; | ||
``` | ||
@@ -27,0 +33,0 @@ ## Tests |
@@ -199,2 +199,3 @@ import Chatfuel from '../src/chatfuel'; | ||
title: 'Url Button', | ||
messenger_extensions: false, | ||
}, | ||
@@ -303,2 +304,3 @@ ], | ||
title: 'URL Button', | ||
messenger_extensions: false, | ||
}, | ||
@@ -355,2 +357,3 @@ { | ||
title: 'Button 1', | ||
messenger_extensions: false, | ||
}, | ||
@@ -399,2 +402,3 @@ ], | ||
title: 'Button 1', | ||
messenger_extensions: false, | ||
}, | ||
@@ -405,2 +409,3 @@ { | ||
title: 'Button 2', | ||
messenger_extensions: false, | ||
}, | ||
@@ -418,2 +423,3 @@ ], | ||
title: 'Button 1', | ||
messenger_extensions: false, | ||
}, | ||
@@ -424,2 +430,3 @@ { | ||
title: 'Button 2', | ||
messenger_extensions: false, | ||
}, | ||
@@ -468,2 +475,3 @@ ], | ||
title: 'Button 1', | ||
messenger_extensions: false, | ||
}, | ||
@@ -517,2 +525,3 @@ ], | ||
title: 'Button 1', | ||
messenger_extensions: false, | ||
}, | ||
@@ -523,2 +532,3 @@ { | ||
title: 'Button 2', | ||
messenger_extensions: false, | ||
}, | ||
@@ -536,2 +546,3 @@ ], | ||
title: 'Button 1', | ||
messenger_extensions: false, | ||
}, | ||
@@ -542,2 +553,3 @@ { | ||
title: 'Button 2', | ||
messenger_extensions: false, | ||
}, | ||
@@ -552,2 +564,3 @@ ], | ||
url: 'https://test.com/read', | ||
messenger_extensions: false, | ||
}, | ||
@@ -745,2 +758,3 @@ ], | ||
title: 'URL Button', | ||
messenger_extensions: false, | ||
}, | ||
@@ -747,0 +761,0 @@ { |
@@ -19,3 +19,3 @@ import urlButton from '../../../src/types/buttons/urlButton'; | ||
const testUrl = 'https://test.com/test/'; | ||
const response = urlButton(testUrl, 'Test Title'); | ||
const response = urlButton(testUrl, 'Test Title', true); | ||
@@ -26,4 +26,5 @@ expect(response).to.deep.equal({ | ||
title: 'Test Title', | ||
messenger_extensions: true, | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86406
2105
48