Metadata-Version: 2.1
Name: roolink-sdk
Version: 1.0.0
Summary: A Python SDK for interacting with the RooLink API
License: The MIT License (MIT)
        
        Copyright (c) 2024 RooLinkIO
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
Project-URL: Homepage, https://github.com/RooLinkIO/roolink-sdk-py
Project-URL: Repository, https://github.com/RooLinkIO/roolink-sdk-py
Keywords: SDK,RooLink,API
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.20.0

# 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:

```bash
pip install roolink-sdk
```
Quick Start
Here's how to use the SDK in your Python project:

### Import the SDK and Initialize
```python
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
```python
limit = session.request_limit()
print("Request Limit:", limit)
```
### Parse Script Data
```python
script_body = "function example() { return 'sample'; }"
parsed_data = session.parse_script_data(script_body)
print("Parsed Data:", parsed_data)
```
### Generate Sensor Data
```python
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
```python
vid = "sample_vid"
cookie = "sample_cookie"
sbsd_body = session.generate_sbsd_body(vid, cookie)
print("SBSD Body:", sbsd_body)
```
### Generate Pixel Data
```python
bazadebezolkohpepadr = 12345
hash_value = "sample_hash"
pixel_data = session.generate_pixel_data(bazadebezolkohpepadr, hash_value)
print("Pixel Data:", pixel_data)
```
### Solve sec-cpt Challenges
```python
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
```markdown
This project is licensed under the MIT License. See the LICENSE file for details.
```
