Skip to content

Instantly share code, notes, and snippets.

@datasciencemonkey
Created September 30, 2020 03:08
Show Gist options
  • Save datasciencemonkey/a079417f9a69916c86f55e796e9572fe to your computer and use it in GitHub Desktop.
Save datasciencemonkey/a079417f9a69916c86f55e796e9572fe to your computer and use it in GitHub Desktop.
Calling ESP from TV companion app
import 'networking.dart';
import '../constants/esp_settings.dart';
const esp_rec_model_url =
'$hostname:$http_port/SASESP/events/Recommendation_Engine/cq1/Final_Recommendation';
class RecommendationModel {
Future<dynamic> getRecommendation(String id) async {
NetworkHelper networkHelper =
NetworkHelper('$esp_rec_model_url?filter=in(cust_id,$id)');
var recommendationData = await networkHelper.getData();
print(recommendationData);
return recommendationData;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment