You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
shaheen-s edited this page Nov 4, 2020
·
2 revisions
Services are what FluentOlap uses during the population process and in the future may be used to
perform different tasks.
A Service is really anything that implements the abstract class Service<TIn, TOut>. However, in
the context of functionality in FluentOlap, they are used to perform tasks using their delegate
function, to retrieve data.
The only current maintained implementation in FluentOlap is the HttpService, described below.
HttpService
The HttpService uses template URLs to continuously and recursively make HTTP calls until all
sub-models' data are retrieved.
Its calls are supplemented with HttpServiceOptions, that may be just as simple defining the
initial parameters to fill in the template URL.
Example
// Defining and adding to global services.FluentOlapConfiguration.ServiceDefinitions=newServiceDefinitions{["SomeService"]=HttpService service =newHttpService("https://url.xyz/api/{number}");}// A Hypothetical class that inherits from AnalyzerObject<T>// If you are not familiar with analyzer objects, please take a look at the getting started section
HypotheticalAnalyzer analyzer =new HypotheticalAnalyzer();PopulationResultresult=analyzer.PopulateAsync(newHttpServiceOptions{Parameters={number=29}});// The call will be: GET https://url.xyz/api/29
Note: There are more options like specifying the HttpMethod. Details will be filled in as the
documentation grows.