-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arlind
committed
Aug 18, 2022
1 parent
ff4f379
commit 41d964e
Showing
7 changed files
with
213 additions
and
59 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.mojo.myapplication | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
|
||
data class Breed( | ||
|
||
@SerializedName("weight") var weight: Weight? = Weight(), | ||
@SerializedName("id") var id: String? = null, | ||
@SerializedName("name") var name: String? = null, | ||
@SerializedName("cfa_url") var cfaUrl: String? = null, | ||
@SerializedName("vetstreet_url") var vetstreetUrl: String? = null, | ||
@SerializedName("vcahospitals_url") var vcahospitalsUrl: String? = null, | ||
@SerializedName("temperament") var temperament: String? = null, | ||
@SerializedName("origin") var origin: String? = null, | ||
@SerializedName("country_codes") var countryCodes: String? = null, | ||
@SerializedName("country_code") var countryCode: String? = null, | ||
@SerializedName("description") var description: String? = null, | ||
@SerializedName("life_span") var lifeSpan: String? = null, | ||
@SerializedName("indoor") var indoor: Int? = null, | ||
@SerializedName("lap") var lap: Int? = null, | ||
@SerializedName("alt_names") var altNames: String? = null, | ||
@SerializedName("adaptability") var adaptability: Int? = null, | ||
@SerializedName("affection_level") var affectionLevel: Int? = null, | ||
@SerializedName("child_friendly") var childFriendly: Int? = null, | ||
@SerializedName("dog_friendly") var dogFriendly: Int? = null, | ||
@SerializedName("energy_level") var energyLevel: Int? = null, | ||
@SerializedName("grooming") var grooming: Int? = null, | ||
@SerializedName("health_issues") var healthIssues: Int? = null, | ||
@SerializedName("intelligence") var intelligence: Int? = null, | ||
@SerializedName("shedding_level") var sheddingLevel: Int? = null, | ||
@SerializedName("social_needs") var socialNeeds: Int? = null, | ||
@SerializedName("stranger_friendly") var strangerFriendly: Int? = null, | ||
@SerializedName("vocalisation") var vocalisation: Int? = null, | ||
@SerializedName("experimental") var experimental: Int? = null, | ||
@SerializedName("hairless") var hairless: Int? = null, | ||
@SerializedName("natural") var natural: Int? = null, | ||
@SerializedName("rare") var rare: Int? = null, | ||
@SerializedName("rex") var rex: Int? = null, | ||
@SerializedName("suppressed_tail") var suppressedTail: Int? = null, | ||
@SerializedName("short_legs") var shortLegs: Int? = null, | ||
@SerializedName("wikipedia_url") var wikipediaUrl: String? = null, | ||
@SerializedName("hypoallergenic") var hypoallergenic: Int? = null, | ||
@SerializedName("reference_image_id") var referenceImageId: String? = null | ||
|
||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.mojo.myapplication | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class Cat( | ||
@SerializedName("breeds") var breeds: ArrayList<Breed> = arrayListOf(), | ||
@SerializedName("id") var id: String, | ||
@SerializedName("url") var url: String, | ||
@SerializedName("width") var width: Int, | ||
@SerializedName("height") var height: Int | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
package com.mojo.myapplication | ||
|
||
val catJson = """ | ||
[ | ||
{ | ||
"breeds": [], | ||
"id": "76j", | ||
"url": "https://cdn2.thecatapi.com/images/76j.jpg", | ||
"width": 500, | ||
"height": 500 | ||
}, | ||
{ | ||
"breeds": [], | ||
"id": "ap2", | ||
"url": "https://cdn2.thecatapi.com/images/ap2.jpg", | ||
"width": 640, | ||
"height": 415 | ||
}, | ||
{ | ||
"breeds": [], | ||
"id": "c84", | ||
"url": "https://cdn2.thecatapi.com/images/c84.jpg", | ||
"width": 900, | ||
"height": 608 | ||
}, | ||
{ | ||
"breeds": [], | ||
"id": "cek", | ||
"url": "https://cdn2.thecatapi.com/images/cek.png", | ||
"width": 765, | ||
"height": 1024 | ||
}, | ||
{ | ||
"breeds": [], | ||
"id": "MTU3NzIzNw", | ||
"url": "https://cdn2.thecatapi.com/images/MTU3NzIzNw.jpg", | ||
"width": 1280, | ||
"height": 960 | ||
}, | ||
{ | ||
"breeds": [ | ||
{ | ||
"weight": { | ||
"imperial": "6 - 15", | ||
"metric": "3 - 7" | ||
}, | ||
"id": "birm", | ||
"name": "Birman", | ||
"cfa_url": "http://cfa.org/Breeds/BreedsAB/Birman.aspx", | ||
"vetstreet_url": "http://www.vetstreet.com/cats/birman", | ||
"vcahospitals_url": "https://vcahospitals.com/know-your-pet/cat-breeds/birman", | ||
"temperament": "Affectionate, Active, Gentle, Social", | ||
"origin": "France", | ||
"country_codes": "FR", | ||
"country_code": "FR", | ||
"description": "The Birman is a docile, quiet cat who loves people and will follow them from room to room. Expect the Birman to want to be involved in what you’re doing. He communicates in a soft voice, mainly to remind you that perhaps it’s time for dinner or maybe for a nice cuddle on the sofa. He enjoys being held and will relax in your arms like a furry baby.", | ||
"life_span": "14 - 15", | ||
"indoor": 0, | ||
"lap": 1, | ||
"alt_names": "Sacred Birman, Sacred Cat Of Burma", | ||
"adaptability": 5, | ||
"affection_level": 5, | ||
"child_friendly": 4, | ||
"dog_friendly": 5, | ||
"energy_level": 3, | ||
"grooming": 2, | ||
"health_issues": 1, | ||
"intelligence": 3, | ||
"shedding_level": 3, | ||
"social_needs": 4, | ||
"stranger_friendly": 3, | ||
"vocalisation": 1, | ||
"experimental": 0, | ||
"hairless": 0, | ||
"natural": 0, | ||
"rare": 0, | ||
"rex": 0, | ||
"suppressed_tail": 0, | ||
"short_legs": 0, | ||
"wikipedia_url": "https://en.wikipedia.org/wiki/Birman", | ||
"hypoallergenic": 0, | ||
"reference_image_id": "HOrX5gwLS" | ||
} | ||
], | ||
"id": "HOrX5gwLS", | ||
"url": "https://cdn2.thecatapi.com/images/HOrX5gwLS.jpg", | ||
"width": 1376, | ||
"height": 814 | ||
}, | ||
{ | ||
"breeds": [], | ||
"id": "BjXI8y9gY", | ||
"url": "https://cdn2.thecatapi.com/images/BjXI8y9gY.jpg", | ||
"width": 2048, | ||
"height": 1536 | ||
}, | ||
{ | ||
"breeds": [], | ||
"id": "BBWwHY9Qg", | ||
"url": "https://cdn2.thecatapi.com/images/BBWwHY9Qg.jpg", | ||
"width": 225, | ||
"height": 225 | ||
}, | ||
{ | ||
"breeds": [], | ||
"id": "ng-IfW1Lq", | ||
"url": "https://cdn2.thecatapi.com/images/ng-IfW1Lq.jpg", | ||
"width": 600, | ||
"height": 388 | ||
}, | ||
{ | ||
"breeds": [], | ||
"id": "mDK29Po8k", | ||
"url": "https://cdn2.thecatapi.com/images/mDK29Po8k.jpg", | ||
"width": null, | ||
"height": null | ||
} | ||
] | ||
""".trimIndent() |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.mojo.myapplication | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
|
||
data class Weight( | ||
|
||
@SerializedName("imperial") var imperial: String? = null, | ||
@SerializedName("metric") var metric: String? = null | ||
|
||
) |