diff --git a/README.md b/README.md index c7453e4..6638e86 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -#php-timecamp-api +# php-timecamp-api A [Timecamp](http://www.timecamp.com/) PHP client. Presents returned data from the [Timecamp API](https://github.com/timecamp2/timecamp-api) as associative arrays. ## Installation ```shell -$ composer require gisforgirard/php-timecamp-api +$ composer require timecamp/php-timecamp-api ``` ## Usage @@ -26,7 +26,7 @@ foreach ($activities as $this_activity) { ``` -##Authentication +## Authentication Authentication is very simple. You must pass your Timecamp API token when instantiating `Timecamp\Connection`. Example: @@ -40,8 +40,6 @@ To get your API token go to [your Timecamp Account Settings](https://www.timecam ### Users -### users() - Return all users from account. **Example** @@ -57,15 +55,56 @@ print_r($users); ``` -### tasks +### Tasks +these are all functions based exactly on the timecamp api itself, just pass an array of key => var you want to send to the server... anyway there's more specific info in the respective files... + +$users = $timecamp_client->Users()->get($array); + +$users = $timecamp_client->Users()->post($array); + +$users = $timecamp_client->Users()->put($array); + +### TimeEntries +works the same as Tasks (and all the other functions for the most part as well) + +$time_entries = $timecamp_client->TimeEntries()->get($array); + +$time_entries = $timecamp_client->TimeEntries()->post($array); + +$time_entries = $timecamp_client->TimeEntries()->put($array); + +### Attendance +$attendance = $timecamp_client->Attendance()->get($array); + +### AwayTime +$attendance = $timecamp_client->AwayTime()->get($array); + +### Clients +$clients = $timecamp_client->Clients()->all(); + +$clients = $timecamp_client->Clients()->update($array); + +$clients = $timecamp_client->Clients()->add($array); + +### Invoices +$invoices = $timecamp_client->Invoices->all(); + +$invoices = $timecamp_client->Invoices()->update($array); + +$invoices = $timecamp_client->Invoices()->add($array); + +### Timer +$timer = $timecamp_client->Timer->all($array); + +$timer = $timecamp_client->Timer->status($array); + +$timer = $timecamp_client->Timer->stop($array); -### tasks($options) -these are all functions +### ComputerActivities (probably want to look at the individual files or documentation here, things are a bit different) +$activities = $timecamp_client->ComputerActivities()->getActivity('2014-03-07'); -### Time entries +$activities = $timecamp_client->ComputerActivities()->getApplication(6319,2132); -####entries($options) -that are in the timecamp code +$activities = $timecamp_client->ComputerActivities()->getWindowTitle(1,2); -####timeEntries($options) -that i got inspired on but they never finished +$activities = $timecamp_client->ComputerActivities()->addActivity($array);