AutoSolveClient 1.0.2
See the version list below for details.
dotnet add package AutoSolveClient --version 1.0.2
NuGet\Install-Package AutoSolveClient -Version 1.0.2
<PackageReference Include="AutoSolveClient" Version="1.0.2" />
paket add AutoSolveClient --version 1.0.2
#r "nuget: AutoSolveClient, 1.0.2"
// Install AutoSolveClient as a Cake Addin #addin nuget:?package=AutoSolveClient&version=1.0.2 // Install AutoSolveClient as a Cake Tool #tool nuget:?package=AutoSolveClient&version=1.0.2
AYCD AutoSolve C# Client
Client for connecting to the AYCD AutoSolve network
Getting Started
For an example instantiation, take a look at testclient.cs.
Dependencies
Nuget packages auto-installed with client:
PubSub (>= 4.0.0)
RabbitMQ.Client (>= 5.1.2)
System.Collections.NonGeneric (>= 4.3.0)
System.Json (>= 4.7.0)
System.Runtime.Serialization.Json (>= 4.3.0)
System.Text.Json (>= 4.7.1)
Initialization
Integrate in a few simple steps. First, install the NuGet package in package manager, by searching for:
AutoSolveClient
Then, import the module into your application:
using AutoSolveClient
Next, instantiate the AutoSolve class.
AutoSolve client = new AutoSolve(
"accessToken",
"apiKey",
"clientId",
debug (boolean)
)
Where:
- accessToken is the user's access token
- apiKey is the user's api key generated for your program
- clientKey is the unique client identifier given to you by AYCD
- debug enables more thorough console logging for actions occuring. True for logging
To better integrate with your logging, debug emits an event (if true) to a listener, which you must create. An example:
this.client.ee.Subscribe<String>(message =>
{
//do what you want with the message here.
Console.WriteLine(message)
});
Then, you must create an event listener to handle responses sent from AutoSolve.
An example listener:
this.client.ee.Subscribe<AutoSolveResponse>(responseObject =>
{
handleAutosolveResponse(responseObject)
});
void handleAutosolveResponse(AutoSolveResponse responseObject) {
Console.WriteLine("Task ID :: " + responseObject.taskId)
Console.WriteLine("Site Key :: " + responseObject.siteKey)
Console.WriteLine("Token :: " + responseObject.token)
Console.WriteLine("Created At :: " + responseObject.createdAt)
Console.WriteLine("Version :: " + responseObject.version)
Console.WriteLine("Action :: " + responseObject.action)
}
Finally, you can now begin instantiating connections to AutoSolve by calling:
client.Init();
Request Data
You must send requests in the following format, using the AutoSolveMessage class get/set instantiatiors:
AutoSolveMessage message = new AutoSolveMessage()
{
//An ID for the task requesting captcha. This can be whatever.
taskId = "task1",
//Url of the site which the captcha was received
url = "https://recaptcha.autosolve.io/version/1",
//Public ReCaptcha key for a given site
siteKey = "6Ld_LMAUAAAAAOIqLSy5XY9-DUKLkAgiDpqtTJ9b",
//Api Key your customer needs from AYCD Autosolve
apiKey = autoSolve.apiKey,
//Map object for parameters for ReCaptcha v2, in the grecaptcha.render method
renderParameters = renderMap
//Version of ReCaptcha
//Options:
/**
V2_CHECKBOX is 0
V2_INVISIBLE is 1
V3_SCORE is 2
*/
version = "0",
//Only required for ReCaptcha V3. Site-specific value. More info:
//https://developers.google.com/recaptcha/docs/v3#actions
action = "",
//Minimum score required to pass the recaptcha
minScore = 0,
//Proxy used in the task which got the captcha
proxy = "",
//Is proxy required, some captcha services don't support use of proxies
//and will not be used if a proxy is necessary for captcha processing.
//Default is false
proxyRequired = false,
//User agent used in the request (optional)
userAgent = "",
//Cookies in the request (optional)
cookies = ""
}
Handling Responses
You will receive responses as an AutoSolveResponse object, with the following fields :
{
taskId
siteKey
token
createdAt
version
action
}
Sending Requests
Lastly, to send a request, use the following function, where message is of type AutoSolveMessage:
AutoSolveMessage message = new AutoSolveMessage() { taskId = "3", url = "https://google.com", ... }
client.sendMessage(message)
This will return true if successful, or false if unsuccessful. It is blocking and should be handled on another thread if possible. In the case that it is unsuccessful, use the following which will wait, attempt resend, and if failed push the message to a backlog to resend upon reconnection:
Error Handling
AutoSolve C# has automatic error handling and recovery, but will throw an exception if:
- Client Key is invalid
- API Key is invalid
- Access Token is invalid
- Connection error occurs AND recovery is not possible
Errors will be thrown as error object class AutoSolveException, with the following types:
- INVALID_CLIENT_ID
- INVALID_API_KEY_OR_ACCESS_TOKEN
- INPUT_VALUE_ERROR
License
This project is licensed under the MIT License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- PubSub (>= 4.0.0)
- RabbitMQ.Client (>= 5.1.2)
- System.Collections.NonGeneric (>= 4.3.0)
- System.Json (>= 4.7.0)
- System.Runtime.Serialization.Json (>= 4.3.0)
- System.Text.Json (>= 4.7.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.1.3 | 1,979 | 8/21/2020 | |
2.1.2 | 584 | 7/3/2020 | |
2.1.1 | 563 | 7/3/2020 | |
2.1.0 | 506 | 4/30/2020 | |
2.0.9 | 452 | 4/28/2020 | |
2.0.8 | 437 | 4/27/2020 | |
2.0.7 | 439 | 4/27/2020 | |
2.0.6 | 450 | 4/25/2020 | |
2.0.5 | 442 | 4/24/2020 | |
2.0.4 | 439 | 4/23/2020 | |
2.0.3 | 436 | 4/23/2020 | |
2.0.2 | 439 | 4/22/2020 | |
2.0.1 | 520 | 4/21/2020 | |
2.0.0 | 447 | 4/21/2020 | |
1.2.0 | 465 | 4/20/2020 | |
1.1.9 | 503 | 4/20/2020 | |
1.1.8 | 512 | 4/20/2020 | |
1.1.7 | 477 | 4/9/2020 | |
1.1.6 | 590 | 4/7/2020 | |
1.1.5 | 450 | 4/2/2020 | |
1.1.4 | 458 | 3/31/2020 | |
1.1.3 | 476 | 3/31/2020 | |
1.1.2 | 482 | 3/31/2020 | |
1.1.1 | 468 | 3/31/2020 | |
1.1.0 | 520 | 3/30/2020 | |
1.0.9 | 550 | 3/30/2020 | |
1.0.8 | 490 | 3/22/2020 | |
1.0.7 | 485 | 3/20/2020 | |
1.0.6 | 475 | 3/19/2020 | |
1.0.5 | 485 | 3/19/2020 | |
1.0.4 | 451 | 3/18/2020 | |
1.0.3 | 465 | 3/18/2020 | |
1.0.2 | 463 | 3/18/2020 | |
1.0.1 | 469 | 3/9/2020 | |
1.0.0 | 534 | 3/7/2020 | |
0.0.4 | 577 | 3/7/2020 | |
0.0.3 | 543 | 3/6/2020 | |
0.0.2 | 526 | 3/6/2020 | |
0.0.1 | 516 | 3/6/2020 |