Skip to content

Request to add array and modeling example#20

Open
MinChengVivLabs wants to merge 3 commits intobixbydevelopers:masterfrom
MinChengVivLabs:master
Open

Request to add array and modeling example#20
MinChengVivLabs wants to merge 3 commits intobixbydevelopers:masterfrom
MinChengVivLabs:master

Conversation

@MinChengVivLabs
Copy link

Finished major naming conversion and JS syntax changes.

Please review.

@rogerkibbe rogerkibbe requested review from jatinbviv and siamakh June 5, 2019 01:19
Copy link
Contributor

@siamakh siamakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just some minor comments.

The purpose of this sample capsule is to demonstrate how Bixby actions and views handle array of objects (both primitive and structured concepts)

- No actual API calls, only fixed lookup in /code/lib/lib.js
- max (One) or max (Many) determines the argument type in linked JS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I understand, what is a linked JS? maybe best to have someone from docs team proof read the readme.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, definitely requires DOC's help on the README.md

What I meant by linked JS, is the Javascript file linked to the action in endpoints files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I trust that you will run it by them later

array/README.md Outdated
- It is very similar to `CallOneContact`, except `max (Many)`
- Takes a single or multiple objects of `Contact`, and pass such object(s) to JS as an array of objects
- Try utterance like "conference call simon" and "conference call paul and simon"
- StructContact.view.bxb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to Contact.view.bxb

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to change that. Done.

module.exports.function = function callOneContact (contact) {
// this handles only a single contact
return 'Dialing ' + contact.number + ' for ' + contact.name;
// when linked contact (input property in action) set max (One), the follow code does NOT work
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what "linked contact" means

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix comments in both JS file.
Done.

@@ -0,0 +1,11 @@
action (GetContactByName) {
description (fetch contact structure by contact name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just simply say "Search contacts by name"? Using the word "fetch" on a "search" action can be confusing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@siamakh siamakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just make sure docs reviews the readme... and don't forget my Biscotti

Copy link

@Kryslynn93 Kryslynn93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approvws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants