Closed jcandan closed 1 month ago
This is the right way
TeamWorkPm\Auth::set(API_KEY);
$project = TeamWorkPm\Factory::build('project')
$projects = $project->getAll();
Other way:
TeamWorkPm\Auth::set(API_KEY);
list($company, $key) = TeamWorkPm\Auth::get();
$project = TeamWorkPm\Project::getInstance($company, $key);
$projects = $project->getAll();
Awesome, yeah I finally saw a glimpse of that in examples/save_data.php. I missed it because I saw 'build' and thought that was another CREATE example.
So, I do have one other question: How does one get a single object? Here's what I've tried:
TeamWorkPm\Auth::set(API_KEY);
$projects = TeamWorkPm\Factory::build('project');
$data = $projects->getAll(array($project_id));
Hi this is the main source for Project class:
https://github.com/loduis/TeamWorkPmPhpApi/blob/master/src/Model.php https://github.com/loduis/TeamWorkPmPhpApi/blob/master/src/Project.php Here is a get method
TeamWorkPm\Auth::set(API_KEY);
$project = TeamWorkPm\Factory::build('project');
$data = $project->get($project_id);
I'm having trouble getting a list of Projects and other Teamwork objects.
returns the following error:
After which I tried:
and got the following error:
What am I doing wrong?