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
// An example authorizing Google Api use with OAuthSwift https://github.com/OAuthSwift/OAuthSwift | |
import Foundation | |
import OAuthSwift // https://github.com/OAuthSwift/OAuthSwift | |
import KeychainAccess // https://github.com/kishikawakatsumi/KeychainAccess | |
import SwiftyJSON // https://github.com/SwiftyJSON/SwiftyJSON | |
class Google { | |
private let auth: OAuth2Swift |
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
from gmusicapi import Mobileclient # Using this API https://github.com/simon-weber/gmusicapi | |
import json | |
# login to google (need app specific password if using 2FA) | |
api = Mobileclient() | |
api.login('USER@gmail.com', 'PASSWORD', Mobileclient.FROM_MAC_ADDRESS) | |
# retrieve playlists user has | |
playlists = api.get_all_user_playlist_contents() |