Closed yoichiro closed 6 years ago
@Canain I have changed the alias approach to adding methods simply. I would like you to check the following:
start()
alias method: https://github.com/actions-on-google/actions-on-google-testing-nodejs/pull/11/files#diff-59d7d620304bea33809f81e10d79406eR287startWith()
alias method: https://github.com/actions-on-google/actions-on-google-testing-nodejs/pull/11/files#diff-59d7d620304bea33809f81e10d79406eR298cancel()
alias method: https://github.com/actions-on-google/actions-on-google-testing-nodejs/pull/11/files#diff-59d7d620304bea33809f81e10d79406eR306@Fleker can you take a look and see if it works for you?
I do like the more concise methods, although I am hesitant to start creating a bunch of aliases for methods before we even get to a v1 as it'll end up cluttering the API.
Maybe we should use these new methods as the default way and deprecate the current versions. We can accept the aliasing for now, with a plan to remove those verbose method names in a v1 release.
@Fleker @Canain Thank you for the confirmation. Ok, I intend to change my code to the following:
@deprecated
annotation on the original methods to represent that the original methods will be removed.I would like you to review again after I change and commit them.
@Fleker @Canain Could you review the following commits?
@Fleker I have just changed codes you mentioned. Could you review diffs 3086897 5d3dbd4 1336a5e again? BTW, I removed method names which are deprecated from the README.md at 1336a5e to navigate to use the new simple methods.
@atulep what do you think? It looks fine to me.
@atulep Could you confirm this?
@atulep Thank you for the reviewing. Both answers of the questions are yes. I do them.
@atulep Could you review their changes below?
@atulep Thank you for the reviewing!
@Fleker @Canain Could you do this final judgement?
Yeah this looks good to me.
Looks good to me.
@Canain @Fleker @atulep Thanks, guys. Can somebody merge this to the master branch? :)
I ran the tests and everything is good. We'll do the merge and release on Monday, so as not to break things over the weekend. :grin:
@Fleker Ok, have an enjoy your weekend!
This pull request will fix #8.
What is this pull request
In this current version, the names of APIs tend to be verbose. Especially, they are the followings:
startConversation()
,startConversationWith()
endConversation()
setLocale()
In this pull request, these aliases are provided. That is, the following APIs are provided:
start()
,startWith()
cancel()
locale
(used asaction.locale = 'ja-JP'
)How to implement them
For adding the
locale
property, I will add a new definition of thelocale
setter method into theActionsOnGoogle
class.For adding the alias methods, I will add the alias method definitions to the
prototype
of theActionsOnGoogle
class.