summaryrefslogtreecommitdiff
path: root/src/com/p4square/f1oauth/F1API.java
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2014-09-27 11:05:43 -0700
committerJesse Morgan <jesse@jesterpm.net>2014-09-27 11:05:43 -0700
commitbdf47fc7340ec2a3ecaa6b11bbf87f0f5eaaeea1 (patch)
treeb0faa7efb72587f99cd742caffcfb00d3f625cd9 /src/com/p4square/f1oauth/F1API.java
parent8fa4f1fb4f122ee1e27c6015479bcd883b4b0671 (diff)
Adding support to fetch attributes for a user.
Diffstat (limited to 'src/com/p4square/f1oauth/F1API.java')
-rw-r--r--src/com/p4square/f1oauth/F1API.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/p4square/f1oauth/F1API.java b/src/com/p4square/f1oauth/F1API.java
index 88801db..a525c3f 100644
--- a/src/com/p4square/f1oauth/F1API.java
+++ b/src/com/p4square/f1oauth/F1API.java
@@ -5,6 +5,7 @@
package com.p4square.f1oauth;
import java.io.IOException;
+import java.util.List;
import java.util.Map;
import com.p4square.restlet.oauth.OAuthException;
@@ -38,7 +39,18 @@ public interface F1API {
* @param attributeName The attribute to add.
* @param attribute The attribute to add.
*/
- boolean addAttribute(String userId, String attributeName, Attribute attribute)
- throws F1Exception;
+ boolean addAttribute(String userId, Attribute attribute) throws F1Exception;
+
+ /**
+ * Return attributes assigned to user.
+ *
+ * A user may be assigned multiple attributes with the same name, thus even if
+ * attributeName is specified, multiple attributes may be returned.
+ *
+ * @param userId The user to query.
+ * @param attributeName A specific attribute to return, null for all.
+ * @return A list of Attributes
+ */
+ List<Attribute> getAttribute(String userId, String attributeName) throws F1Exception;
}