Permalink
Browse files

remove: DetectResult

add: FacesGroupResult, AccountUsersResult, TagsGetResult and
TagsRemoveResult
  • Loading branch information...
1 parent fb96f4e commit de9b2fc347ffc74f7c8d6eaaac888853eb1e1fe9 Piotr Mederak committed Nov 13, 2011
View
12 src/Main.as
@@ -1,12 +0,0 @@
-package
-{
- import flash.display.Sprite;
-
- public class Main extends Sprite
- {
- public function Main()
- {
-
- }
- }
-}
View
8 src/facecom/api/model/results/AccountUsersResult.as
@@ -4,6 +4,12 @@ package facecom.api.model.results {
* @author medec
*/
public class AccountUsersResult extends Result {
- public var users:Dictionary;
+ public var users : Dictionary;
+
+ public function AccountUsersResult(data:Object) {
+ super(data);
+
+ // TODO
+ }
}
}
View
13 src/facecom/api/model/results/DetectResult.as
@@ -1,13 +0,0 @@
-package facecom.api.model.results {
- import facecom.api.model.core.Photo;
- import facecom.api.model.core.Usage;
- /**
- * @author medec
- */
- public class DetectResult extends Result {
-
- public var photos:Vector.<Photo>;
-
- public var usage:Usage;
- }
-}
View
24 src/facecom/api/model/results/FacesGroupResult.as
@@ -0,0 +1,24 @@
+package facecom.api.model.results {
+ import facecom.api.model.core.Group;
+ import facecom.api.model.core.Photo;
+ import facecom.api.model.core.Usage;
+ /**
+ * @author medec
+ */
+ public class FacesGroupResult extends Result {
+
+ public var groups:Vector.<Group>;
+
+ public var photos : Vector.<Photo>;
+ public var usage : Usage;
+
+ public function FacesGroupResult(data:Object) {
+ super(data);
+
+ Result.arrayToVector(data['groups'], groups, Group);
+ Result.arrayToVector(data['photos'], photos, Photo);
+
+ usage = new Usage(data['usage']);
+ }
+ }
+}
View
15 src/facecom/api/model/results/GroupResult.as
@@ -1,15 +0,0 @@
-package facecom.api.model.results {
- import facecom.api.model.core.Group;
- import facecom.api.model.core.Photo;
- import facecom.api.model.core.Usage;
- /**
- * @author medec
- */
- public class GroupResult extends Result {
-
- public var groups:Vector.<Group>;
-
- public var photos : Vector.<Photo>;
- public var usage : Usage;
- }
-}
View
7 src/facecom/api/model/results/TagsGetResult.as
@@ -4,7 +4,12 @@ package facecom.api.model.results {
* @author medec
*/
public class TagsGetResult extends Result {
- public var photos:Vector.<Photo>;
+ public var photos : Vector.<Photo>;
+ public function TagsGetResult(data:Object) {
+ super(data);
+
+ Result.arrayToVector(data['photos'], photos, Photo);
+ }
}
}
View
8 src/facecom/api/model/results/TagsRemoveResult.as
@@ -6,5 +6,13 @@ package facecom.api.model.results {
public class TagsRemoveResult extends Result {
public var saved_tags : Vector.<RemoveTag>;
public var message : String;
+
+ public function TagsRemoveResult(data:Object) {
+ super(data);
+
+ Result.arrayToVector(data['saved_tags'], saved_tags, RemoveTag);
+
+ message = data['message'];
+ }
}
}

0 comments on commit de9b2fc

Please sign in to comment.