PHPackages                             osk/timecamp-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. osk/timecamp-client

ActiveLibrary[API Development](/categories/api)

osk/timecamp-client
===================

A Timecamp API client

1.2.4(10y ago)0331MITPHP

Since Jul 29Pushed 10y agoCompare

[ Source](https://github.com/oskosk/php-timecamp-client)[ Packagist](https://packagist.org/packages/osk/timecamp-client)[ RSS](/packages/osk-timecamp-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

\#php-timecamp-client

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
------------

[](#installation)

```
$ composer require osk/timecamp-client
```

Usage
-----

[](#usage)

```
// Require composer autoloader
require "vendor/autoload.php";

$timecamp = new Timecamp\Client("52253438676fd6dffe7a636f0e");
$entries= $timecamp->timeEntries(array(
  'from'=> '2015-06-01',
  'to'=> '2015-06-30'
));

// var_dump($entries);
foreach($entries as $v) {
  echo "$v[name]\n";
}
```

\##Authentication

Authentication is very simple. You must pass your Timecamp API token when instantiating `Timecamp\Client`. Example:

```
$client = new Timecamp\Client("52253438676fd6dffe7a636f0e");
```

To get your API token go to [your Timecamp Account Settings](https://www.timecamp.com/people/edit).

Client methods
--------------

[](#client-methods)

### Users

[](#users)

### users()

[](#users-1)

Return all users from account.

**Example**

```
$users = $client->users();
// var_dump($users);
foreach($users as $v) {
  var_dump($v);
}
```

### tasks

[](#tasks)

### tasks($options)

[](#tasksoptions)

Return all tasks. If you want to get only one specific task you can provide a `'task_id'` key in `$options`.

- **$options** - Associative array
- `'task_id'` - Id of a specific task to get.

### Time entries

[](#time-entries)

\####entries($options)

*Alias for `timeEntries($options)`*

\####timeEntries($options)

Get time entries started in a specific time range.

- **$options** - Associative array
- `'from'` - date range of the time entries returned like 2015-06-30.
- `'to'` - date range of the time entries returned like 2015-06-30.
- `'task_ids'` *(optional)* - array of tasks ids you can leave this option undefined, so it will get all tasks.
- `'with_subtasks'` - *(optional)* - If set to `'1'` , get entries for all subtasks for provided one specific task\_ids. **Default**: `'1'`.
- `'user_ids'` - *(optional)* - Array of user ids. you can leave this option undefined, so it willl get all users

**Returns** an array of time entries associative arrays.

**Example**

```
$entries = $client->timeEntries(array(
  'from'=> '2015-06-01',
  'to'=> '2015-06-30'
));
// var_dump($entries);
foreach($entries as $v) {
  var_dump($v);
}
```

#### timerRunning()

[](#timerrunning)

Get currently running timers.

*Example*

```
$timers = $client->timeRunning();
// var_dump($timers);
foreach($timers as $v) {
  var_dump($v);
}
```

#### entriesChanges($options)

[](#entrieschangesoptions)

Get manual changes in time entries made by users. This is only available only when it is enabled in Account Settings.

- **$options** - Associative array
- `'from'` - date range of the time entries returned like 2014-03-19.
- `'to'` - date range of the time entries returned like 2014-03-19.
- `'task_ids'` *(optional)* - array of tasks ids you can leave this option undefined, so it will get all tasks.
- `'user_ids'` - *(optional)* - Array of user ids. you can leave this option undefined, so it willl get all users
- `'limit'` - *(optional)* - Limit for the number of rows (you can put any number like 100.

**Examples**

```
$changes= $timecamp->entriesChanges(array(
  'from'=> '2015-06-01',
  'to'=> '2015-06-30'
));
// var_dump($changes);
foreach($changes as $v) {
  var_dump($v);
}
```

\##Environment variables

**HTTP\_PROXY**

Defines the proxy to use when sending requests using the "http" protocol.

**HTTPS\_PROXY**

Defines the proxy to use when sending requests using the "https" protocol.

License
-------

[](#license)

Distributed under the MIT License.

The MIT License (MIT)

Copyright (c) 2015 Oscar Lopez

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

3944d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f75bd6fe281a287d92608439a5e84e6a31890cfb7f6e2a40658bcf0c91c0f367?d=identicon)[osk](/maintainers/osk)

---

Top Contributors

[![oskosk](https://avatars.githubusercontent.com/u/746152?v=4)](https://github.com/oskosk "oskosk (32 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/osk-timecamp-client/health.svg)

```
[![Health](https://phpackages.com/badges/osk-timecamp-client/health.svg)](https://phpackages.com/packages/osk-timecamp-client)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
