Package 

Object QueryParameterBuilder


  • 
    public class QueryParameterBuilder
    
                        

    Project Name: OSMOS-Android-SDK File Name: QueryParameterBuilder

    Utility class to build query parameters for API requests. Consolidates common query parameter building logic to reduce code duplication.

    • Method Detail

      • buildDisplayAdParams

         final Map<String, Object> buildDisplayAdParams(String clientId, Boolean isDisplayAuAds, String cliUbid, String pageType, Integer productCount, List<String> adUnits, Map<String, Object> targetingParams, String functionName)

        Builds query parameters for display ad requests.

        Parameters:
        clientId - Client identifier for authentication
        isDisplayAuAds - Flag to determine if ads are fetched using Ad Units
        cliUbid - Unique client identifier
        pageType - Type of page requesting ads
        productCount - Number of products to display ads for
        adUnits - List of ad unit identifiers (optional)
        targetingParams - Optional targeting parameters for ad filtering
        functionName - Optional function name parameter
      • buildPlaAdParams

         final Map<String, Object> buildPlaAdParams(String clientId, String cliUbid, String pageType, Integer productCount, String pageName, Map<String, Object> filters, String functionName)

        Builds query parameters for PLA ad requests.

        Parameters:
        clientId - Client identifier for authentication
        cliUbid - Unique identifier for the client session
        pageType - The type of the page requesting the ads
        productCount - The number of products to display ads for
        pageName - Optional name of the page
        filters - Optional map containing filter criteria
        functionName - Optional function name parameter
      • buildTpaAdData

         final Map<String, Object> buildTpaAdData(String clientId, String cliUbid, Integer productCount, List<Object> skuIds, String pageName, Map<String, Object> filters)

        Builds TPA ad request data map.

        Parameters:
        clientId - Client identifier for authentication
        cliUbid - Unique identifier for the client session
        productCount - Number of products to display ads for
        skuIds - List of SKU identifiers
        pageName - Optional name of the page
        filters - Optional map containing filter criteria
      • mergeParams

         final Map<String, Object> mergeParams(Map<String, Object> baseParams, Map<String, Object> newParams)

        Merges extra parameters into base parameters. Public utility method that external apps might use.

        Parameters:
        baseParams - The base parameters for the event
        newParams - Additional parameters to be added