Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotify #176

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
231ccea
feat(package/math): create directory structure
gustafholst Mar 9, 2020
c09aef9
feat(package/spotify): create directory structure
gustafholst Mar 11, 2020
b5a37d6
feat(package/spotify): login, play track
gustafholst Mar 11, 2020
b8b690a
feat(package/spotify): refactor expressions map to individual functions
gustafholst Mar 12, 2020
457d41d
feat(package/spotify): fixed bug logging in after token expired
gustafholst Mar 12, 2020
0952449
feat(package/spotify): play album
gustafholst Mar 12, 2020
d119f19
feat(package/spotify): play artist
gustafholst Mar 12, 2020
d68df29
feat(package/spotify): fixed bug preventing album names containing th…
gustafholst Mar 12, 2020
c6916e6
feat(package/spotify): add readme with instructions
gustafholst Mar 12, 2020
cade1d8
feat(package/spotify): pause functionality
gustafholst Mar 12, 2020
28e4cb2
feat(package/spotify): DRY refactor
gustafholst Mar 13, 2020
0ade789
feat(package/spotify): bugfix + more DRY
gustafholst Mar 13, 2020
6d61883
feat(package/spotify): play playlist
gustafholst Mar 13, 2020
702aba0
feat(package/spotify): another DRY refactor
gustafholst Mar 13, 2020
dcb6fd8
feat(package/spotify): show track/album
gustafholst Mar 13, 2020
388f1ff
feat(package/spotify): add spotify authorization endpoint to server.js
gustafholst Mar 13, 2020
79ab60c
feat(package/spotify): show playlist
gustafholst Mar 13, 2020
e69a12f
feat(package/spotify): bugfix deleted track in playlist
gustafholst Mar 13, 2020
a2261dd
feat(package/spotify): show artist
gustafholst Mar 13, 2020
eb50ece
feat(package/spotify): various fixes
gustafholst Mar 14, 2020
6a58d7e
feat(package/spotify): update readme
gustafholst Mar 14, 2020
f5c9bc1
feat(package/spotify): add shebangs
gustafholst Mar 16, 2020
e9e8d91
feat(package/spotify): correct config.sample.json
gustafholst Mar 17, 2020
162089f
feat(package/spotify): added scope to config.sample.json
gustafholst Mar 18, 2020
b6c4895
feat(package/spotify): minor fixes
gustafholst Mar 18, 2020
e76d858
feat(package/spotify): add workaround for authorization bug
gustafholst Mar 22, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions app/spotify_auth.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/style.css">
<link rel="icon" type="image/png" href="img/favicon.png">
<title>Leon - Spotify authorization</title>
</head>
<body class="settingup">
<main>
<h1>Spotify authorization</h1>
<p>Please follow these steps:</p>
<ol>
<li>Copy the complete url of this tab</li>
<li>Paste url into Leon</li>
<li>Close this tab</li>
</ol>

</main>
<footer>
<div id="logo"></div>
<div id="version">
<small>v</small>
</div>
<div id="logger">
<small class="italic">
<a href="https://docs.getleon.ai/collaborative-logger.html" target="_blank">Collaborative logger</a>
</small>
</div>
</footer>
<script src="vendor/socket.io/2.0.3/socket.io.js"></script>
<script src="js/main.js"></script>
</body>
</html>
34 changes: 24 additions & 10 deletions bridges/python/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions bridges/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
from json import dumps, loads
from importlib import import_module


def main():
"""Dynamically import modules related to the args and print the ouput"""
"""Dynamically import modules related to the args and print the ouput"""

path.append('.')
path.append('./')

queryobj = utils.getqueryobj()
m = import_module('packages.' + queryobj['package'] + '.' + queryobj['module'])
queryobj = utils.getqueryobj()
m = import_module('packages.' + queryobj['package'] + '.' + queryobj['module'])

return getattr(m, queryobj['action'])(queryobj['query'], queryobj['entities'])
return getattr(m, queryobj['action'])(queryobj['query'], queryobj['entities'])

if __name__ == '__main__':
main()
main()
Loading