From b211ce63256b5daa1b4cc267b43fdc71d2f0cb72 Mon Sep 17 00:00:00 2001 From: not a cow <104355555+not-a-cowfr@users.noreply.github.com> Date: Thu, 11 Sep 2025 18:43:23 -0700 Subject: [PATCH 1/4] python --- src/docs/integrations/python.md | 73 +++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 src/docs/integrations/python.md diff --git a/src/docs/integrations/python.md b/src/docs/integrations/python.md new file mode 100644 index 0000000..09695fb --- /dev/null +++ b/src/docs/integrations/python.md @@ -0,0 +1,73 @@ +--- +title: Python +date: 2025-09-11 +category: integrations +author: not a cow +description: How to use Skyblock Repo in Python projects +tags: + - integration + - tutorial + - python +published: true +--- + +A [PyPi package](https://pypi.org/manage/project/skyblock-repo) is available to use to easily interact with the raw data from the [Skyblock Repo] + +## Installation + +You can add the library to your project with: + +```sh +pip install skyblock-repo +``` + +## Usage + +The library provides **very simple** methods to retrieve the data for specific items. + +### Dealing with the raw repo + +`download_repo` downloads the repo and extracts its content. + +Attempting to download the repo while the `SkyblockRepo` directory already exists will return prematurely. + +`delete_zip` param determines whether or not to delete the zip download and only keep the extracted files, it is `True` by default. + +```python +try: + await download_repo() +except e: + print(f'Failed to download repo: {e}') +``` + +`delete_repo` deletes the `SkyblockRepo` directory and `SkyblockRepo-main.zip` if they exist. + +```python +try: + delete_repo() +except e: + print(f'Failed to delete repo: {e}') +``` + +### Using the library to interop with the repo + +First, you need to initialize the SkyblockRepo data. + +```python +try: + repo = SkyblockRepo() +except e: + print(f'Failed to initialize repo: {e}') +``` + +Then you can fetch data for a specific item. + +On success, these return the data, else `None`. + +```python +enchantment = repo.get_enchantment_by_id("TELEKINESIS"); +item = repo.get_item_by_id("STAR_SWORD_9000"); +pet = repo.get_pet_by_id("PHOENIX"); +``` + +[Skyblock Repo]: https://github.com/SkyblockRepo/Repo From 14e0316669d70a647b586ef63423cf0a5b78a437 Mon Sep 17 00:00:00 2001 From: not a cow <104355555+not-a-cowfr@users.noreply.github.com> Date: Thu, 11 Sep 2025 18:43:27 -0700 Subject: [PATCH 2/4] rust --- src/docs/integrations/rust.md | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/docs/integrations/rust.md diff --git a/src/docs/integrations/rust.md b/src/docs/integrations/rust.md new file mode 100644 index 0000000..e48a013 --- /dev/null +++ b/src/docs/integrations/rust.md @@ -0,0 +1,64 @@ +--- +title: Rust +date: 2025-09-11 +category: integrations +author: not a cow +description: How to use Skyblock Repo in Rust projects +tags: + - integration + - tutorial + - rust +published: true +--- + +A [Cargo package](https://crates.io/crates/skyblock-repo) is available to use to easily interact with the raw data from the [Skyblock Repo] + +## Installation + +You can add the library to your project with: + +```sh +cargo add skyblock-repo +``` + +## Usage + +The library provides **very simple** methods to retrieve the data for specific items. + +### Dealing with the raw repo + +`download_repo` downloads the repo and extracts its content + +Attempting to download the repo while the `SkyblockRepo` directory already exists will return `Ok(())` prematurely. Additionally, if the `log` feature is enabled, print a warning to the stdout. + +`delete_zip` param determines whether or not to delete the zip download and only keep the extracted files. + +```rust +download_repo(true).await?; +``` + +`delete_repo` deletes the `SkyblockRepo` directory and `SkyblockRepo-main.zip` if they exist. + +```rust +delete_repo().await?; +``` + +### Using the library to interop with the repo + +First, you need to initialize the SkyblockRepo data. + +```rust +let repo = SkyblockRepo::new()?; +``` + +Then you can fetch data for a specific item. + +On success, these return `Some()`, else `None`. + +```rust +let enchantment: SkyblockEnchant = repo.get_enchantment_by_id("TELEKINESIS"); +let item: SkyblockItem = repo.get_item_by_id("STAR_SWORD_9000"); +let pet: SkyblockPet = repo.get_pet_by_id("PHOENIX"); +``` + +[Skyblock Repo]: https://github.com/SkyblockRepo/Repo From 973b603d9d85558b9e54e498fbfd7b92ce4297fb Mon Sep 17 00:00:00 2001 From: not a cow <104355555+not-a-cowfr@users.noreply.github.com> Date: Fri, 12 Sep 2025 16:08:48 -0700 Subject: [PATCH 3/4] v1.0.4 update --- src/docs/integrations/python.md | 2 +- src/docs/integrations/rust.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/docs/integrations/python.md b/src/docs/integrations/python.md index 09695fb..f72a788 100644 --- a/src/docs/integrations/python.md +++ b/src/docs/integrations/python.md @@ -35,7 +35,7 @@ Attempting to download the repo while the `SkyblockRepo` directory already exist ```python try: - await download_repo() + download_repo() except e: print(f'Failed to download repo: {e}') ``` diff --git a/src/docs/integrations/rust.md b/src/docs/integrations/rust.md index e48a013..6bc76c1 100644 --- a/src/docs/integrations/rust.md +++ b/src/docs/integrations/rust.md @@ -34,13 +34,13 @@ Attempting to download the repo while the `SkyblockRepo` directory already exist `delete_zip` param determines whether or not to delete the zip download and only keep the extracted files. ```rust -download_repo(true).await?; +download_repo(true)?; ``` `delete_repo` deletes the `SkyblockRepo` directory and `SkyblockRepo-main.zip` if they exist. ```rust -delete_repo().await?; +delete_repo()?; ``` ### Using the library to interop with the repo From a1c58db6eb7d200c60fc36e815f24f6c99d1d239 Mon Sep 17 00:00:00 2001 From: not a cow <104355555+not-a-cowfr@users.noreply.github.com> Date: Fri, 12 Sep 2025 17:08:22 -0700 Subject: [PATCH 4/4] add repo link --- src/docs/integrations/python.md | 3 +++ src/docs/integrations/rust.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/docs/integrations/python.md b/src/docs/integrations/python.md index f72a788..bb8ea78 100644 --- a/src/docs/integrations/python.md +++ b/src/docs/integrations/python.md @@ -13,6 +13,8 @@ published: true A [PyPi package](https://pypi.org/manage/project/skyblock-repo) is available to use to easily interact with the raw data from the [Skyblock Repo] +If you need extra help, make an issue on the [GitHub repository]. + ## Installation You can add the library to your project with: @@ -71,3 +73,4 @@ pet = repo.get_pet_by_id("PHOENIX"); ``` [Skyblock Repo]: https://github.com/SkyblockRepo/Repo +[Github repository]: https://github.com/SkyblockRepo/RepoRS diff --git a/src/docs/integrations/rust.md b/src/docs/integrations/rust.md index 6bc76c1..e194207 100644 --- a/src/docs/integrations/rust.md +++ b/src/docs/integrations/rust.md @@ -13,6 +13,8 @@ published: true A [Cargo package](https://crates.io/crates/skyblock-repo) is available to use to easily interact with the raw data from the [Skyblock Repo] +If you need extra help, make an issue on the [GitHub repository]. + ## Installation You can add the library to your project with: @@ -62,3 +64,4 @@ let pet: SkyblockPet = repo.get_pet_by_id("PHOENIX"); ``` [Skyblock Repo]: https://github.com/SkyblockRepo/Repo +[Github repository]: https://github.com/SkyblockRepo/RepoRS