Created
November 6, 2019 12:49
-
-
Save RoRoche/b5b081230510e2d7763e47bb17995e9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.json.JSONObject | |
class JsonRepo(private val jsonObject: JSONObject) : Repo { | |
override fun id(): Long = jsonObject.getLong("id") | |
override fun name(): String = jsonObject.getString("name") | |
override fun description(): String = jsonObject.getString("description") | |
override fun url(): String = jsonObject.getString("url") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment