package cz.senslog.connector.push.theros;

import cz.senslog.connector.model.api.GeoJsonModel;
import cz.senslog.connector.model.config.DefaultConfig;
import cz.senslog.connector.push.api.ConnectorPusher;
import cz.senslog.connector.tools.http.HttpClient;

public class ConnectorPushTherosProvider implements cz.senslog.connector.push.api.ConnectorPushProvider {

    @Override
    public ConnectorPusher<GeoJsonModel> createPusher(DefaultConfig defaultConfig) {
        TherosConfig config = new TherosConfig(defaultConfig);

        AuthService authService = new AuthService(config.getAuthConfig(), HttpClient.newHttpSSLClient());

        return new TherosPusher(config, authService, HttpClient.newHttpSSLClient());
    }
}
