diff --git a/mantle/rbx_api/src/places/mod.rs b/mantle/rbx_api/src/places/mod.rs index b7656cf..d79fcf4 100644 --- a/mantle/rbx_api/src/places/mod.rs +++ b/mantle/rbx_api/src/places/mod.rs @@ -2,7 +2,8 @@ pub mod models; use std::{fs, path::PathBuf}; -use reqwest::{header, Body, StatusCode}; +use reqwest::{Body, StatusCode}; +use serde_json::json; use crate::{ errors::{RobloxApiError, RobloxApiResult}, @@ -153,14 +154,15 @@ impl RobloxApi { ) -> RobloxApiResult { let req = self .client - .post("https://www.roblox.com/ide/places/createV2") - .header(header::CONTENT_LENGTH, 0) - .query(&[ - ("universeId", &experience_id.to_string()), - ("templatePlaceIdToUse", &95206881.to_string()), - ]); + .post(format!( + "https://apis.roblox.com/universes/v1/user/universes/{}/places", + experience_id + )) + .json(&json!({ + "templatePlaceId": 95206881 + })); - handle_as_json_with_status(req).await + handle_as_json(req).await } pub async fn configure_place( diff --git a/mantle/rbx_api/src/places/models.rs b/mantle/rbx_api/src/places/models.rs index fb58da5..e9dbbf4 100644 --- a/mantle/rbx_api/src/places/models.rs +++ b/mantle/rbx_api/src/places/models.rs @@ -5,7 +5,7 @@ use crate::models::{AssetId, SocialSlotType}; pub const DEFAULT_PLACE_NAME: &str = "Untitled Game"; #[derive(Deserialize)] -#[serde(rename_all = "PascalCase")] +#[serde(rename_all = "camelCase")] pub struct CreatePlaceResponse { pub place_id: AssetId, }