From 5ce081e2f18dce7f2665f9f6bc11d54ca88f307a Mon Sep 17 00:00:00 2001 From: ceee Date: Mon, 24 Jun 2013 10:31:48 +0200 Subject: [PATCH] update URL properties; --- PocketSharp/PocketClient.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/PocketSharp/PocketClient.cs b/PocketSharp/PocketClient.cs index bdc2083..d45ee34 100644 --- a/PocketSharp/PocketClient.cs +++ b/PocketSharp/PocketClient.cs @@ -15,12 +15,17 @@ namespace PocketSharp /// /// default base URL for the API, which is used, when no baseURL is delivered /// - protected static Uri defaultUrl = new Uri("https://getpocket.com/v3/"); + protected static string defaultBaseUrl = "https://getpocket.com/"; /// /// The authentification URL /// - protected static string authentificationUrl = "https://getpocket.com/auth/authorize?request_token={0}&redirect_uri={1}"; + protected static string authentificationUrl = defaultBaseUrl + "auth/authorize?request_token={0}&redirect_uri={1}"; + + /// + /// current version of the Pocket API (used in URL) + /// + protected static string version = "v3"; /// /// base URL for the API @@ -64,7 +69,7 @@ namespace PocketSharp public PocketClient(string consumerKey, string accessCode) { // assign public properties - BaseUrl = defaultUrl; + BaseUrl = new Uri(defaultBaseUrl + version + "/"); ConsumerKey = consumerKey; // assign access code if submitted