sj_dev
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020
05:05 AM
Call APIs from the Task Node
Please help me in understanding below two scenarios
Scenario 1.
Task.brs
Function GetCloudData()
Data = FetchData()
End Function
Service.brs
Function FetchData()
'Actual API call
End Function
Scenario 2.
Task.brs
Function GetCloudData()
Data = GetInterface().FetchData()
End Function
Service.brs
Function GetInterface()
Return {
FetchData: Interface_FetchData
}
End Function
Function Interface_FetchData()
'Actual API call
End Function
Is there any difference between the two. Does using any of the two scenarios cause memory impact?