-
Notifications
You must be signed in to change notification settings - Fork 3
Services
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.
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.
// Defining and adding to global services.
FluentOlapConfiguration.ServiceDefinitions = new ServiceDefinitions {
["SomeService"] = HttpService service = new HttpService("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();
PopulationResult result = analyzer.PopulateAsync(new HttpServiceOptions {
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.
FluentOlap is still growing and will continue to become more stable over time.