My.JDownloader.Api 2.4.2

A simple My.JDownloader Api wrapper for c# written by Cr1TiKa7

Install-Package My.JDownloader.Api -Version 2.4.2
dotnet add package My.JDownloader.Api --version 2.4.2
<PackageReference Include="My.JDownloader.Api" Version="2.4.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add My.JDownloader.Api --version 2.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

My.Jdownloader.Api .NET Wrapper by Cr1TiKa7

This is an simple wrapper for the official My.JDownloader.Api written in c#.
It's an rewritten and extended version of https://github.com/noone2407/MyJDownloaderApi.

Currently it supports: .NET 4.0, .NET 4.5, .NET 4.6 and .NETCore 2.0

Feel free to request missing calls, bugs or suggestions for improvements.

Usage

First of all you need an instance of the JDownloaderHandler

JDownloaderHandler _jdownloaderHandler = new JDownloaderHandler("YOURAPPKEY");
_jdownloaderHandler.Connect("YOURMYJDOWNLOADERUSERNAME", "YOURMYJDOWNLOADERPASSWORD");
//Alternaitve
JDownloaderHandler _jdownloaderHandler = new JDownloaderHandler("YOURMYJDOWNLOADERUSERNAME", "YOURMYJDOWNLOADERPASSWORD", "YOURAPPKEY");

The JDownloaderHandler contains the following methods:

  • Connect(email, password) : boolean
  • Reconnect() : boolean
  • Disconnect() : boolean
  • GetDevices() : List<DeviceObject>

After you successfully connected to the api you can get your active devices like this:

var devices = jdownloaderHandler.GetDevices();

Now that you got your devices you can call the methods of the namespaces on the device:

var device = devices[0];
//device.<namespace>.<method>();
device.Jd.DoSomethingCool();
Namespaces

For a better overview, the calls are split into different namespaces.
So far the library contains the following namespaces and methods:

  • Accounts | 11/12 calls done

    • AddAccount(hoster, email, password) : boolean
    • DisableAccounts(accountIds) : boolean
    • EnableAccounts(accountIds) : boolean
    • GetAccountInfo(accountId) : Account
    • GetPremiumHosterUrl(hoster) : string
    • ListPremiumHoster() : string[]
    • ListPremiumHosterUrls() : Dictionary<string, string>
    • QueryAccounts(apiQuery) : IEnumerable<Account>
    • RemoveAccounts(accountIds) : boolean
    • SetEnabledStatus(enabled, accountIds) : boolean
    • UpdateAccount(accountId, username, password) : boolean
  • AccountsV2 | 14/14 calls done

    • AddAccount(hoster, email, password) : boolean
    • AddBasicAuth(BasicAuthObject) : boolean
    • DisableAccounts(accountIds) : boolean
    • EnableAccounts(accountIds) : boolean
    • GetPremiumHosterUrl(hoster) : string
    • ListAccounts(ListAccountRequestObject) : IEnumerable<ListAccountResponseObject>
    • ListBasicAuth() : IEnumerable<ListBasicAuthResponseObject>
    • ListPremiumHoster() : string[]
    • ListPremiumHosterUrls() : Dictionary<string, string>
    • RefreshAccounts(accountIds) : boolean
    • RemoveAccounts(accountIds) : boolean
    • RemoveBasicAuths(basicAuthIds) : boolean
    • SetUsernameAndPassword(accountId, email, password) : boolean
    • UpdateBasicAuth(BasicAuthObject) : boolean
  • Captcha | 7/7 calls done

    • Get(id) : string
    • Get(id, format) : string
    • GetCaptchaJob(id) : CaptchaJob
    • List() : IEnumerable<CaptchaJob>
    • Skip(id, type) : bool
    • Solve(id, result, resultFormat) : bool
    • Solve(id, result) : bool
  • CaptchaForward | 2/2 calls done

    • CreateJobRecaptchaV2(one, two, three, four) : long
    • GetResult(id) : string
  • Config | 8/8 calls done

    • Get(interfaceName, storage, key) : object
    • GetDefault(interfaceName, storage, key) : object
    • List() : IEnumerable<AdvancedConfigApiEntry>
    • List(pattern, returnDescription, returnValues, returnDefaultValues, returnEnumInfo) : IEnumerable<AdvancedConfigApiEntry>
    • ListEnum(type) : IEnumerable<EnumOption>
    • Query(query) : IEnumerable<AdvancedConfigApiEntry>
    • Reset(interfaceName, storage, key) : boolean
    • Set(interfaceName, storage, key) : boolean
  • DownloadController | 6/6 calls done

    • ForceDownload(linkIds[], packageIds[]) : boolean
    • Start() : boolean
    • Stop() : boolean
    • Pause(pause) : boolean
    • GetCurrentState() : string
    • GetSpeedInBps() : long
  • DownloadsV2 | 4/26 calls done

    • GetStopMark() : long
    • GetStopMarkedLink() : StopMarkedLinkReturnObject
    • QueryLinks(linkQuery) : IEnumerable<DownloadLinkObject>
    • QueryPackages(linkQuery) : IEnumerable<FilePackageObject>
  • Extensions | 5/5 calls done

    • Install(extensionId) : boolean
    • IsEnabled(className) : boolean
    • IsInstalled(extensionId) : boolean
    • List(ExtensionRequestObject) : IEnumerable<ExtensionResponseObject>
    • SetEnabled(className, enabled) : boolean
  • Extraction | 7/7 calls done

    • AddArchivePassword(password) : boolean
    • CancelExtraction(controllerId) : boolean
    • GetArchiveInfo(linkIds, packageIds) : IEnumerable<ArchiveStatus>
    • GetArchiveSettings(archiveIds) : IEnumerable<ArchiveSettings>
    • GetQueue() : IEnumerable<ArchiveStatus>
    • SetArchiveSettings(archiveId, archiveSettings) : boolean
    • StartExtractionNow(linkIds, packageIds) : Dictionary<string, boolean?>
  • JD | 6/6 calls done

    • DoSomethingCool()
    • GetCoreRevision() : int
    • RefreshPlugins() : boolean
    • Sum() : int
    • Uptime() : long
    • Version() : long
  • LinkCrawler | 1/1 calls done

    • IsCrawling() : boolean
  • LinkGrabberV2 | 19/30 calls done

    • Abort() : boolean
    • Abort(jobId) : boolean
    • AddLinks(AddLinkRequestObject) : boolean
    • AddContainer(containerType, content) : boolean
    • ClearList() : boolean
    • CleanUp(linkIds, packageIds, action, mode, selection) : boolean
    • GetChildrenChanged(structureWatermark) : long
    • GetDownloadFolderHistorySelectionBase() : string[]
    • GetDownloadUrls(linkIds, afterLinkId, destPackageId) : Dictionary<string, List<long>>
    • GetPackageCount() : int
    • GetVariants(linkId) : IEnumerable<GetVariantsReturnObject>
    • IsCollecting() : boolean
    • MoveLinks(linkIds, afterLinkId, destPackageId) : boolean
    • MovePackages(packageIds, afterDestPackageId) : boolean
    • MoveToDownloadList(linkIds, packageIds) : boolean
    • MoveToNewPackage(linkIds, packageIds, newPackageName, downloadPath) : boolean
    • QueryLinks(maxResults) : IEnumerable<QueryLinksResponseObject>
    • QueryPackages(QueryPackagesRequestObject) : IEnumerable<QueryPackagesResponseObject>
    • SetDownloadDirectory(directory, packageIds[]) : boolean
  • System | 7/7 calls done

    • ExitJd()
    • GetStorageInfos(path) : StorageInfoReturnObject[]
    • GetSystemInfos() : SystemInfoReturnObject
    • HibernateOS()
    • RestartJd()
    • ShutdownOS()
    • StandbyOS()
  • Update | 3/3 calls done

    • IsUpdateAvailable() : boolean
    • RestartAndUpdate()
    • RunUpdateCheck()
Samples

Here is a simple sample code which shows you how to connect, get a device handler and how to call a method:

JDownloaderHandler _JDownloaderHandler = new JDownloaderHandler("YOUREMAIL","YOURPASSWORD", "YOURAPPKEY");
if (_JDownloaderHandler.IsConnected)
{
    var devices = _JDownloaderHandler.GetDevices();
    if (devices.Count = 0)
    return;
    
    var deviceHandler = _JDownloaderHandler.GetDeviceHandler(devices[0]);
	//If you want to use the JDownloader API endpoint to connect to your device then you can call the GetDeviceHandler method like this:
    var deviceHandler = _JDownloaderHandler.GetDeviceHandler(devices[0], true);
    deviceHandler.AccountV2.AddAccount("mega.co.nz", "test123", "test123");
}

My.Jdownloader.Api .NET Wrapper by Cr1TiKa7

This is an simple wrapper for the official My.JDownloader.Api written in c#.
It's an rewritten and extended version of https://github.com/noone2407/MyJDownloaderApi.

Currently it supports: .NET 4.0, .NET 4.5, .NET 4.6 and .NETCore 2.0

Feel free to request missing calls, bugs or suggestions for improvements.

Usage

First of all you need an instance of the JDownloaderHandler

JDownloaderHandler _jdownloaderHandler = new JDownloaderHandler("YOURAPPKEY");
_jdownloaderHandler.Connect("YOURMYJDOWNLOADERUSERNAME", "YOURMYJDOWNLOADERPASSWORD");
//Alternaitve
JDownloaderHandler _jdownloaderHandler = new JDownloaderHandler("YOURMYJDOWNLOADERUSERNAME", "YOURMYJDOWNLOADERPASSWORD", "YOURAPPKEY");

The JDownloaderHandler contains the following methods:

  • Connect(email, password) : boolean
  • Reconnect() : boolean
  • Disconnect() : boolean
  • GetDevices() : List<DeviceObject>

After you successfully connected to the api you can get your active devices like this:

var devices = jdownloaderHandler.GetDevices();

Now that you got your devices you can call the methods of the namespaces on the device:

var device = devices[0];
//device.<namespace>.<method>();
device.Jd.DoSomethingCool();
Namespaces

For a better overview, the calls are split into different namespaces.
So far the library contains the following namespaces and methods:

  • Accounts | 11/12 calls done

    • AddAccount(hoster, email, password) : boolean
    • DisableAccounts(accountIds) : boolean
    • EnableAccounts(accountIds) : boolean
    • GetAccountInfo(accountId) : Account
    • GetPremiumHosterUrl(hoster) : string
    • ListPremiumHoster() : string[]
    • ListPremiumHosterUrls() : Dictionary<string, string>
    • QueryAccounts(apiQuery) : IEnumerable<Account>
    • RemoveAccounts(accountIds) : boolean
    • SetEnabledStatus(enabled, accountIds) : boolean
    • UpdateAccount(accountId, username, password) : boolean
  • AccountsV2 | 14/14 calls done

    • AddAccount(hoster, email, password) : boolean
    • AddBasicAuth(BasicAuthObject) : boolean
    • DisableAccounts(accountIds) : boolean
    • EnableAccounts(accountIds) : boolean
    • GetPremiumHosterUrl(hoster) : string
    • ListAccounts(ListAccountRequestObject) : IEnumerable<ListAccountResponseObject>
    • ListBasicAuth() : IEnumerable<ListBasicAuthResponseObject>
    • ListPremiumHoster() : string[]
    • ListPremiumHosterUrls() : Dictionary<string, string>
    • RefreshAccounts(accountIds) : boolean
    • RemoveAccounts(accountIds) : boolean
    • RemoveBasicAuths(basicAuthIds) : boolean
    • SetUsernameAndPassword(accountId, email, password) : boolean
    • UpdateBasicAuth(BasicAuthObject) : boolean
  • Captcha | 7/7 calls done

    • Get(id) : string
    • Get(id, format) : string
    • GetCaptchaJob(id) : CaptchaJob
    • List() : IEnumerable<CaptchaJob>
    • Skip(id, type) : bool
    • Solve(id, result, resultFormat) : bool
    • Solve(id, result) : bool
  • CaptchaForward | 2/2 calls done

    • CreateJobRecaptchaV2(one, two, three, four) : long
    • GetResult(id) : string
  • Config | 8/8 calls done

    • Get(interfaceName, storage, key) : object
    • GetDefault(interfaceName, storage, key) : object
    • List() : IEnumerable<AdvancedConfigApiEntry>
    • List(pattern, returnDescription, returnValues, returnDefaultValues, returnEnumInfo) : IEnumerable<AdvancedConfigApiEntry>
    • ListEnum(type) : IEnumerable<EnumOption>
    • Query(query) : IEnumerable<AdvancedConfigApiEntry>
    • Reset(interfaceName, storage, key) : boolean
    • Set(interfaceName, storage, key) : boolean
  • DownloadController | 6/6 calls done

    • ForceDownload(linkIds[], packageIds[]) : boolean
    • Start() : boolean
    • Stop() : boolean
    • Pause(pause) : boolean
    • GetCurrentState() : string
    • GetSpeedInBps() : long
  • DownloadsV2 | 4/26 calls done

    • GetStopMark() : long
    • GetStopMarkedLink() : StopMarkedLinkReturnObject
    • QueryLinks(linkQuery) : IEnumerable<DownloadLinkObject>
    • QueryPackages(linkQuery) : IEnumerable<FilePackageObject>
  • Extensions | 5/5 calls done

    • Install(extensionId) : boolean
    • IsEnabled(className) : boolean
    • IsInstalled(extensionId) : boolean
    • List(ExtensionRequestObject) : IEnumerable<ExtensionResponseObject>
    • SetEnabled(className, enabled) : boolean
  • Extraction | 7/7 calls done

    • AddArchivePassword(password) : boolean
    • CancelExtraction(controllerId) : boolean
    • GetArchiveInfo(linkIds, packageIds) : IEnumerable<ArchiveStatus>
    • GetArchiveSettings(archiveIds) : IEnumerable<ArchiveSettings>
    • GetQueue() : IEnumerable<ArchiveStatus>
    • SetArchiveSettings(archiveId, archiveSettings) : boolean
    • StartExtractionNow(linkIds, packageIds) : Dictionary<string, boolean?>
  • JD | 6/6 calls done

    • DoSomethingCool()
    • GetCoreRevision() : int
    • RefreshPlugins() : boolean
    • Sum() : int
    • Uptime() : long
    • Version() : long
  • LinkCrawler | 1/1 calls done

    • IsCrawling() : boolean
  • LinkGrabberV2 | 19/30 calls done

    • Abort() : boolean
    • Abort(jobId) : boolean
    • AddLinks(AddLinkRequestObject) : boolean
    • AddContainer(containerType, content) : boolean
    • ClearList() : boolean
    • CleanUp(linkIds, packageIds, action, mode, selection) : boolean
    • GetChildrenChanged(structureWatermark) : long
    • GetDownloadFolderHistorySelectionBase() : string[]
    • GetDownloadUrls(linkIds, afterLinkId, destPackageId) : Dictionary<string, List<long>>
    • GetPackageCount() : int
    • GetVariants(linkId) : IEnumerable<GetVariantsReturnObject>
    • IsCollecting() : boolean
    • MoveLinks(linkIds, afterLinkId, destPackageId) : boolean
    • MovePackages(packageIds, afterDestPackageId) : boolean
    • MoveToDownloadList(linkIds, packageIds) : boolean
    • MoveToNewPackage(linkIds, packageIds, newPackageName, downloadPath) : boolean
    • QueryLinks(maxResults) : IEnumerable<QueryLinksResponseObject>
    • QueryPackages(QueryPackagesRequestObject) : IEnumerable<QueryPackagesResponseObject>
    • SetDownloadDirectory(directory, packageIds[]) : boolean
  • System | 7/7 calls done

    • ExitJd()
    • GetStorageInfos(path) : StorageInfoReturnObject[]
    • GetSystemInfos() : SystemInfoReturnObject
    • HibernateOS()
    • RestartJd()
    • ShutdownOS()
    • StandbyOS()
  • Update | 3/3 calls done

    • IsUpdateAvailable() : boolean
    • RestartAndUpdate()
    • RunUpdateCheck()
Samples

Here is a simple sample code which shows you how to connect, get a device handler and how to call a method:

JDownloaderHandler _JDownloaderHandler = new JDownloaderHandler("YOUREMAIL","YOURPASSWORD", "YOURAPPKEY");
if (_JDownloaderHandler.IsConnected)
{
    var devices = _JDownloaderHandler.GetDevices();
    if (devices.Count = 0)
    return;
    
    var deviceHandler = _JDownloaderHandler.GetDeviceHandler(devices[0]);
	//If you want to use the JDownloader API endpoint to connect to your device then you can call the GetDeviceHandler method like this:
    var deviceHandler = _JDownloaderHandler.GetDeviceHandler(devices[0], true);
    deviceHandler.AccountV2.AddAccount("mega.co.nz", "test123", "test123");
}

Release Notes

- Fixed Issue #3 (QueryLinks of the LinkgrabberV2 endpoints  returns nothing if no parameter was set.)

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.4.2 53 10/20/2019
2.4.1 162 4/13/2019
2.4.0 140 1/28/2019
2.3.0 118 1/25/2019
2.2.0 108 1/24/2019
2.1.1 166 1/4/2019
2.0.0 309 5/25/2018
1.2.0 188 5/20/2018
1.1.1 218 5/18/2018
1.1.0 208 5/18/2018
1.0.1 213 5/16/2018
1.0.0 206 5/15/2018