Adding code to the syncers module

This commit is contained in:
kdeng00
2024-04-16 20:34:00 -04:00
parent 0f6c4460f0
commit 33abb7b948
2 changed files with 29 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
use crate::models;
#[derive(Clone, Debug)]
pub struct Delete {
}
impl Delete {
pub fn delete_song(&self, token: &models::token::Token, song: &models::song::Song) {
}
}
+19
View File
@@ -0,0 +1,19 @@
use crate::models;
struct Syncer {
}
impl Syncer {
pub fn retrieve_url(api: &models::api::API, song: &models::song::Song) -> String {
let mut url: String = String::from(&api.url);
url += &String::from("api/");
url += &String::from(&api.version);
url += &String::from("/");
url += &String::from(&api.endpoint);
url += &String::from("/");
url += &song.id.unwrap().to_string();
return url;
}
}