Add reference to the corresponding server code, too.
David Blume

David Blume commited on 2016-09-09 12:52:40
Showing 4 changed files, with 19 additions and 4 deletions.

... ...
@@ -19,6 +19,10 @@ If you're me, and you want to contribute to the repo, then you can clone it like
19 19
 [Ensure you can sideload a dev channel](http://sdkdocs.roku.com/display/sdkdoc/Loading+and+Running+Your+Application+Walkthrough).
20 20
 Then see the "build\_systems" command in ip\_tagger.sublime-project to see how the channel is zipped and deployed.
21 21
 
22
+# Corresponding Server Code
23
+
24
+Here's [the corresponding server code](http://git.dlma.com/kvs.git/).
25
+
22 26
 # Is it any good?
23 27
 
24 28
 [Yes](https://news.ycombinator.com/item?id=3067434).
... ...
@@ -1,7 +1,7 @@
1 1
 title=IP Tagger
2 2
 major_version=1
3 3
 minor_version=0
4
-build_version=3
4
+build_version=4
5 5
 mm_icon_focus_hd=pkg:/images/mm_icon_focus_hd.png
6 6
 mm_icon_focus_sd=pkg:/images/mm_icon_focus_sd.png
7 7
 splash_screen_hd=pkg:/images/splash_screen_hd.png
... ...
@@ -32,11 +32,13 @@ sub showScreen(contentID As String, options As String)
32 32
         end if
33 33
     end for
34 34
 
35
+    settings = GetSettings()
36
+
35 37
     request = CreateObject("roUrlTransfer")
36 38
     request.SetCertificatesFile("common:/certs/ca-bundle.crt")
37 39
     request.SetPort(port)
38
-    request.SetUrl("https://kvs.dlma.com")
39
-    params = deviceID+"="+ipAddr+"&auth=ahov"
40
+    request.SetUrl(settings.url)
41
+    params = deviceID+"="+ipAddr+"&auth="+settings.auth
40 42
     screen.addParagraph("Tagging "+ipAddr+" for "+deviceID+"...")
41 43
     if request.AsyncPostFromString(params)
42 44
         print "Post was sent!"
... ...
@@ -53,7 +55,7 @@ sub showScreen(contentID As String, options As String)
53 55
             if msg.GetInt() = 1
54 56
                 if msg.GetResponseCode() = 200
55 57
                     screen.addParagraph("Success! You can get this device's IP address from the following URL:")
56
-                    screen.addParagraph("https://kvs.dlma.com?k="+deviceID)
58
+                    screen.addParagraph(settings.url+"?k="+deviceID)
57 59
                 else
58 60
                     screen.addParagraph("It didn't work. Got code " + str(msg.GetResponseCode()))
59 61
                 endif
... ...
@@ -0,0 +1,9 @@
1
+Function GetSettings() As Object
2
+    this = {
3
+        url:  "https://yourdomain.com"             
4
+        auth: "yourauthorizationhere" 
5
+    }
6
+        
7
+    return this
8
+End Function
9
+
0 10