-
Notifications
You must be signed in to change notification settings - Fork 0
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
Lee Jun Kit
committed
May 27, 2021
1 parent
d988c41
commit b1e3ed6
Showing
45 changed files
with
711 additions
and
2 deletions.
There are no files selected for viewing
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,90 @@ | ||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
## User settings | ||
xcuserdata/ | ||
|
||
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) | ||
*.xcscmblueprint | ||
*.xccheckout | ||
|
||
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) | ||
build/ | ||
DerivedData/ | ||
*.moved-aside | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
|
||
## Obj-C/Swift specific | ||
*.hmap | ||
|
||
## App packaging | ||
*.ipa | ||
*.dSYM.zip | ||
*.dSYM | ||
|
||
## Playgrounds | ||
timeline.xctimeline | ||
playground.xcworkspace | ||
|
||
# Swift Package Manager | ||
# | ||
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. | ||
# Packages/ | ||
# Package.pins | ||
# Package.resolved | ||
# *.xcodeproj | ||
# | ||
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata | ||
# hence it is not needed unless you have added a package configuration file to your project | ||
# .swiftpm | ||
|
||
.build/ | ||
|
||
# CocoaPods | ||
# | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
# | ||
# Pods/ | ||
# | ||
# Add this line if you want to avoid checking in source code from the Xcode workspace | ||
# *.xcworkspace | ||
|
||
# Carthage | ||
# | ||
# Add this line if you want to avoid checking in source code from Carthage dependencies. | ||
# Carthage/Checkouts | ||
|
||
Carthage/Build/ | ||
|
||
# Accio dependency management | ||
Dependencies/ | ||
.accio/ | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. | ||
# Instead, use fastlane to re-generate the screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/#source-control | ||
|
||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots/**/*.png | ||
fastlane/test_output | ||
|
||
# Code Injection | ||
# | ||
# After new code Injection tools there's a generated folder /iOSInjectionProject | ||
# https://github.com/johnno1962/injectionforxcode | ||
|
||
iOSInjectionProject/ |
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,8 @@ | ||
// | ||
// EventBroker.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// HTTPClient.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 20/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// SpotifyAPI.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 20/5/21. | ||
// | ||
|
||
import Foundation |
12 changes: 12 additions & 0 deletions
12
Spottie/Backend/Types/API/CurrentlyPlayingContextObject.swift
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,12 @@ | ||
// | ||
// CurrentTrackResponse.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 23/5/21. | ||
// | ||
|
||
struct CurrentPlayerStateResponse: Codable { | ||
var isPlaying: Bool | ||
var shuffleState: Bool | ||
|
||
} |
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,15 @@ | ||
// | ||
// AlbumObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
struct AlbumObject: Codable { | ||
var gid: String | ||
var name: String | ||
var artist: ArtistObject | ||
var label: String | ||
var date: DateObject | ||
var coverGroup: CoverGroupObject | ||
} |
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 @@ | ||
// | ||
// ArtistObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
struct ArtistObject: Codable { | ||
var gid: String | ||
var name: String | ||
} |
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,10 @@ | ||
// | ||
// CoverGroupObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
struct CoverGroupObject: Codable { | ||
var image: [ImageObject] | ||
} |
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,12 @@ | ||
// | ||
// DateObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
struct DateObject: Codable { | ||
var year: Int | ||
var month: Int | ||
var day: 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,13 @@ | ||
// | ||
// ImageObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
struct ImageObject: Codable { | ||
var fileId: String | ||
var size: String | ||
var width: Int | ||
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,17 @@ | ||
// | ||
// TrackObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
struct TrackObject: Codable { | ||
var gid: String | ||
var name: String | ||
var album: AlbumObject | ||
var artist: ArtistObject | ||
var number: Int | ||
var discNumber: Int | ||
var duration: Int | ||
var popularity: 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,8 @@ | ||
// | ||
// WebAPIArtistObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 24/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// WebAPIImageObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 24/5/21. | ||
// | ||
|
||
import Foundation |
10 changes: 10 additions & 0 deletions
10
Spottie/Backend/Types/Base/WebAPISimplifiedAlbumObject.swift
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,10 @@ | ||
// | ||
// WebAPISimplifiedArtistObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 24/5/21. | ||
// | ||
|
||
struct WebAPISimplifiedArtistObject: Codable { | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
Spottie/Backend/Types/Base/WebAPISimplifiedArtistObject.swift
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,8 @@ | ||
// | ||
// WebAPISimplifiedArtistObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 24/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// WebAPITrackObject.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 24/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// ContextChangedEvent.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// InactiveSessionEvent.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// MetadataAvailableEvent.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// PlaybackPaused.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// PlaybackResumedEvent.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// TrackChangedEvent.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// TrackSeekedEvent.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// VolumeChangedEvent.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
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,8 @@ | ||
// | ||
// Nothing.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 20/5/21. | ||
// | ||
|
||
import Foundation |
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,28 @@ | ||
// | ||
// WebsocketMessage.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
enum EventType: String, Codable { | ||
case contextChanged | ||
case trackChanged | ||
case playbackEnded | ||
case playbackPaused | ||
case playbackResumed | ||
case volumeChanged | ||
case trackSeeked | ||
case metadataAvailable | ||
case playbackHaltStateChanged | ||
case sessionCleared | ||
case sessionChanged | ||
case inactiveSession | ||
case connectionDropped | ||
case connectionEstablished | ||
case panic | ||
} | ||
|
||
struct WebsocketMessage: Codable { | ||
var type: EventType | ||
} |
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,8 @@ | ||
// | ||
// SpottieError.swift | ||
// Spottie | ||
// | ||
// Created by Lee Jun Kit on 22/5/21. | ||
// | ||
|
||
import Foundation |
Oops, something went wrong.