-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
[rest] Added new Audio API #1020
Conversation
Signed-off-by: Laurent Garnier <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much. The code looks pretty good. Two minor comments.
Should we add a feature for it too? Like we did for the voice REST API?
openhab-core/features/karaf/openhab-core/src/main/feature/feature.xml
Lines 173 to 176 in fa416be
<feature name="openhab-core-io-rest-voice" version="${project.version}"> | |
<feature>openhab-core-base</feature> | |
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.rest.voice/${project.version}</bundle> | |
</feature> |
if (source != null) { | ||
return Response.ok(AudioMapper.map(source, locale)).build(); | ||
} else { | ||
return JSONResponse.createErrorResponse(Status.NOT_FOUND, "source not found"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return JSONResponse.createErrorResponse(Status.NOT_FOUND, "source not found"); | |
return JSONResponse.createErrorResponse(Status.NOT_FOUND, "Source not found"); |
if (sink != null) { | ||
return Response.ok(AudioMapper.map(sink, locale)).build(); | ||
} else { | ||
return JSONResponse.createErrorResponse(Status.NOT_FOUND, "sink not found"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return JSONResponse.createErrorResponse(Status.NOT_FOUND, "sink not found"); | |
return JSONResponse.createErrorResponse(Status.NOT_FOUND, "Sink not found"); |
Signed-off-by: Laurent Garnier <[email protected]>
Signed-off-by: Laurent Garnier <[email protected]>
I added the feature stuff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
A small unit test would be very nice 😉.
* Update eclipse.md Fix a few typos and improve readability. Signed-off-by: Matthew Skinner (Skinah) <[email protected]> * Added newline Signed-off-by: Jerome Luckenbach <[email protected]>
* New Audio REST API Signed-off-by: Laurent Garnier <[email protected]> GitOrigin-RevId: cf4b752
Signed-off-by: Laurent Garnier [email protected]