Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide overloaded withStandardCard(StandardCard card) method for ResponseBuilder #148

Closed
paulschuetz opened this issue Oct 5, 2018 · 3 comments

Comments

@paulschuetz
Copy link

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

ResponseBuilder should provide an overloading of the withStandardCard(String title, String text, Image image) method, where I can just pass in a preconstructed StandardCard.

Current Behavior

I have a class with preconstructured Card's and I can not just pass them into the withStandardCard method, so I have to manually set heading, text and image every time.

Steps to Reproduce (for bugs)

// Provide a self-contained, concise snippet of code
// For more complex issues provide a repo with the smallest sample that reproduces the bug
// Including business logic or unrelated code makes diagnosis more difficult

Just construct a Response using the handlerInput's RequestBuilder

Possible Solution

// Not required, but suggest a fix/reason for the bug,
// or ideas how to implement the addition or change

Provide an overloading for the builder method

Your Environment

  • ASK Java SDK version used: 2.7.1
  • Operating System and version:
    Windows 10

Java Info

  • Java version used for development: Java 8
@nikhilym
Copy link
Contributor

nikhilym commented Oct 5, 2018

Hey @paulschuetz , thanks for the feature request. We will look into adding this function in the Response Builder

@Chris-Liao
Copy link
Contributor

Hey @paulschuetz, we've added a withCard method in ResponseBuilder so that you can pass pre-constructed Card object or its subclass like SimpleCard and StandardCard into response.
This pull request #155 has been merged, we will include it in next release. Please stay tuned.

@paulschuetz
Copy link
Author

Great! Thanks for implementing my desired functionality 👍

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

No branches or pull requests

3 participants