Luraph.API
1.0.1
Prefix Reserved
See the version list below for details.
dotnet add package Luraph.API --version 1.0.1
NuGet\Install-Package Luraph.API -Version 1.0.1
<PackageReference Include="Luraph.API" Version="1.0.1" />
paket add Luraph.API --version 1.0.1
#r "nuget: Luraph.API, 1.0.1"
// Install Luraph.API as a Cake Addin #addin nuget:?package=Luraph.API&version=1.0.1 // Install Luraph.API as a Cake Tool #tool nuget:?package=Luraph.API&version=1.0.1
luraph-dotnet
This repository hosts the official SDK for interacting with the Luraph API from .NET environments.
Luraph API access is only available for accounts under certain plans. For more information, please check out the pricing plans on the Luraph website.
Installation
See more information on the NuGet Gallery Page.
Installation via .NET CLI:
dotnet add package Luraph.API
Installation via Package Manager Console:
Install-Package Luraph.API
Usage
The official Luraph API documentation contains the most up-to-date and complete information and instructions for integrating with the Luraph API.
Coming soon! See the test file for an example integration.
Documentation
The official Luraph API documentation contains the most up-to-date and complete information and instructions for integrating with the Luraph API.
class LuraphAPI {#class-luraphapi}
new LuraphAPI(string apiKey)
Description: Creates an instance of the SDK.
Parameters:
- apiKey - API key to authenticate your requests. You can fetch your API key from your account page.
Returns: LuraphAPI
GetNodes()
Description: Obtains a list of available obfuscation nodes.
Parameters: None!
Returns: NodesResponse
CreateNewJob(string node, string script, string fileName, Dictionary<string, object> options, bool useTokens = false, bool enforceSettings = false)
Description: Queues a new obfuscation task.
Parameters:
- node: The node to assign the obfuscation job to.
- script: The script to be obfuscated.
- fileName: A file name to associate with this script. The maximum file name is 255 characters.
- options: An object containing keys that represent the option identifiers, and values that represent the desired settings. Unless
enforceSettings
is set to false, all options supported by the node must have a value specified, else the endpoint will error. - useTokens - A boolean on whether you'd like to use tokens regardless of your active subscription.
- enforceSettings - A boolean on whether you'd like the
options
field to require every option requested by the server to be present with a valid value. If this is false, your integration will not break when invalid options are provided; however, updates that change Luraph's options will result in your integration using default settings when invalid values are specified. By default, this is set totrue
.
Returns: CreateJobResponse
GetJobStatus(string jobId)
Description: This endpoint does not return until the referenced obfuscation job is complete. The maximum timeout is 60 seconds, and this endpoint can be called a maximum of 3 times per job.
Parameters:
- jobId - The job ID of the obfuscation to wait for.
Returns: ObfuscateStatusResponse
DownloadResult(string jobId)
Description: Downloads the resulting file associated with an obfuscation job.
Parameters:
- jobId - The job ID of the obfuscation to download.
Returns: ObfuscateDownloadResponse
struct LuraphOption {class-luraphoption}
Fields:
- string Name - The human readable name associated with an option.
- string Description - The markdown formatted description for an option.
- Tier - One of
CUSTOMER_ONLY
,PREMIUM_ONLY
,ADMIN_ONLY
. - Type - One of
CHECKBOX
,DROPDOWN
,TEXT
. - string[] Choices - An array of acceptable option values when
type == DROPDOWN
.
struct LuraphNode {class-luraphnode}
Fields:
- double CpuUsage - The current CPU usage of the node.
- Dictionary<string, LuraphOption> Options - An object with option identifiers as keys and
LuraphOption
as values.
struct LuraphError {class-lurapherror}
Fields:
- string? Param - The parameter associated with the cause of the error.
- string Message - A human readable error message.
struct NodesResponse {class-nodesresponse}
Fields:
- string? RecommendedId - The most suitable node to perform an obfuscation based on current service load and other possible factors.
- Dictionary<string, LuraphNode> Nodes - A list of all available nodes to submit obfuscation jobs to.
struct CreateJobResponse {class-createjobresponse}
Fields:
- string JobId - A unique identifier for the queued obfuscation job.
struct ObfuscateStatusResponse {class-obfuscatestatusresponse}
Fields:
- bool Success - A boolean indicating whether the job was successful.
- string? Error - An error message if the job failed, or null if the job succeeded.
struct ObfuscateDownloadResponse {class-obfuscatedownloadresponse}
Fields:
- string FileName - A sanitized version of the initial filename, including a suffix to differentiate it from the original filename.
- Stream Data - A stream containing the obfuscated script.
class LuraphException : Exception
Fields:
- bool IsHttpError - Whether the exception was caused by an unhandled error.
- Errors - An array of LuraphError.
- Message - A human readable collection of error messages returned by a request.
Useful Links
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.