public function obtener($idProyecto = 0) { try { \TeamWorkPm\Auth::set($this->apiKey); $request = \TeamWorkPm\Factory::build('Project/Expenses'); $Expenselist = $request->getAll(); $this->response["status"] = "exito"; if (count($Expenselist) > 0) { foreach ($Expenselist as $key => $objeto) { $ExpenseDTO = new ExpenseDTO(); foreach ($ExpenseDTO as $keyB => $valueB) { $ExpenseDTO->{$keyB} = $objeto->{$keyB}; } $this->response["body"][] = $ExpenseDTO; } $this->response["message"] = "Listado de gastos del proyecto completo"; } else { $this->response["body"] = array(); $this->response["message"] = "No hay gastos relacionados"; } } catch (\Exception $e) { error_log(print_r($e, true)); $this->response["message"] = $e->getMessage(); } }
public function obtenerElemento($idProyecto) { try { \TeamWorkPm\Auth::set($this->apiKey); $request = \TeamWorkPm\Factory::build('Task_List'); $tasklist = $request->getByProject($idProyecto); $this->response["message"] = "Listado de tareas del proyecto completo"; $this->response["status"] = "exito"; } catch (\Exception $e) { $this->response["message"] = $e->getMessage(); } }
public function obtener() { try { \TeamWorkPm\Auth::set($this->apiKey); $request = \TeamWorkPm\Factory::build('Project'); $project = $request->getAll(); if (count($project) > 0) { foreach ($project as $key => $objeto) { $projectDTO = new ProjectDTO(); foreach ($projectDTO as $keyB => $valueB) { $projectDTO->{$keyB} = $objeto->{$keyB}; } $this->response["body"][] = $projectDTO; } } $this->response["message"] = "Listado de companias completo"; $this->response["status"] = "exito"; } catch (\Exception $e) { $this->response["message"] = $e->getMessage(); } }
public function obtener() { try { \TeamWorkPm\Auth::set($this->apiKey); $request = \TeamWorkPm\Factory::build('time'); $time = $request->getAll(); if (count($time) > 0) { foreach ($time as $key => $objeto) { $timeDTO = new TimeDTO(); foreach ($timeDTO as $keyB => $valueB) { $timeDTO->{$keyB} = $objeto->{$keyB}; } $this->response["body"][] = $timeDTO; } } $this->response["message"] = "Listado de companias completo"; $this->response["status"] = "exito"; } catch (\Exception $e) { //error_log(print_r($e,true)); $this->response["message"] = $e->getMessage(); } }
public function obtener() { try { \TeamWorkPm\Auth::set($this->apiKey); $request = \TeamWorkPm\Factory::build('milestone'); $response = $request->getAll(); if (count($response) > 0) { foreach ($response as $key => $objeto) { $milestoneDTO = new MilestoneDTO(); foreach ($milestoneDTO as $keyB => $valueB) { $milestoneDTO->{$keyB} = $objeto->{$keyB}; } $this->response["body"][] = $milestoneDTO; } } else { $this->response['body'] = array(); } $this->response["message"] = "Listado de milestone completo"; $this->response["status"] = "exito"; } catch (\Exception $e) { $this->response["message"] = $e->getMessage(); } }
public function obtener() { try { \TeamWorkPm\Auth::set($this->apiKey); $request = \TeamWorkPm\Factory::build('tags'); $tags = $request->getAll(); $this->response["status"] = "exito"; if (count($tags) > 0) { foreach ($tags as $key => $objeto) { $tagDTO = new TagDTO(); foreach ($tagDTO as $keyB => $valueB) { $tagDTO->{$keyB} = $objeto->{$keyB}; } $this->response["body"][] = $tagDTO; } $this->response["message"] = "Listado de etiquetas completo"; } else { $this->response["body"] = array(); $this->response["message"] = "No hay etiquetas relacionadas"; } } catch (\Exception $e) { $this->response["message"] = $e->getMessage(); } }