Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add: faceAPI.account

  • Loading branch information...
commit a399a1198799daa7440cac84b40ecbd29f416f38 1 parent 40cd19e
Piotr Mederak authored
View
25 .settings/launch/AccountLimitsExample.launch
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="com.powerflasher.fdt.ui.MxmlcGroup">
+<stringAttribute key="ADL_ARGUMENTS" value=""/>
+<stringAttribute key="APP_ARGUMENTS" value=""/>
+<stringAttribute key="ARGUMENTS" value=""/>
+<booleanAttribute key="KILL_PREVIOUS_VIEWER" value="true"/>
+<stringAttribute key="LAUNCHER_DEPENDENCIES" value="[Self]"/>
+<stringAttribute key="MAIN_CLASS" value="src/examples/AccountLimitsExample.as"/>
+<stringAttribute key="OUTPUT" value="bin/AccountLimitsExample.swf"/>
+<booleanAttribute key="PASS_CP" value="true"/>
+<booleanAttribute key="PASS_MAIN_CLASS" value="true"/>
+<booleanAttribute key="PASS_RSLS" value="false"/>
+<booleanAttribute key="PASS_SWCS" value="true"/>
+<stringAttribute key="PROJECT_NAME" value="Face.com API"/>
+<booleanAttribute key="START_SWF_ENABLED" value="true"/>
+<stringAttribute key="START_SWF_LOCATION" value="bin/AccountLimitsExample.swf"/>
+<stringAttribute key="START_SWF_WITH" value="External SWF Viewer"/>
+<booleanAttribute key="USE_PROJECT_COMPILER_ARGUMENTS" value="true"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/Face.com API"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+</launchConfiguration>
View
25 .settings/launch/FacesStatusExample.launch
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="com.powerflasher.fdt.ui.MxmlcGroup">
+<stringAttribute key="ADL_ARGUMENTS" value=""/>
+<stringAttribute key="APP_ARGUMENTS" value=""/>
+<stringAttribute key="ARGUMENTS" value=""/>
+<booleanAttribute key="KILL_PREVIOUS_VIEWER" value="true"/>
+<stringAttribute key="LAUNCHER_DEPENDENCIES" value="[Self]"/>
+<stringAttribute key="MAIN_CLASS" value="src/examples/FacesStatusExample.as"/>
+<stringAttribute key="OUTPUT" value="bin/FacesStatusExample.swf"/>
+<booleanAttribute key="PASS_CP" value="true"/>
+<booleanAttribute key="PASS_MAIN_CLASS" value="true"/>
+<booleanAttribute key="PASS_RSLS" value="false"/>
+<booleanAttribute key="PASS_SWCS" value="true"/>
+<stringAttribute key="PROJECT_NAME" value="Face.com API"/>
+<booleanAttribute key="START_SWF_ENABLED" value="true"/>
+<stringAttribute key="START_SWF_LOCATION" value="bin/FacesStatusExample.swf"/>
+<stringAttribute key="START_SWF_WITH" value="External SWF Viewer"/>
+<booleanAttribute key="USE_PROJECT_COMPILER_ARGUMENTS" value="true"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/Face.com API"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+</launchConfiguration>
View
BIN  bin/AccountLimitsExample.swf
Binary file not shown
View
BIN  bin/AccountStatusExample.swf
Binary file not shown
View
BIN  bin/FacesStatusExample.swf
Binary file not shown
View
38 src/examples/AccountLimitsExample.as
@@ -0,0 +1,38 @@
+package examples {
+ import facecom.api.FaceAPI;
+ import facecom.api.events.FaceAPIEvent;
+
+ import flash.display.Sprite;
+ import flash.events.IOErrorEvent;
+
+
+ /**
+ * @author medec
+ */
+ public class AccountLimitsExample extends Sprite {
+ private var faceAPI : FaceAPI;
+
+ public function AccountLimitsExample() {
+ init();
+ }
+
+ private function init() : void {
+ faceAPI = new FaceAPI('228f62cbac5d536b33318268c6f3bb7d', '848436c04c57ea431965f0a7a76557de');
+
+ faceAPI.addEventListener(IOErrorEvent.IO_ERROR, faceAPIIOError);
+ faceAPI.addEventListener(FaceAPIEvent.ACCOUNT_LIMITS, accountLimitsHandler);
+
+ //faceAPI.faces.status('all@testnamespace', 'testnamespace');
+ faceAPI.account.limits();
+
+ }
+
+ private function accountLimitsHandler(event : FaceAPIEvent) : void {
+ trace('limits: ' + event.data);
+ }
+
+ private function faceAPIIOError(event : IOErrorEvent) : void {
+ trace('error', event);
+ }
+ }
+}
View
4 src/examples/AccountStatusExample.as → src/examples/FacesStatusExample.as
@@ -9,9 +9,9 @@ package examples {
/**
* @author medec
*/
- public class AccountStatusExample extends Sprite {
+ public class FacesStatusExample extends Sprite {
private var faceAPI : FaceAPI;
- public function AccountStatusExample() {
+ public function FacesStatusExample() {
init();
}
View
6 src/facecom/api/FaceAPI.as
@@ -44,14 +44,14 @@ package facecom.api {
private var _faces : FacesProxy;
private var _account : AccountProxy;
private var _tags:TagsProxy;
-
- private var names : Object;
-
+
public function FaceAPI(apiKey : String, apiSecret : String = '') {
this.apiKey = apiKey;
this.apiSecret = apiSecret;
_faces = new FacesProxy(this);
+ _account = new AccountProxy(this);
+ _tags = new TagsProxy(this);
jpgEncoder = new JPGEncoder(40);
}
Please sign in to comment.
Something went wrong with that request. Please try again.