mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 05:06:29 +00:00
Document and expose public members for Rojo API
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
//! Defines all the structs needed to interact with the Rojo API from an
|
||||
//! automation test perspective.
|
||||
//! Defines all the structs needed to interact with the Rojo Serve API.
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
@@ -7,9 +6,13 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::session_id::SessionId;
|
||||
|
||||
pub const SERVER_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
/// Server version to report over the API, not exposed outside this crate.
|
||||
pub(crate) const SERVER_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
/// Current protocol version, which is required to match.
|
||||
pub const PROTOCOL_VERSION: u64 = 3;
|
||||
|
||||
/// Response body from /api/rojo
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ServerInfoResponse<'a> {
|
||||
@@ -20,6 +23,7 @@ pub struct ServerInfoResponse<'a> {
|
||||
// pub root_instance_id: RbxId,
|
||||
}
|
||||
|
||||
/// Response body from /api/read/{id}
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ReadResponse {
|
||||
@@ -28,6 +32,7 @@ pub struct ReadResponse {
|
||||
// pub instances: HashMap<RbxId, InstanceWithMetadata<'a>>,
|
||||
}
|
||||
|
||||
/// Response body from /api/subscribe/{cursor}
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SubscribeResponse {
|
||||
|
||||
Reference in New Issue
Block a user