#edgee #sdk #content #url #version #host #edge

edgee-sdk

The full-stack edge platform for your edge oriented applications

7 stable releases

new 1.5.0 Feb 20, 2025
1.4.0 Jan 27, 2025
1.3.1 Dec 22, 2024
1.2.0 Nov 28, 2024

#1115 in Development tools

Download history 166/week @ 2024-11-26 64/week @ 2024-12-03 66/week @ 2024-12-10 250/week @ 2024-12-17 39/week @ 2024-12-24 176/week @ 2024-12-31 35/week @ 2025-01-07 19/week @ 2025-01-14 100/week @ 2025-01-21 104/week @ 2025-01-28 53/week @ 2025-02-04 95/week @ 2025-02-11

359 downloads per month
Used in 2 crates (via edgee-server)

Apache-2.0

54KB
130 lines

Edgee

Edgee

Edgee SDK Library

Overview

The Edgee SDK Library provides functionality to retrieve and dynamically modify SDK content based on the version specified in the URL. This library includes functions to extract the SDK version from a URL, retrieve the corresponding SDK content, and modify the SDK paths to match the host configuration.

Usage

To retrieve the SDK content from a given URL, use the get_sdk_from_url function. This function takes a URL and a host as arguments and returns the SDK content wrapped in a <script> tag if successful, or an error message if not.

Example

let url = "https://example.com/sdk/v1.1.0.js";
let host = "example.com";
let sdk_content = get_sdk_from_url(url, host);
assert!(sdk_content.is_ok());

Installation

To use this library, add edgee-sdk as a dependency in your Cargo.toml:

[dependencies]
edgee-sdk = "1"

Dependencies

~18KB