Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 52 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:

Expand All @@ -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**
Expand All @@ -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);