public void addCollections(string name, string desc, string projectId, string projectName, Action <string> callback, string phasesId = null) { Dictionary <string, string> toAdd = new Dictionary <string, string>(); toAdd.Add("name", name); toAdd.Add("description", desc); toAdd.Add("fk_id_project", projectId); toAdd.Add("fk_id_phase", phasesId); api.request(toAdd, "/api/project/" + projectName + "/card", "POST", callback); }
public void addCollections(string value, string projectId, string projectName, string cardId, string ressourceId, string posX, string posY) { Dictionary <string, string> toAdd = new Dictionary <string, string>(); ///api/project/{name}/card/{id}/ressource/{idr}/ toAdd.Add("value", value); toAdd.Add("fk_id_project", projectId); toAdd.Add("fk_id_cards", cardId); toAdd.Add("fk_id_ressource", ressourceId); toAdd.Add("posX", posX); toAdd.Add("posY", posY); api.request(toAdd, "/api/project/" + projectName + "/card/" + cardId + "/ressource/" + ressourceId + "/", "POST", null); }
public void addCollections(string name, string handSize, string desc, string nb_card, string nb_re, Action <string> call, string async = "false", string turn = "false") { Dictionary <string, string> toAdd = new Dictionary <string, string>(); toAdd.Add("name", name); toAdd.Add("async_game", async); toAdd.Add("turn_game", turn); toAdd.Add("hand_size", handSize); toAdd.Add("min", "2"); toAdd.Add("max", "2"); toAdd.Add("description", desc); print("IN MODEL"); api.request(toAdd, "/api/project", "POST", call); }
public void addCollections(string cardId, string projectName, string name, string desc, string[] signal, string[] var_type, string[] instruction, string[] variables, string[] var_description, string priority, Action <string> callback) { Dictionary <string, string> toAdd = new Dictionary <string, string>(); print(JsonConvert.SerializeObject(signal, Formatting.Indented)); toAdd.Add("name", name); toAdd.Add("description", desc); toAdd.Add("signals", JsonConvert.SerializeObject(signal, Formatting.Indented)); toAdd.Add("var_type", JsonConvert.SerializeObject(var_type, Formatting.Indented)); toAdd.Add("instructions", JsonConvert.SerializeObject(instruction, Formatting.Indented)); toAdd.Add("variables", JsonConvert.SerializeObject(variables, Formatting.Indented)); toAdd.Add("var_description", JsonConvert.SerializeObject(var_description, Formatting.Indented)); toAdd.Add("priority", priority); api.request(toAdd, "/api/project/" + projectName + "/card/" + cardId + "/pack", "POST", callback); }
void click() { SessionData data = session.GetComponent <SessionData>(); TMP_Text msg = loginMessage.GetComponent <TMP_Text>(); string email = inputEmail.GetComponent <TMP_InputField>().text; string pswd = inputPswd.GetComponent <TMP_InputField>().text; string apiAdress = apiAddressInput.GetComponent <TMP_InputField>().text; if (pswd.Length < 6) { msg.text = "Please, enter a valide password"; return; } data.updateData("email", email); data.updateData("id", "1"); data.updateData("api_address", apiAdress); data.updateData("pwd", pswd); api.request(null, "/api/project", "GET", applyInResponseServer); }
public void addCollections(string name, string desc, string priority, string projectId, string projectName, Action <string> callback) { Dictionary <string, string> toAdd = new Dictionary <string, string>(); toAdd.Add("fk_id_project", projectId); toAdd.Add("name", name); toAdd.Add("description", desc); toAdd.Add("playable", "true"); toAdd.Add("priority", priority); toAdd.Add("pack", "[]"); toAdd.Add("is_editable", "true"); print(JsonConvert.SerializeObject(toAdd)); api.request(toAdd, "/api/project/" + projectName + "/phase", "POST", callback); }
public void addCollections(string name, string desc, string projectId, string projectName, Action <string> callback, string imgId = "0", string playerVal = null) { Dictionary <string, string> toAdd = new Dictionary <string, string>(); toAdd.Add("name", name); toAdd.Add("description", desc); toAdd.Add("fk_id_project", projectId); toAdd.Add("img_id", imgId); if (playerVal != null) { toAdd.Add("player_value", playerVal); } api.request(toAdd, "/api/project/" + projectName + "/ressource", "POST", callback); }