Request to add array and modeling example#20
Request to add array and modeling example#20MinChengVivLabs wants to merge 3 commits intobixbydevelopers:masterfrom
Conversation
siamakh
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
I am not sure if I understand, what is a linked JS? maybe best to have someone from docs team proof read the readme.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Forgot to change that. Done.
array/code/CallOneContact.js
Outdated
| 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 |
There was a problem hiding this comment.
Not sure what "linked contact" means
There was a problem hiding this comment.
Fix comments in both JS file.
Done.
| @@ -0,0 +1,11 @@ | |||
| action (GetContactByName) { | |||
| description (fetch contact structure by contact name) | |||
There was a problem hiding this comment.
maybe just simply say "Search contacts by name"? Using the word "fetch" on a "search" action can be confusing.
Finished major naming conversion and JS syntax changes.
Please review.