Skip to content

Commit

Permalink
Merge pull request #7 from juanprado/master
Browse files Browse the repository at this point in the history
Skipping the marco rubio text
  • Loading branch information
chrisdevwords committed Jan 14, 2017
2 parents cf7ba8b + 6441e02 commit a4f53b9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,17 @@ app.intent('FindByAddress', { slots, utterances },
getMembersByAddress(address)
.then((data) => {
const { message } = parseDataToMessage(data);
const card = {
type: 'Simple',
title: 'Your Members of Congress',
content: message
}

session.set('address', address);
session.set('data', data);
res
.say(message)
.card(card)
.shouldEndSession(false)
.send()
})
Expand Down Expand Up @@ -80,8 +87,15 @@ app.intent('AMAZON.YesIntent', (req, res) => {
getBulkContactMessage(names)
.then(parseBulkMessages)
.then((message) => {
const card = {
type: 'Simple',
title: 'Their Contact Info',
content: message
}

res
.say(message)
.card(card)
.shouldEndSession(true)
.send();
})
Expand Down
2 changes: 1 addition & 1 deletion src/serivce-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function parseDataToMessage(result) {

const message = `Your representative is ${representative.name} ` +
`${partyHash[representative.party]}, ` +
`Your senior senator is ${orderSenators[1].name}` +
`Your senior senator is ${orderSenators[1].name} ` +
`${partyHash[orderSenators[1].party]}, and ` +
`Your junior senator is ${orderSenators[0].name} ` +
`${partyHash[orderSenators[0].party]}. ` +
Expand Down
2 changes: 1 addition & 1 deletion test/test_service-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('The Service Helper Methods', () => {

describe('send SMS message', () => {

context('with a valid message', () => {
context.skip('with a valid message', () => {
it('sends a valid message', (done) => {
sendBulkMessage('Marco Rubio here! I am a lego figure')
.then((result) => {
Expand Down

0 comments on commit a4f53b9

Please sign in to comment.