Skip to main content

A Python SDK for interacting with the RooLink API

Project description

RooLink SDK

RooLink SDK is a Python library designed for seamless interaction with the RooLink API. It provides utilities for API request limits, parsing scripts, generating sensor data, and more.

Features

  • Fetch API request limits
  • Parse script data
  • Generate sensor data for validation
  • Create SBSD body
  • Generate pixel data
  • Solve sec-cpt challenges

Usage

Install the SDK via pip:

pip install roolink-sdk

Quick Start Here's how to use the SDK in your Python project:

Import the SDK and Initialize

from roolink_sdk.client import RooLink
from roolink_sdk.utils import get_bazadebezolkohpepadr, parse_script_url

# Initialize the RooLink SDK
api_key = "your_api_key"
protected_url = "https://example.com"
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"

session = RooLink(api_key, protected_url, user_agent)

Fetch API Request Limit

limit = session.request_limit()
print("Request Limit:", limit)

Parse Script Data

script_body = "function example() { return 'sample'; }"
parsed_data = session.parse_script_data(script_body)
print("Parsed Data:", parsed_data)

Generate Sensor Data

abck = "sample_abck"
bm_sz = "sample_bm_sz"
sensor_data = session.generate_sensor_data(abck, bm_sz)
print("Sensor Data:", sensor_data)

Generate SBSD Body

url = "https://example.com/"
vid = "sample_vid"
cookie = "sample_cookie"
sbsd_body = session.generate_sbsd_body(url, vid, cookie)
print("SBSD Body:", sbsd_body)

Generate Pixel Data

bazadebezolkohpepadr = 12345
hash_value = "sample_hash"
pixel_data = session.generate_pixel_data(bazadebezolkohpepadr, hash_value)
print("Pixel Data:", pixel_data)

Solve sec-cpt Challenges

token = "sample_token"
timestamp = 1234567890
nonce = "sample_nonce"
difficulty = 3
cookie = "sample_cookie"
sec_cpt_answers = session.generate_sec_cpt_answers(token, timestamp, nonce, difficulty, cookie)
print("Sec-CPT Answers:", sec_cpt_answers)

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roolink_sdk-1.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

roolink_sdk-1.0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page