Update applications/randomuser/randomuser.ring - Add Method: DownloadUserData
@@ -33,6 +33,11 @@ class RandomUser
func getUserData
+ DownloadUserData()
+ DisplayThePhoto()
+
+ func DownloadUserData
+
cData= download("https://randomuser.me/api")
aList= JSON2List(cData)
@@ -43,8 +48,6 @@ class RandomUser
cGender = aList[:Results][1][:gender]
cImageFile = aList[:Results][1][:picture][:large]
- DisplayThePhoto()
-
func DisplayThePhoto
write("UserPhoto.jpg",download(cImageFile))
