Search in sources :

Example 1 with ApiV1

use of network.bisq.api.service.v1.ApiV1 in project bisq-api by mrosseel.

the class BisqApiApplication method run.

@Override
public void run(ApiConfiguration configuration, Environment environment) {
    BisqProxy bisqProxy = new BisqProxy(injector, shutdown);
    preferences.readPersisted();
    setupCors(environment);
    setupAuth(environment);
    environment.jersey().register(MultiPartFeature.class);
    setupHostAndPort(configuration, injector.getInstance(ApiEnvironment.class));
    final JerseyEnvironment jerseyEnvironment = environment.jersey();
    jerseyEnvironment.register(new ApiV1(bisqProxy));
    ExceptionMappers.register(jerseyEnvironment);
    environment.healthChecks().register("currency list size", new CurrencyListHealthCheck(bisqProxy));
}
Also used : CurrencyListHealthCheck(network.bisq.api.health.CurrencyListHealthCheck) JerseyEnvironment(io.dropwizard.jersey.setup.JerseyEnvironment) ApiEnvironment(network.bisq.api.app.ApiEnvironment) BisqProxy(network.bisq.api.BisqProxy) ApiV1(network.bisq.api.service.v1.ApiV1)

Example 2 with ApiV1

use of network.bisq.api.service.v1.ApiV1 in project bisq-api by mrosseel.

the class BisqApiApplication method run.

@Override
public void run(ApiConfiguration configuration, Environment environment) {
    BisqProxy bisqProxy = new BisqProxy(injector, accountAgeWitnessService, arbitratorManager, walletService, tradeManager, openOfferManager, offerBookService, p2PService, keyRing, user, feeService, preferences, bsqWalletService, walletsSetup, closedTradableManager, failedTradesManager, useDevPrivilegeKeys);
    preferences.readPersisted();
    setupCors(environment);
    final JerseyEnvironment jerseyEnvironment = environment.jersey();
    jerseyEnvironment.register(new ApiV1(bisqProxy));
    ExceptionMappers.register(jerseyEnvironment);
    environment.healthChecks().register("currency list size", new CurrencyListHealthCheck(bisqProxy));
}
Also used : CurrencyListHealthCheck(io.bisq.api.health.CurrencyListHealthCheck) JerseyEnvironment(io.dropwizard.jersey.setup.JerseyEnvironment) BisqProxy(io.bisq.api.BisqProxy) ApiV1(io.bisq.api.service.v1.ApiV1)

Aggregations

JerseyEnvironment (io.dropwizard.jersey.setup.JerseyEnvironment)2 BisqProxy (io.bisq.api.BisqProxy)1 CurrencyListHealthCheck (io.bisq.api.health.CurrencyListHealthCheck)1 ApiV1 (io.bisq.api.service.v1.ApiV1)1 BisqProxy (network.bisq.api.BisqProxy)1 ApiEnvironment (network.bisq.api.app.ApiEnvironment)1 CurrencyListHealthCheck (network.bisq.api.health.CurrencyListHealthCheck)1 ApiV1 (network.bisq.api.service.v1.ApiV1)1