🦀 lunaria-api
A Rust API client for the video game Lunaria.
Lunaria is a video game for programmers, and is played by writing code that interacts with the game through a gRPC API. This crate contains a gRPC client that is auto-generated from the Protocol Buffers that declare Lunaria's API.
Getting Started
First, add lunaria-api
as a dependency to your Cargo.toml
.
Because lunaria-api
wraps a client generated by tonic
, it must be
added as a dependency as well. And if you are building a binary, you also need
an async runtime like tokio
.
[]
= "0.2.1"
= { = "0.2.22", = ["macros", "rt-threaded"] }
= "0.3.1"
Next, import LunariaClient
and connect to the game server. Check out Lunaria's
API specification below to learn about all the requests you can send, and the
data they require and return:
https://github.com/playlunaria/lunaria-api/tree/main/protobufs
Here is an example that fetches the version of the game:
use LunariaSerrviceClient;
use ;
use Request;
async
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.