diff core/magnatagatune/fm_network.py @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/magnatagatune/fm_network.py	Tue Feb 10 15:05:51 2015 +0000
@@ -0,0 +1,20 @@
+import pylast
+import sys
+
+def get_network():
+    # You have to have your own unique two values for API_KEY and API_SECRET
+    # Obtain yours from http://www.last.fm/api/account for Last.fm
+    API_KEY = "6fae93d29ad1ace84159d5e264114be7"
+    API_SECRET = "e04dd6c372461fb2de4eb4908fb35ae3"
+
+    # In order to perform a write operation you need to authenticate yourself
+    # username = "megaoetzwuchst"
+    # password_hash = "5c15b1b51d73b8a623fef29ca5035abb"
+
+    network = pylast.LastFMNetwork(api_key = API_KEY, api_secret = 
+       API_SECRET)
+
+    # network = pylast.LastFMNetwork(api_key = API_KEY, api_secret = 
+    #    API_SECRET, username = username, password_hash = password_hash)
+
+    return network