All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sportradar.unifiedodds.sdk.MarketDescriptionManager Maven / Gradle / Ivy

/*
 * Copyright (C) Sportradar AG. See LICENSE for full license governing this code
 */

package com.sportradar.unifiedodds.sdk;

import com.sportradar.unifiedodds.sdk.entities.markets.MarketDescription;
import com.sportradar.unifiedodds.sdk.entities.markets.MarketMappingData;
import com.sportradar.unifiedodds.sdk.oddsentities.Producer;

import java.util.List;
import java.util.Locale;
import java.util.Map;

/**
 * Used to obtain information about available markets and get translations for markets and outcomes
 * including outrights
 */
public interface MarketDescriptionManager {

    /**
     * Returns the list of all available static market descriptions.
     * 
     * @return a list of available static market descriptions
     */
    List getMarketDescriptions();

    /**
     * Returns the list of all available static market descriptions in the provided {@link Locale}
     *
     * @param locale the language in which the market static descriptions should be translated
     * @return a list of available market descriptions in the provided {@link Locale}
     */
    List getMarketDescriptions(Locale locale);

    /**
     * Returns a list of available mappings for the provided marketId/producer combination
     *
     * @param marketId the id of the market for which you need the mapping
     * @param producer the producer for which you need the mapping
     * @return a list of valid mappings for the provided marketId/producer combination
     */
    List getMarketMapping(int marketId, Producer producer);

    /**
     * Returns a list of available market mappings(including possible variant mappings) for the
     * provided marketId/producer combination
     *
     * @param marketId the id of the market for which you need the mapping
     * @param specifiers the associated market specifiers
     * @param producer the producer for which you need the mapping
     * @return a list of valid mappings for the provided marketId/producer combination
     */
    List getMarketMapping(int marketId, Map specifiers, Producer producer);

    /// 
    /// Asynchronously loads the invariant and variant list of market descriptions from the Sports API
    /// 
    /// To be used when manually changed market data via betradar control
    /// Returns true if the action succeeded

    /**
     * Loads the invariant and variant list of market descriptions from the Sports API
     * @return true if the action succeeded
     */
    default boolean loadMarketDescriptions(){
        throw new UnsupportedOperationException("Method not implemented. Use derived type.");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy