From 6f5c874223fc1315e829b408af733d1bd1c9eb97 Mon Sep 17 00:00:00 2001 From: gisforgirard Date: Sat, 22 Apr 2017 14:48:25 -0700 Subject: [PATCH 1/5] Update README.md forgot how bad this was --- README.md | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c7453e4..738b93d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A [Timecamp](http://www.timecamp.com/) PHP client. Presents returned data from t ## Installation ```shell -$ composer require gisforgirard/php-timecamp-api +$ composer require timecamp/php-timecamp-api ``` ## Usage @@ -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,43 @@ 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); -### tasks($options) -these are all functions +### Clients +$clients = $timecamp_client->Clients()->all(); +$clients = $timecamp_client->Clients()->update($array); +$clients = $timecamp_client->Clients()->add($array); -### Time entries +### Invoices +$invoices = $timecamp_client->Invoices->all(); +$invoices = $timecamp_client->Invoices()->update($array); +$invoices = $timecamp_client->Invoices()->add($array); -####entries($options) -that are in the timecamp code +### Timer +$timer = $timecamp_client->Timer->all($array); +$timer = $timecamp_client->Timer->status($array); +$timer = $timecamp_client->Timer->stop($array); -####timeEntries($options) -that i got inspired on but they never finished +### ComputerActivities (camel case function names? not sure...) +$activities = $timecamp_client->ComputerActivities()->getActivity('2014-03-07'); +$activities = $timecamp_client->ComputerActivities()->getApplication(6319,2132); +$activities = $timecamp_client->ComputerActivities()->getWindowTitle(1,2); +$activities = $timecamp_client->ComputerActivities()->addActivity($array); From d1a2c60e6e9571e34a68dfb087af3109a6ee345f Mon Sep 17 00:00:00 2001 From: gisforgirard Date: Sat, 22 Apr 2017 14:50:30 -0700 Subject: [PATCH 2/5] Update README.md idk --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 738b93d..986ee63 100644 --- a/README.md +++ b/README.md @@ -59,14 +59,18 @@ print_r($users); 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 @@ -77,21 +81,30 @@ $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); ### ComputerActivities (camel case function names? not sure...) $activities = $timecamp_client->ComputerActivities()->getActivity('2014-03-07'); + $activities = $timecamp_client->ComputerActivities()->getApplication(6319,2132); + $activities = $timecamp_client->ComputerActivities()->getWindowTitle(1,2); + $activities = $timecamp_client->ComputerActivities()->addActivity($array); From eb0f2dbf4a7015170b7b0eab4b6ae18507c4e63a Mon Sep 17 00:00:00 2001 From: gisforgirard Date: Sun, 23 Apr 2017 15:03:22 -0700 Subject: [PATCH 3/5] Update README.md forgot a space --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 986ee63..222891c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#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. From 05b337c18287cb3d07cb60a764e92130ba179cc8 Mon Sep 17 00:00:00 2001 From: gisforgirard Date: Sun, 23 Apr 2017 15:04:04 -0700 Subject: [PATCH 4/5] Update README.md another space lol --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 222891c..12af3cf 100644 --- a/README.md +++ b/README.md @@ -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: From fd1fe0cc8abe8627996ae5f24d7ddf2c0520ea2a Mon Sep 17 00:00:00 2001 From: gisforgirard Date: Sun, 23 Apr 2017 16:31:21 -0700 Subject: [PATCH 5/5] Update README.md little more pro --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12af3cf..6638e86 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ $timer = $timecamp_client->Timer->status($array); $timer = $timecamp_client->Timer->stop($array); -### ComputerActivities (camel case function names? not sure...) +### 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'); $activities = $timecamp_client->ComputerActivities()->getApplication(6319,2132);