MCPcopy Index your code
hub / github.com/Hirevo/mega-rs

github.com/Hirevo/mega-rs @v0.8.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8.0 ↗ · + Follow
211 symbols 519 edges 31 files 71 documented · 34% updated 21mo agov0.8.0 · 2024-10-09★ 327 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

mega-rs

An API client library for interacting with MEGA

crates.io version

crates.io download count

docs.rs docs

crate license

About

This is an (unofficial) API client library for interacting with MEGA's API using Rust.

This library aims to implement most (if not all) interactions with MEGA's API in pure Rust.

This allows Rust applications to access MEGA without needing to depend on the MEGAcmd command-line tool being installed on the host system.

It can also allow for more fine-grained control over how the operations are carried-out, like downloading nodes concurrently.

Features

All features marked as not yet implemented are ideas of things that could be done, and not necessarily an indication of it currently being worked on.

These are also non-exhaustive, so if there is a feature that you'd like to see done, feel free to open an issue to show your interest in it, regardless of whether it is mentionned in this list or not.

If you wish to contribute to this project, feel free to use this list to see if there is something you would be interested to either work on, or simply sharing some of your knowledge on how it could be achieved.

  • [x] Login with MEGA
  • [x] MFA support
  • [x] Session resumption (deserialization)
  • [x] Session serialization
  • [x] Get storage quotas
  • [x] Listing nodes
  • [x] Downloading nodes
  • [x] Uploading nodes
  • [x] Creating folders
  • [x] Renaming, moving and deleting nodes
  • [x] Timeout support
  • [x] Retries (exponential-backoff) support
  • [x] Downloading thumbnails and preview images
  • [x] Uploading thumbnails and preview images
  • [x] Listing and downloading from public shared links
  • [x] Listing and downloading from password-protected shared links
  • [ ] Creating public shared links to owned nodes
  • [ ] Creating password-protected shared links to owned nodes
  • [ ] Support for privately-shared nodes (direct shares between MEGA contacts)
  • [x] Server-to-Client events support

Examples

You can see examples of how to use this library by looking at the different examples available.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Extension points exported contracts — how you extend this code

HttpClient (Interface)
(no doc) [1 implementers]
src/http/mod.rs

Core symbols most depended-on inside this repo

len
called by 27
src/lib.rs
send_requests
called by 23
src/lib.rs
build
called by 19
src/lib.rs
get_node_by_path
called by 16
src/lib.rs
fetch_own_nodes
called by 15
src/lib.rs
login
called by 14
src/lib.rs
logout
called by 14
src/lib.rs
iter
called by 13
src/lib.rs

Shape

Method 90
Function 63
Class 46
Enum 11
Interface 1

Languages

Rust100%

Modules by API surface

src/lib.rs82 symbols
src/protocol/commands.rs35 symbols
src/utils/mod.rs17 symbols
src/protocol/events.rs10 symbols
src/fingerprint.rs7 symbols
src/utils/rsa.rs5 symbols
src/attributes.rs4 symbols
src/http/reqwest.rs3 symbols
src/http/mod.rs3 symbols
examples/tree_listing.rs3 symbols
examples/thumbnail_upload.rs3 symbols
examples/simple_upload.rs3 symbols

For agents

$ claude mcp add mega-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact