package Ġdev . de wy . y gg dr as il . tests Ċ Ċ import Ġdev . de wy . y gg dr as il . sync . Sync Y gg dr as il . authenticate Ċ import Ġdev . de wy . y gg dr as il . sync . Sync Y gg dr as il Client Ċ Ċ const Ġval ĠSY NC _ USERNAME Ġ= Ġ" username Ġ( email , ĠI GN Ġfor Ġun migr ated Ġaccounts )" Ċ const Ġval ĠSY NC _ PASSWORD Ġ= Ġ" password " Ċ Ċ /** Ċ Ġ* ĠA Ġsimple Ġexample Ġof Ġhow Ġto Ġuse Ġthe Ġsynchronous Ġ** y gg dr as il ** Ġlibrary Ġin ĠKotlin . Ċ Ġ* ĠIt 's Ġgenerally Ġrecommended Ġyou Ġuse Ġthe Ġasync Ġway Ġof Ġdoing Ġthings Ġwhen Ġusing ĠKotlin ; Ġsee Ġ** Async Example **. Ċ Ġ* Ċ Ġ* Ġ@ author Ġde wy Ċ Ġ*/ Ċ fun Ġmain () Ġ{ ĊĠĠĠ Ġ// ĠGame . M INE CR AFT Ġand ĠUUID . random Uuid () Ġare Ġthe Ġdefault Ġparameters Ġafter Ġ* password * Ġhere . ĊĠĠĠ Ġval Ġpair Ġ= Ġauthenticate ( SYNC _ USERNAME , ĠSY NC _ PASSWORD ) ĊĊĠĠĠ Ġ// ĠIt 's Ġrecommended Ġyou Ġuse Ġan ĠY gg dr as il Client Ġinstead Ġof Ġmaking Ġmore Ġlow - level ĠY gg dr as il . wh atever () Ġrequests Ġyourself . ĊĠĠĠ Ġval Ġclient Ġ= ĠSync Y gg dr as il Client ( SYNC _ USERNAME , ĠSY NC _ PASSWORD ) ĊĊĠĠĠ Ġprintln ( pair ) ĊĠĠĠ Ġclient . token Pair Ġ= Ġpair ĊĊĠĠĠ Ġclient . refresh () ĊĠĠĠ Ġprintln ( client . token Pair ) Ċ } Ċ