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

Modify getImage API to return images for public and private skills #1036

Merged
merged 2 commits into from Jul 21, 2018

Conversation

4 participants
@hkedia321
Copy link
Member

hkedia321 commented Jul 21, 2018

Fixes #1031
Fixes #998

Changes:
In GetImageServlet.java file, make three conditions to fetch image for "public skill", "private skill", or from "local storage" depending on the parameters provided by the client.

  • For fetching image of a "public skill" the client has to provide the following parameters:
    • model
    • language
    • group
    • image

Example: http://localhost:4000/cms/getImage.png?model=general&language=en&group=Food%20and%20Drink&image=images/cooking_guide.png

  • For fetching image of a "private skill" the client has to provide the following parameters:
    • access_token
    • language
    • group
    • image

Example: http://localhost:4000/cms/getImage.png?access_token=k30RWlpTKvKM3TUiwi7E5a2bgtjJQa&language=en&group=Knowledge&image=images/susi%20icon.png

  • For fetching image from "local storage" the client has to provide the following parameters:
    • image

Example: http://localhost:4000/cms/getImage.png?image=963e84467b92c0916b27d157b1d45328/1529692996805_susi icon.png

@hkedia321 hkedia321 force-pushed the hkedia321:modifyGetImage branch 2 times, most recently from dc02f75 to 23c131b Jul 21, 2018

@DNS-404
Copy link
Member

DNS-404 left a comment

LGTM 👍

@DNS-404
Copy link
Member

DNS-404 left a comment

Sorry, didn't notice it before. We won't be able to pass user id from client side. We should pass access token in API call rather than user id. Please make appropriate changes. Thanks!

@hkedia321 hkedia321 force-pushed the hkedia321:modifyGetImage branch from 23c131b to f675dbd Jul 21, 2018

@hkedia321

This comment has been minimized.

Copy link
Member

hkedia321 commented Jul 21, 2018

@DNS-404 Thanks for pointing out that. Yes, access_token for fetching private skill's image would make more sense. Have made the change. Please review.

@DNS-404
Copy link
Member

DNS-404 left a comment

Nice!

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