mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
20 lines
471 B
Java
20 lines
471 B
Java
package de.grimsi.gameyfin.mapper;
|
|
|
|
import com.igdb.proto.Igdb;
|
|
import de.grimsi.gameyfin.entities.Theme;
|
|
|
|
import java.util.List;
|
|
|
|
public class ThemeMapper {
|
|
public static Theme toTheme(Igdb.Theme g) {
|
|
return Theme.builder()
|
|
.slug(g.getSlug())
|
|
.name(g.getName())
|
|
.build();
|
|
}
|
|
|
|
public static List<Theme> toThemes(List<Igdb.Theme> g) {
|
|
return g.stream().map(ThemeMapper::toTheme).toList();
|
|
}
|
|
}
|