From 5d1974739e19b82f06b0c7e46b89e479bb17ad20 Mon Sep 17 00:00:00 2001 From: shabinder Date: Sat, 25 Jul 2020 00:01:42 +0530 Subject: [PATCH] Models Added,Removed kaaes wrapper Dependency --- app/build.gradle | 2 -- .../musicForEveryone/models/Album.kt | 21 +++++++++++++++++++ .../musicForEveryone/models/Artist.kt | 9 ++++++++ .../musicForEveryone/models/Copyright.kt | 5 +++++ .../musicForEveryone/models/Episodes.kt | 21 +++++++++++++++++++ .../musicForEveryone/models/Followers.kt | 5 +++++ .../musicForEveryone/models/Image.kt | 6 ++++++ .../musicForEveryone/models/LinkedTrack.kt | 8 +++++++ .../musicForEveryone/models/PagingObject.kt | 10 +++++++++ .../musicForEveryone/models/Playlist.kt | 19 +++++++++++++++++ .../musicForEveryone/models/PlaylistTrack.kt | 7 +++++++ .../musicForEveryone/models/Token.kt | 7 +++++++ .../musicForEveryone/models/Track.kt | 21 +++++++++++++++++++ .../musicForEveryone/models/UserPrivate.kt | 14 +++++++++++++ .../musicForEveryone/models/UserPublic.kt | 11 ++++++++++ 15 files changed, 164 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/Album.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/Artist.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/Copyright.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/Episodes.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/Followers.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/Image.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/LinkedTrack.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/PagingObject.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/Playlist.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/PlaylistTrack.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/Token.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/Track.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/UserPrivate.kt create mode 100644 app/src/main/java/com/shabinder/musicForEveryone/models/UserPublic.kt diff --git a/app/build.gradle b/app/build.gradle index 249a185c..5d62c3ac 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,8 +63,6 @@ dependencies { implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'com.github.kaaes:spotify-web-api-android:0.4.1' - implementation 'com.google.apis:google-api-services-youtube:v3-rev180-1.22.0' implementation 'com.google.oauth-client:google-oauth-client:1.22.0' implementation 'com.spotify.android:auth:1.1.0' diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/Album.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/Album.kt new file mode 100644 index 00000000..f803b9c7 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/Album.kt @@ -0,0 +1,21 @@ +package com.shabinder.musicForEveryone.models + +data class Album( + var album_type: String? = null, + var artists: List? = null, + var available_markets: List? = null, + var copyrights: List? = null, + var external_ids: Map? = null, + var external_urls: Map? = null, + var genres: List? = null, + var href: String? = null, + var id: String? = null, + var images: List? = null, + var label :String? = null, + var name: String? = null, + var popularity: Int? = null, + var release_date: String? = null, + var release_date_precision: String? = null, + var tracks: PagingObject? = null, + var type: String? = null, + var uri: String? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/Artist.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/Artist.kt new file mode 100644 index 00000000..3ed88e10 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/Artist.kt @@ -0,0 +1,9 @@ +package com.shabinder.musicForEveryone.models + +data class Artist( + var external_urls: Map? = null, + var href: String? = null, + var id: String? = null, + var name: String? = null, + var type: String? = null, + var uri: String? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/Copyright.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/Copyright.kt new file mode 100644 index 00000000..7348cf66 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/Copyright.kt @@ -0,0 +1,5 @@ +package com.shabinder.musicForEveryone.models + +data class Copyright( + var text: String? = null, + var type: String? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/Episodes.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/Episodes.kt new file mode 100644 index 00000000..aaa1a1c5 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/Episodes.kt @@ -0,0 +1,21 @@ +package com.shabinder.musicForEveryone.models + +data class Episodes( + var audio_preview_url:String?, + var description:String?, + var duration_ms:Int?, + var explicit:Boolean?, + var external_urls:Map?, + var href:String?, + var id:String?, + var images:List?, + var is_externally_hosted:Boolean?, + var is_playable:Boolean?, + var language:String?, + var languages:List?, + var name:String?, + var release_date:String?, + var release_date_precision:String?, + var type:String?, + var uri:String +) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/Followers.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/Followers.kt new file mode 100644 index 00000000..83280ff8 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/Followers.kt @@ -0,0 +1,5 @@ +package com.shabinder.musicForEveryone.models + +data class Followers( + var href: String? = null, + var total: Int? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/Image.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/Image.kt new file mode 100644 index 00000000..52996ee1 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/Image.kt @@ -0,0 +1,6 @@ +package com.shabinder.musicForEveryone.models + +data class Image( + var width: Int? = null, + var height: Int? = null, + var url: String? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/LinkedTrack.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/LinkedTrack.kt new file mode 100644 index 00000000..73c8bfef --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/LinkedTrack.kt @@ -0,0 +1,8 @@ +package com.shabinder.musicForEveryone.models + +data class LinkedTrack( + var external_urls: Map? = null, + var href: String? = null, + var id: String? = null, + var type: String? = null, + var uri: String? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/PagingObject.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/PagingObject.kt new file mode 100644 index 00000000..20ea7793 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/PagingObject.kt @@ -0,0 +1,10 @@ +package com.shabinder.musicForEveryone.models + +data class PagingObject( + var href: String? = null, + var items: List? = null, + var limit: Int = 0, + var next: String? = null, + var offset: Int = 0, + var previous: String? = null, + var total: Int = 0) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/Playlist.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/Playlist.kt new file mode 100644 index 00000000..32697a6c --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/Playlist.kt @@ -0,0 +1,19 @@ +package com.shabinder.musicForEveryone.models + +import com.squareup.moshi.Json + +data class Playlist( + @Json(name = "collaborative")var is_collaborative: Boolean? = null, + var description: String? = null, + var external_urls: Map? = null, + var followers: Followers? = null, + var href: String? = null, + var id: String? = null, + var images: List? = null, + var name: String? = null, + var owner: UserPublic? = null, + @Json(name = "public")var is_public: Boolean? = null, + var snapshot_id: String? = null, + var tracks: PagingObject? = null, + var type: String? = null, + var uri: String? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/PlaylistTrack.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/PlaylistTrack.kt new file mode 100644 index 00000000..db3d5781 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/PlaylistTrack.kt @@ -0,0 +1,7 @@ +package com.shabinder.musicForEveryone.models + +data class PlaylistTrack( + var added_at: String? = null, + var added_by: UserPublic? = null, + var track: Track? = null, + var is_local: Boolean? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/Token.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/Token.kt new file mode 100644 index 00000000..4ea8ca2b --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/Token.kt @@ -0,0 +1,7 @@ +package com.shabinder.musicForEveryone.models + +data class Token( + var access_token:String, + var token_type:String, + var expires_in:Int +) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/Track.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/Track.kt new file mode 100644 index 00000000..ae2d5b35 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/Track.kt @@ -0,0 +1,21 @@ +package com.shabinder.musicForEveryone.models + +data class Track( + var artists: List? = null, + var available_markets: List? = null, + var is_playable: Boolean? = null, + var linked_from: LinkedTrack? = null, + var disc_number: Int = 0, + var duration_ms: Long = 0, + var explicit: Boolean? = null, + var external_urls: Map? = null, + var href: String? = null, + var id: String? = null, + var name: String? = null, + var preview_url: String? = null, + var track_number: Int = 0, + var type: String? = null, + var uri: String? = null, + var album: Album? = null, + var external_ids: Map? = null, + var popularity: Int? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/UserPrivate.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/UserPrivate.kt new file mode 100644 index 00000000..389146d7 --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/UserPrivate.kt @@ -0,0 +1,14 @@ +package com.shabinder.musicForEveryone.models + +data class UserPrivate( + val country:String, + var display_name: String, + val email:String, + var external_urls: Map? = null, + var followers: Followers? = null, + var href: String? = null, + var id: String? = null, + var images: List? = null, + var product:String, + var type: String? = null, + var uri: String? = null) \ No newline at end of file diff --git a/app/src/main/java/com/shabinder/musicForEveryone/models/UserPublic.kt b/app/src/main/java/com/shabinder/musicForEveryone/models/UserPublic.kt new file mode 100644 index 00000000..9d202bbf --- /dev/null +++ b/app/src/main/java/com/shabinder/musicForEveryone/models/UserPublic.kt @@ -0,0 +1,11 @@ +package com.shabinder.musicForEveryone.models + +data class UserPublic( + var display_name: String? = null, + var external_urls: Map? = null, + var followers: Followers? = null, + var href: String? = null, + var id: String? = null, + var images: List? = null, + var type: String? = null, + var uri: String? = null) \ No newline at end of file