mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Puush constructor with api key
This commit is contained in:
parent
15e1608e71
commit
3462b999ef
1 changed files with 14 additions and 7 deletions
|
@ -44,10 +44,7 @@ public override bool CheckConfig(UploadersConfig config)
|
|||
|
||||
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
|
||||
{
|
||||
return new Puush()
|
||||
{
|
||||
APIKey = config.PuushAPIKey
|
||||
};
|
||||
return new Puush(config.PuushAPIKey);
|
||||
}
|
||||
|
||||
public override TabPage GetUploadersConfigTabPage(UploadersConfigForm form) => form.tpPuush;
|
||||
|
@ -56,14 +53,24 @@ public override GenericUploader CreateUploader(UploadersConfig config, TaskRefer
|
|||
public class Puush : FileUploader
|
||||
{
|
||||
public const string PuushURL = "https://puush.me";
|
||||
public const string PuushAPIURL = PuushURL + "/api";
|
||||
public const string PuushAPILoginURL = PuushAPIURL + "/auth";
|
||||
public const string PuushAPIUploadURL = PuushAPIURL + "/up";
|
||||
public const string PuushRegisterURL = PuushURL + "/register";
|
||||
public const string PuushResetPasswordURL = PuushURL + "/reset_password";
|
||||
|
||||
private const string PuushAPIURL = PuushURL + "/api";
|
||||
private const string PuushAPILoginURL = PuushAPIURL + "/auth";
|
||||
private const string PuushAPIUploadURL = PuushAPIURL + "/up";
|
||||
|
||||
public string APIKey { get; set; }
|
||||
|
||||
public Puush()
|
||||
{
|
||||
}
|
||||
|
||||
public Puush(string apiKey)
|
||||
{
|
||||
APIKey = apiKey;
|
||||
}
|
||||
|
||||
public string Login(string email, string password)
|
||||
{
|
||||
Dictionary<string, string> arguments = new Dictionary<string, string>();
|
||||
|
|
Loading…
Reference in a new issue