Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

remove: DetectResult

add: FacesGroupResult, AccountUsersResult, TagsGetResult and
TagsRemoveResult
  • Loading branch information...
commit de9b2fc347ffc74f7c8d6eaaac888853eb1e1fe9 1 parent fb96f4e
authored November 13, 2011
12  src/Main.as
... ...
@@ -1,12 +0,0 @@
1  
-package 
2  
-{
3  
-	import flash.display.Sprite;
4  
-
5  
-	public class Main extends Sprite
6  
-	{
7  
-		public function Main()
8  
-		{
9  
-			
10  
-		}
11  
-	}
12  
-}
8  src/facecom/api/model/results/AccountUsersResult.as
@@ -4,6 +4,12 @@ package facecom.api.model.results {
4 4
 	 * @author medec
5 5
 	 */
6 6
 	public class AccountUsersResult extends Result {
7  
-		public var users:Dictionary;
  7
+		public var users : Dictionary;
  8
+
  9
+		public function AccountUsersResult(data:Object) {
  10
+			super(data);
  11
+			
  12
+			// TODO
  13
+		}
8 14
 	}
9 15
 }
13  src/facecom/api/model/results/DetectResult.as
... ...
@@ -1,13 +0,0 @@
1  
-package facecom.api.model.results {
2  
-	import facecom.api.model.core.Photo;
3  
-	import facecom.api.model.core.Usage;
4  
-	/**
5  
-	 * @author medec
6  
-	 */
7  
-	public class DetectResult extends Result {
8  
-		
9  
-		public var photos:Vector.<Photo>;
10  
-		
11  
-		public var usage:Usage;
12  
-	}
13  
-}
24  src/facecom/api/model/results/FacesGroupResult.as
... ...
@@ -0,0 +1,24 @@
  1
+package facecom.api.model.results {
  2
+	import facecom.api.model.core.Group;
  3
+	import facecom.api.model.core.Photo;
  4
+	import facecom.api.model.core.Usage;
  5
+	/**
  6
+	 * @author medec
  7
+	 */
  8
+	public class FacesGroupResult extends Result {
  9
+		
  10
+		public var groups:Vector.<Group>;
  11
+		
  12
+		public var photos : Vector.<Photo>;
  13
+		public var usage : Usage;
  14
+
  15
+		public function FacesGroupResult(data:Object) {
  16
+			super(data);
  17
+			
  18
+			Result.arrayToVector(data['groups'], groups, Group);
  19
+			Result.arrayToVector(data['photos'], photos, Photo);
  20
+			
  21
+			usage = new Usage(data['usage']);
  22
+		}
  23
+	}
  24
+}
15  src/facecom/api/model/results/GroupResult.as
... ...
@@ -1,15 +0,0 @@
1  
-package facecom.api.model.results {
2  
-	import facecom.api.model.core.Group;
3  
-	import facecom.api.model.core.Photo;
4  
-	import facecom.api.model.core.Usage;
5  
-	/**
6  
-	 * @author medec
7  
-	 */
8  
-	public class GroupResult extends Result {
9  
-		
10  
-		public var groups:Vector.<Group>;
11  
-		
12  
-		public var photos : Vector.<Photo>;
13  
-		public var usage : Usage;
14  
-	}
15  
-}
7  src/facecom/api/model/results/TagsGetResult.as
@@ -4,7 +4,12 @@ package facecom.api.model.results {
4 4
 	 * @author medec
5 5
 	 */
6 6
 	public class TagsGetResult extends Result {
7  
-		public var photos:Vector.<Photo>;
  7
+		public var photos : Vector.<Photo>;
8 8
 
  9
+		public function TagsGetResult(data:Object) {
  10
+			super(data);
  11
+			
  12
+			Result.arrayToVector(data['photos'], photos, Photo);
  13
+		}
9 14
 	}
10 15
 }
8  src/facecom/api/model/results/TagsRemoveResult.as
@@ -6,5 +6,13 @@ package facecom.api.model.results {
6 6
 	public class TagsRemoveResult extends Result {
7 7
 		public var saved_tags : Vector.<RemoveTag>;
8 8
 		public var message : String;
  9
+
  10
+		public function TagsRemoveResult(data:Object) {
  11
+			super(data);
  12
+			
  13
+			Result.arrayToVector(data['saved_tags'], saved_tags, RemoveTag);
  14
+			
  15
+			message = data['message'];
  16
+		}
9 17
 	}
10 18
 }

0 notes on commit de9b2fc

Please sign in to comment.
Something went wrong with that request. Please try again.