Adding code to the syncers module
This commit is contained in:
@@ -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) {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user