diff --git a/UploadersLib/URLShorteners/BitlyURLShortener.cs b/UploadersLib/URLShorteners/BitlyURLShortener.cs index 0e1156251..dc1132704 100644 --- a/UploadersLib/URLShorteners/BitlyURLShortener.cs +++ b/UploadersLib/URLShorteners/BitlyURLShortener.cs @@ -38,7 +38,7 @@ public sealed class BitlyURLShortener : URLShortener private const string URLAccessToken = URLAPI + "oauth/access_token"; private const string URLShorten = URLAPI + "v3/shorten"; - public OAuth2Info AuthInfo { get; set; } + public OAuth2Info AuthInfo { get; private set; } public BitlyURLShortener(OAuth2Info oauth) { @@ -90,7 +90,7 @@ public override UploadResult ShortenURL(string url) result.Response = SendGetRequest(URLShorten, arguments); - BitlyShorten shorten = JsonConvert.DeserializeObject(result.Response); + BitlyShortenResponse shorten = JsonConvert.DeserializeObject(result.Response); if (shorten != null && shorten.data != null && !string.IsNullOrEmpty(shorten.data.url)) { @@ -110,7 +110,7 @@ public class BitlyShortenData public string url { get; set; } } - public class BitlyShorten + public class BitlyShortenResponse { public BitlyShortenData data { get; set; } public int status_code { get; set; } diff --git a/UploadersLib/URLShorteners/GoogleURLShortener.cs b/UploadersLib/URLShorteners/GoogleURLShortener.cs index 591def192..bb64ea902 100644 --- a/UploadersLib/URLShorteners/GoogleURLShortener.cs +++ b/UploadersLib/URLShorteners/GoogleURLShortener.cs @@ -182,11 +182,8 @@ public override UploadResult ShortenURL(string url) public class GoogleURLShortenerResponse { public string kind { get; set; } - public string id { get; set; } - public string longUrl { get; set; } - public string status { get; set; } } } \ No newline at end of file diff --git a/UploadersLib/URLShorteners/ThreelyURLShortener.cs b/UploadersLib/URLShorteners/ThreelyURLShortener.cs deleted file mode 100644 index e7c29fcbd..000000000 --- a/UploadersLib/URLShorteners/ThreelyURLShortener.cs +++ /dev/null @@ -1,58 +0,0 @@ -#region License Information (GPL v3) - -/* - ShareX - A program that allows you to take screenshots and share any file type - Copyright (C) 2008-2013 ShareX Developers - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Optionally you can also view the license at . -*/ - -#endregion License Information (GPL v3) - -using System.Collections.Generic; -using UploadersLib.HelperClasses; - -namespace UploadersLib.URLShorteners -{ - public sealed class ThreelyURLShortener : URLShortener - { - private const string APIURL = "http://3.ly"; - - private string APIKey; - - public ThreelyURLShortener(string key) - { - APIKey = key; - } - - public override UploadResult ShortenURL(string url) - { - UploadResult result = new UploadResult { URL = url }; - - if (!string.IsNullOrEmpty(url)) - { - Dictionary arguments = new Dictionary(); - arguments.Add("api", APIKey); - arguments.Add("u", url); - - result.Response = result.ShortenedURL = SendGetRequest(APIURL, arguments); - } - - return result; - } - } -} \ No newline at end of file diff --git a/UploadersLib/URLShorteners/TurlURLShortener.cs b/UploadersLib/URLShorteners/TurlURLShortener.cs index 593fd4b42..bec9df667 100644 --- a/UploadersLib/URLShorteners/TurlURLShortener.cs +++ b/UploadersLib/URLShorteners/TurlURLShortener.cs @@ -40,7 +40,6 @@ public override UploadResult ShortenURL(string url) { Dictionary arguments = new Dictionary(); arguments.Add("url", url); - // arguments.Add("tag", settings.Tag); result.Response = SendGetRequest(APIURL, arguments); diff --git a/UploadersLib/UploadersLib.csproj b/UploadersLib/UploadersLib.csproj index 011c7990d..ff8e8e251 100644 --- a/UploadersLib/UploadersLib.csproj +++ b/UploadersLib/UploadersLib.csproj @@ -299,7 +299,6 @@ -