Removed lnku because site is closed

This commit is contained in:
Jaex 2015-09-17 11:25:36 +03:00
parent b1251b45a9
commit 48419b6497
11 changed files with 658 additions and 837 deletions

View file

@ -156,8 +156,6 @@ public enum UrlShortenerType
NLCM,
[Description("adf.ly")]
AdFly,
[Description("lnku.co")]
LnkU,
[Description("coinurl.com")]
CoinURL,
[Description("qr.net")]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -37,6 +37,7 @@ private void InitializeComponent()
this.tpOtherUploaders = new System.Windows.Forms.TabPage();
this.tcOtherUploaders = new System.Windows.Forms.TabControl();
this.tpTwitter = new System.Windows.Forms.TabPage();
this.btnTwitterNameUpdate = new System.Windows.Forms.Button();
this.lbTwitterAccounts = new System.Windows.Forms.ListBox();
this.lblTwitterDefaultMessage = new System.Windows.Forms.Label();
this.txtTwitterDefaultMessage = new System.Windows.Forms.TextBox();
@ -129,9 +130,6 @@ private void InitializeComponent()
this.lblAdflyAPIUID = new System.Windows.Forms.Label();
this.txtAdflyAPIKEY = new System.Windows.Forms.TextBox();
this.lblAdflyAPIKEY = new System.Windows.Forms.Label();
this.tpLnkU = new System.Windows.Forms.TabPage();
this.txtLnkUAPIKEY = new System.Windows.Forms.TextBox();
this.lblLnkUAPIKey = new System.Windows.Forms.Label();
this.tpCoinURL = new System.Windows.Forms.TabPage();
this.txtCoinURLUUID = new System.Windows.Forms.TextBox();
this.lblCoinURLUUID = new System.Windows.Forms.Label();
@ -451,7 +449,6 @@ private void InitializeComponent()
this.lblWidthHint = new System.Windows.Forms.Label();
this.ttlvMain = new ShareX.HelpersLib.TabToListView();
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.btnTwitterNameUpdate = new System.Windows.Forms.Button();
this.tpOtherUploaders.SuspendLayout();
this.tcOtherUploaders.SuspendLayout();
this.tpTwitter.SuspendLayout();
@ -465,7 +462,6 @@ private void InitializeComponent()
this.tpGoogleURLShortener.SuspendLayout();
this.tpYourls.SuspendLayout();
this.tpAdFly.SuspendLayout();
this.tpLnkU.SuspendLayout();
this.tpCoinURL.SuspendLayout();
this.tpPolr.SuspendLayout();
this.tpFileUploaders.SuspendLayout();
@ -583,6 +579,13 @@ private void InitializeComponent()
this.tpTwitter.Name = "tpTwitter";
this.tpTwitter.UseVisualStyleBackColor = true;
//
// btnTwitterNameUpdate
//
resources.ApplyResources(this.btnTwitterNameUpdate, "btnTwitterNameUpdate");
this.btnTwitterNameUpdate.Name = "btnTwitterNameUpdate";
this.btnTwitterNameUpdate.UseVisualStyleBackColor = true;
this.btnTwitterNameUpdate.Click += new System.EventHandler(this.btnTwitterNameUpdate_Click);
//
// lbTwitterAccounts
//
this.lbTwitterAccounts.FormattingEnabled = true;
@ -1087,7 +1090,6 @@ private void InitializeComponent()
this.tcURLShorteners.Controls.Add(this.tpGoogleURLShortener);
this.tcURLShorteners.Controls.Add(this.tpYourls);
this.tcURLShorteners.Controls.Add(this.tpAdFly);
this.tcURLShorteners.Controls.Add(this.tpLnkU);
this.tcURLShorteners.Controls.Add(this.tpCoinURL);
this.tcURLShorteners.Controls.Add(this.tpPolr);
resources.ApplyResources(this.tcURLShorteners, "tcURLShorteners");
@ -1254,25 +1256,6 @@ private void InitializeComponent()
resources.ApplyResources(this.lblAdflyAPIKEY, "lblAdflyAPIKEY");
this.lblAdflyAPIKEY.Name = "lblAdflyAPIKEY";
//
// tpLnkU
//
this.tpLnkU.Controls.Add(this.txtLnkUAPIKEY);
this.tpLnkU.Controls.Add(this.lblLnkUAPIKey);
resources.ApplyResources(this.tpLnkU, "tpLnkU");
this.tpLnkU.Name = "tpLnkU";
this.tpLnkU.UseVisualStyleBackColor = true;
//
// txtLnkUAPIKEY
//
resources.ApplyResources(this.txtLnkUAPIKEY, "txtLnkUAPIKEY");
this.txtLnkUAPIKEY.Name = "txtLnkUAPIKEY";
this.txtLnkUAPIKEY.TextChanged += new System.EventHandler(this.txtLnkUAPIKEY_TextChanged);
//
// lblLnkUAPIKey
//
resources.ApplyResources(this.lblLnkUAPIKey, "lblLnkUAPIKey");
this.lblLnkUAPIKey.Name = "lblLnkUAPIKey";
//
// tpCoinURL
//
this.tpCoinURL.Controls.Add(this.txtCoinURLUUID);
@ -3581,13 +3564,6 @@ private void InitializeComponent()
this.actRapidShareAccountType.Name = "actRapidShareAccountType";
this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
//
// btnTwitterNameUpdate
//
resources.ApplyResources(this.btnTwitterNameUpdate, "btnTwitterNameUpdate");
this.btnTwitterNameUpdate.Name = "btnTwitterNameUpdate";
this.btnTwitterNameUpdate.UseVisualStyleBackColor = true;
this.btnTwitterNameUpdate.Click += new System.EventHandler(this.btnTwitterNameUpdate_Click);
//
// UploadersConfigForm
//
resources.ApplyResources(this, "$this");
@ -3621,8 +3597,6 @@ private void InitializeComponent()
this.tpYourls.PerformLayout();
this.tpAdFly.ResumeLayout(false);
this.tpAdFly.PerformLayout();
this.tpLnkU.ResumeLayout(false);
this.tpLnkU.PerformLayout();
this.tpCoinURL.ResumeLayout(false);
this.tpCoinURL.PerformLayout();
this.tpPolr.ResumeLayout(false);
@ -4122,9 +4096,6 @@ private void InitializeComponent()
private System.Windows.Forms.TextBox txtUp1Host;
private System.Windows.Forms.Label lblUp1Key;
private System.Windows.Forms.Label lblUp1Host;
private System.Windows.Forms.TabPage tpLnkU;
private System.Windows.Forms.TextBox txtLnkUAPIKEY;
private System.Windows.Forms.Label lblLnkUAPIKey;
private System.Windows.Forms.TabPage tpCoinURL;
private System.Windows.Forms.TextBox txtCoinURLUUID;
private System.Windows.Forms.Label lblCoinURLUUID;

View file

@ -94,7 +94,6 @@ private void FormSettings()
AddIconToTab(tpImageShack, Resources.ImageShack);
AddIconToTab(tpImgur, Resources.Imgur);
AddIconToTab(tpJira, Resources.jira);
AddIconToTab(tpLnkU, Resources.LnkU);
AddIconToTab(tpMediaFire, Resources.MediaFire);
AddIconToTab(tpMega, Resources.Mega);
AddIconToTab(tpMinus, Resources.Minus);
@ -599,10 +598,6 @@ public void LoadSettings()
txtAdflyAPIKEY.Text = Config.AdFlyAPIKEY;
txtAdflyAPIUID.Text = Config.AdFlyAPIUID;
// lnku.co
txtLnkUAPIKEY.Text = Config.LnkUAPIKEY;
// coinurl.com
txtCoinURLUUID.Text = Config.CoinURLUUID;
@ -2190,15 +2185,6 @@ private void llAdflyLink_LinkClicked(object sender, LinkLabelLinkClickedEventArg
#endregion adf.ly
#region LnkU.co
private void txtLnkUAPIKEY_TextChanged(object sender, EventArgs e)
{
Config.LnkUAPIKEY = txtLnkUAPIKEY.Text;
}
#endregion LnkU.co
#region CoinURL
private void txtCoinURLUUID_TextChanged(object sender, EventArgs e)

File diff suppressed because it is too large Load diff

View file

@ -431,16 +431,6 @@ internal static System.Drawing.Icon Lambda {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon LnkU {
get {
object obj = ResourceManager.GetObject("LnkU", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View file

@ -461,9 +461,6 @@ Created folders:</value>
<data name="Hubic" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Favicons\hubic.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="LnkU" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Favicons\LnkU.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CoinURL" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Favicons\CoinURL.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

View file

@ -307,7 +307,6 @@
<Compile Include="URLShorteners\CustomURLShortener.cs" />
<Compile Include="URLShorteners\GoogleURLShortener.cs" />
<Compile Include="URLShorteners\IsgdURLShortener.cs" />
<Compile Include="URLShorteners\LnkUURLShortener.cs" />
<Compile Include="URLShorteners\NlcmURLShortener.cs" />
<Compile Include="URLShorteners\QRnetURLShortener.cs" />
<Compile Include="URLShorteners\TinyURLShortener.cs" />
@ -750,7 +749,6 @@
<None Include="Favicons\hubic.ico" />
<None Include="Favicons\Up1.ico" />
<None Include="Favicons\CoinURL.ico" />
<None Include="Favicons\LnkU.ico" />
<None Include="Favicons\copy.ico" />
<None Include="Favicons\Lambda.ico" />
<None Include="Favicons\Mega.ico" />

View file

@ -1,69 +0,0 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2015 ShareX Team
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 <http://www.gnu.org/licenses/>.
*/
#endregion License Information (GPL v3)
using Newtonsoft.Json;
using System.Collections.Generic;
namespace ShareX.UploadersLib.URLShorteners
{
public sealed class LnkUURLShortener : URLShortener
{
private const string API_ENDPOINT = "http://lnku.co/api/go/";
public string API_KEY { get; set; }
public override UploadResult ShortenURL(string url)
{
UploadResult result = new UploadResult { URL = url };
Dictionary<string, string> args = new Dictionary<string, string>();
args.Add("apikey", API_KEY);
args.Add("action", "shorten");
args.Add("fullurl", url);
string response = SendRequest(HttpMethod.GET, API_ENDPOINT, args);
if (!string.IsNullOrEmpty(response))
{
LnkUURLShortenerResponse jsonResponse = JsonConvert.DeserializeObject<LnkUURLShortenerResponse>(response);
if (jsonResponse != null)
{
result.ShortenedURL = jsonResponse.shorturl;
}
}
return result;
}
}
public class LnkUURLShortenerResponse
{
public string shortcode { get; set; }
public string site { get; set; }
public string shorturl { get; set; }
public string fullurl { get; set; }
public string title { get; set; }
}
}

View file

@ -282,9 +282,6 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
public string AdFlyAPIKEY = String.Empty;
public string AdFlyAPIUID = String.Empty;
// lnku.co
public string LnkUAPIKEY = string.Empty;
// coinurl.com
public string CoinURLUUID = string.Empty;
@ -450,8 +447,6 @@ public bool IsValid(UrlShortenerType destination)
return !string.IsNullOrEmpty(YourlsAPIURL) && (!string.IsNullOrEmpty(YourlsSignature) || (!string.IsNullOrEmpty(YourlsUsername) && !string.IsNullOrEmpty(YourlsPassword)));
case UrlShortenerType.AdFly:
return !string.IsNullOrEmpty(AdFlyAPIKEY) && !string.IsNullOrEmpty(AdFlyAPIUID);
case UrlShortenerType.LnkU:
return !string.IsNullOrEmpty(LnkUAPIKEY);
case UrlShortenerType.CoinURL:
return !string.IsNullOrEmpty(CoinURLUUID);
case UrlShortenerType.Polr:

View file

@ -1141,12 +1141,6 @@ public UploadResult ShortenURL(string url)
APIUID = Program.UploadersConfig.AdFlyAPIUID
};
break;
case UrlShortenerType.LnkU:
urlShortener = new LnkUURLShortener
{
API_KEY = Program.UploadersConfig.LnkUAPIKEY
};
break;
case UrlShortenerType.CoinURL:
urlShortener = new CoinURLShortener
{