Wallogit.com
2017 © Pedro Peláez
Bundle provide ability work with Worksnaps API.
composer require makarenko/worksnaps-bundle, (*2)
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Umbrella\WorksnapsBundle\WorksnapsBundle(),
);
// ...
}
// ...
}
# app/config/config.yml
worksnaps:
api_key: "YOUR API KEY HERE"
$allProjects = $this->get('umbrella.worksnaps')->getProjects();, (*3)
$project = $this->get('umbrella.worksnaps')->getProject( $projectId );, (*4)
======, (*5)
$tasks = $this->get('umbrella.worksnaps')->getTasks( $projectId );, (*6)
$task = $this->get('umbrella.worksnaps')->getTask( $projectId, $taskId );, (*7)
======, (*8)
$users = $this->get('umbrella.worksnaps')->getUsersFromProject( $projectId );, (*9)
$user = $this->get('umbrella.worksnaps')->getUserFromProject( $projectId, $userId );, (*10)
======, (*11)
$myUser = $this->get('umbrella.worksnaps')->getMyUser();, (*12)
$users = $this->get('umbrella.worksnaps')->getUsers();, (*13)
$user = $this->get('umbrella.worksnaps')->getUser( $userId );, (*14)
======, (*15)
$tasksInProject = $this->get('umbrella.worksnaps')->getTasksFromProject( $projectId );, (*16)
$taskInProject = $this->get('umbrella.worksnaps')->getTaskFromProject( $projectId, $taskId );, (*17)
======, (*18)
$timeEntries = $this->get('umbrella.worksnaps')->getTimeEntries( $projectId, array( $userId ), $fromTimestamp, $toTimestamp );, (*19)
$timeEntriesForUser = $this->get('umbrella.worksnaps')->getTimeEntriesForUser( $projectId, $userId, $fromTimestamp, $toTimestamp );, (*20)
$fullUrl = $this->get('umbrella.worksnaps')->getScreenshot( $projectId, $timeEntryId );, (*21)
$timeEntry = $this->get('umbrella.worksnaps')->getTimeEntry( $projectId, $timeEntryId );, (*22)
======, (*23)
$report = $this->get('umbrella.worksnaps')->getReport( $projectId, $fromTimestamp, $toTimestamp, [ $userId ] );, (*24)