package com.sonymusic.dx.dxadvsearchservice.controllers;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.sonymusic.dx.dxadvsearchservice.service.LabelService;

@RestController
@RequestMapping("/label")
public class LabelController {

    @Autowired
    LabelService labelService;

    @GetMapping("/all")
    private Map<String,Object> getListOfLabel(@RequestParam(required = false) String name,
                                              @RequestParam(defaultValue = "1")int page,
                                              @RequestParam(defaultValue = "20")int size){
        return labelService.getListOfLabels(name,page,size);
    }

}
