diff --git a/PocketWP/AddType.cs b/PocketWP/AddType.cs
deleted file mode 100644
index b7cfa3d..0000000
--- a/PocketWP/AddType.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace PocketWP
-{
- public enum AddType
- {
- Single,
- Multiple
- }
-}
diff --git a/PocketWP/PocketData.cs b/PocketWP/PocketData.cs
index 584499c..6b05861 100644
--- a/PocketWP/PocketData.cs
+++ b/PocketWP/PocketData.cs
@@ -1,9 +1,9 @@
-using System.Collections.Generic;
+using PropertyChanged;
+using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
-using PropertyChanged;
namespace PocketWP
{
@@ -11,15 +11,6 @@ namespace PocketWP
[DataContract]
public class PocketData
{
- ///
- /// Gets or sets the item.
- ///
- ///
- /// The item.
- ///
- [DataMember]
- public PocketDataItem Item { get; set; }
-
///
/// Gets or sets the items.
///
@@ -38,15 +29,6 @@ namespace PocketWP
[DataMember]
public string CallbackUri { get; set; }
- ///
- /// Gets the type.
- ///
- ///
- /// Single/Multiple items.
- ///
- [DataMember]
- public AddType Type { get; internal set; }
-
///
/// Converts POCO to JSON.
///
diff --git a/PocketWP/PocketHelper.cs b/PocketWP/PocketHelper.cs
index d6c2fb3..2a96836 100644
--- a/PocketWP/PocketHelper.cs
+++ b/PocketWP/PocketHelper.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
-using System.Net;
using System.Runtime.Serialization.Json;
using System.Text;
@@ -37,15 +36,17 @@ namespace PocketWP
{
AddToPocket(new PocketData
{
- Item = new PocketDataItem
+ Items = new List()
{
- Uri = uri,
- Tags = tags,
- Title = title,
- TweetId = tweetId
+ new PocketDataItem
+ {
+ Uri = uri,
+ Tags = tags,
+ Title = title,
+ TweetId = tweetId
+ }
},
- CallbackUri = callbackUri,
- Type = AddType.Single
+ CallbackUri = callbackUri
});
}
@@ -59,19 +60,18 @@ namespace PocketWP
AddToPocket(new PocketData
{
Items = items,
- CallbackUri = callbackUri,
- Type = AddType.Multiple
+ CallbackUri = callbackUri
});
}
///
- /// Buries my nut.
+ /// Launch Pocket application URI with appended pocket data.
///
- /// The item.
+ /// The pocket data.
/// item;Your nut can't be null
private static async void AddToPocket(PocketData data)
{
- if (data == null)
+ if (data == null || data.Items == null)
{
throw new ArgumentNullException("data", "Your item can't be null");
}
@@ -82,21 +82,21 @@ namespace PocketWP
}
///
- /// Determines whether the specified URI has nuts.
+ /// Determines whether the specified URI contains pocket data.
///
/// The URI.
- /// True if nut is present
- public static bool HasPocketItem(Uri uri)
+ /// True if pocket data is present
+ public static bool HasPocketData(Uri uri)
{
return uri.ToString().Contains(Uri.EscapeDataString(PocketUrl));
}
///
- /// Retrieves the nut.
+ /// Retrieves the pocket data.
///
/// The URI.
- /// The deserialised nut
- public static PocketData RetrievePocketItem(Uri uri)
+ /// The deserialised pocket data
+ public static PocketData RetrievePocketData(Uri uri)
{
var pocketUri = uri.ToString().Replace("/Protocol?encodedLaunchUri=", string.Empty);
pocketUri = Uri.UnescapeDataString(pocketUri).Replace(PocketUrl, string.Empty);
diff --git a/PocketWP/PocketWP.csproj b/PocketWP/PocketWP.csproj
index 8e5183c..3dee793 100644
--- a/PocketWP/PocketWP.csproj
+++ b/PocketWP/PocketWP.csproj
@@ -87,7 +87,6 @@
4
-