diff --git a/PocketSharp.Console/Program.cs b/PocketSharp.Console/Program.cs
index f6a7216..dd060a5 100644
--- a/PocketSharp.Console/Program.cs
+++ b/PocketSharp.Console/Program.cs
@@ -16,7 +16,8 @@ namespace PocketSharp.Console
// this consumerKey is just for demonstration purposes
// please create your own application and retrieve it's key. It's a 1-step process ;-)
PocketClient client = new PocketClient(
- consumerKey: "15396-f6f92101d72c8e270a6c9bb3"
+ consumerKey: "15396-f6f92101d72c8e270a6c9bb3",
+ accessCode: ""
);
//Uri redirect = client.Authenticate(new Uri("http://example.com"));
diff --git a/PocketSharp/Components/Modify.cs b/PocketSharp/Components/Modify.cs
index c7ba7da..047315f 100644
--- a/PocketSharp/Components/Modify.cs
+++ b/PocketSharp/Components/Modify.cs
@@ -5,14 +5,20 @@ namespace PocketSharp
{
public partial class PocketClient
{
+ ///
+ /// Archives the specified item ID.
+ ///
+ /// The item ID.
+ ///
public bool Archive(int itemID)
{
- List actions = new List()
- {
- new ActionParameter() { Action = "archive", ID = itemID }
+ ActionParameter action = new ActionParameter()
+ {
+ Action = "archive",
+ ID = itemID
};
- return Put("send", actions).Status == 1;
+ return Put("send", action).Status == 1;
}
}
}
diff --git a/PocketSharp/PocketClient.cs b/PocketSharp/PocketClient.cs
index 8d8e054..6bbe0d5 100644
--- a/PocketSharp/PocketClient.cs
+++ b/PocketSharp/PocketClient.cs
@@ -133,7 +133,7 @@ namespace PocketSharp
///
- /// Fetches/Updates a typed resource
+ /// Fetches a typed resource
///
///
/// Requested method (path after /v3/)
@@ -165,6 +165,13 @@ namespace PocketSharp
}
+ ///
+ /// Puts/Updates a typed resource
+ ///
+ ///
+ /// Requested method (path after /v3/)
+ /// Additional action parameters
+ ///
protected T Put(string method, List actions) where T : class, new()
{
// put requests only with authentification
@@ -174,13 +181,23 @@ namespace PocketSharp
{
Actions = actions
};
-
- //var x = (parameters.Convert());
-
return Get(method, parameters.Convert());
}
+ ///
+ /// Puts/Updates a typed resource
+ ///
+ ///
+ /// Requested method (path after /v3/)
+ /// action parameter
+ ///
+ protected T Put(string method, ActionParameter action) where T : class, new()
+ {
+ return Put(method, new List() { action });
+ }
+
+
///
/// Validates the response.
///