Class: Api::V5::RecommendationsController
- Inherits:
-
BaseController
- Object
- ActionController::API
- BaseController
- Api::V5::RecommendationsController
- Defined in:
- app/controllers/api/v5/recommendations_controller.rb
Overview
Recommendations
Constant Summary
Constants inherited from BaseController
BaseController::CACHE_NAMESPACE, BaseController::INTERNAL_SERVER_ERROR_MESSAGE, BaseController::ResponseSchema
Instance Method Summary collapse
Methods inherited from BaseController
Methods included from LogrageCustomLogger
Methods included from ResponseCacheConcern
Instance Method Details
#show ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/api/v5/recommendations_controller.rb', line 6 def show clevertap_id = params[:id] url = "#{AdminSetting.hh_rec_host}api/v2/recommendation/#{clevertap_id}?page=1&size=10" response = Faraday.get url if response.status == 200 render json: response.body else render json: { message: 'clevertap id not found', success: false } end end |