package Ġme . ch ill . queries . player Ċ Ċ import Ġcom . ne ov ision aries . i 1 8 n . CountryCode Ċ import Ġme . ch ill . models . Currently Playing Ċ import Ġme . ch ill . queries . Abstract Query Ċ import Ġme . ch ill . utility . extensions . read Ċ import Ġme . ch ill . utility . request . Request Method Ċ Ċ class ĠGet Currently Playing Track Query Ġprivate Ġconstructor ( ĊĠ Ġprivate Ġval ĠaccessToken : ĠString , ĊĠ Ġprivate Ġval Ġmarket : ĠString ?) Ġ: ĠAbstract Query < Currently Playing ? >( accessToken , ĠRequestMethod . Get , Ġ" me ", Ġ" player ", Ġ" currently - playing ") Ġ{ ĊĊĠ Ġoverride Ġfun Ġexecute (): ĠCurrently Playing ? Ġ{ ĊĠĠĠ Ġval Ġresponse Ġ= Ġquery ( map Of (" market " Ġto Ġmarket )) ĊĊĠĠĠ Ġif Ġ( response . statusCode Ġ== Ġ 2 0 4 ) Ġreturn Ġnull ĊĊĠĠĠ Ġreturn Ġgson . read ( response . text ) ĊĠ Ġ} ĊĊĠ Ġclass ĠBuilder ( private Ġval ĠaccessToken : ĠString ) Ġ{ ĊĠĠĠ Ġprivate Ġvar Ġmarket : ĠCountry Code ? Ġ= Ġnull ĊĊĠĠĠ Ġfun Ġmarket ( market : ĠCountry Code ): ĠBuilder Ġ{ ĊĠĠĠĠĠ Ġthis . market Ġ= Ġmarket ĊĠĠĠĠĠ Ġreturn Ġthis ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġbuild () Ġ= ĠGet Currently Playing Track Query ( accessToken , Ġmarket ?. alpha 2 ) ĊĠ Ġ} Ċ }