package Ġname . al atus h kin . api . vk . api Ċ Ċ import Ġcom . fasterxml . jackson . databind . Java Type Ċ import Ġname . al atus h kin . api . vk . Method Executor Ċ import Ġname . al atus h kin . api . vk . Method Executor With Exception Ċ import Ġname . al atus h kin . api . vk . Vk Method Ċ import Ġname . al atus h kin . api . vk . api . methods . Execute Method Ċ Ċ suspend Ġinline Ġoperator Ġfun Ġ< re ified ĠT , ĠM Ġ: ĠVk Method < T >> ĠMethod Executor . invoke ( methods : ĠList < M >): ĠVk Response < Array < T >> Ġ{ ĊĠĠĠ Ġval Ġmethod To Call Ġ= Ġmake Vk Script To Call ( methods ) ĊĠĠĠ Ġreturn Ġthis ( method To Call ) Ċ } Ċ Ċ suspend Ġinline Ġoperator Ġfun Ġ< re ified ĠT , ĠM Ġ: ĠVk Method < T >> ĠMethod Executor With Exception . invoke ( methods : ĠList < M >): ĠArray < T > Ġ{ ĊĠĠĠ Ġval Ġmethod To Call Ġ= Ġmake Vk Script To Call ( methods ) ĊĠĠĠ Ġreturn Ġthis ( method To Call ) Ċ } Ċ Ċ inline Ġfun Ġ< M Ġ: ĠVk Method < T >, Ġre ified ĠT > Ġmake Vk Script To Call ( methods : ĠList < M >): ĠExecute Method < Array < T >> Ġ{ ĊĠĠĠ Ġassert ( methods . size Ġ<= Ġ 2 5 ) Ġ{ Ġ" Maximum Ġ 2 5 Ġcall Ġat Ġone Ġallowed Ġby Ġapi " Ġ} ĊĠĠĠ Ġval Ġmapper Ġ= ĠExecute Method . mapper ĊĊĠĠĠ Ġval Ġcode Ġ= Ġmethods . join ToString (", Ġ", Ġprefix Ġ= Ġ" return Ġ[ ", Ġpostfix Ġ= Ġ" ]; ") ĊĠĠĠ Ġ{ Ġmethod Ġ-> ĊĠĠĠĠĠĠĠ Ġval Ġargs Json Ġ= Ġmapper . writeValue AsString ( method . to JsonObject ()) ĊĠĠĠĠĠĠĠ Ġ" API ." Ġ+ Ġmethod . api MethodName Ġ+ Ġ" ($ args Json )" ĊĠĠĠ Ġ} ĊĠĠĠ Ġval Ġarray Type : ĠJava Type Ġ= Ġmapper . type Factory . construct ArrayType ( T :: class . java ) ĊĠĠĠ Ġreturn ĠExecute Method ( code , Ġarray Type ) Ċ }