Skip to content

Commit

Permalink
add Install & Example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
touhonoob committed Oct 29, 2015
1 parent bc978a4 commit 10ef3dd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,25 @@
[![Coverage Status](https://coveralls.io/repos/crowdsdom/php-sdk/badge.svg?branch=master&service=github)](https://coveralls.io/github/crowdsdom/php-sdk?branch=master)
[![Total Downloads](https://img.shields.io/packagist/dt/crowdsdom/php-sdk.svg?style=flat)](https://packagist.org/packages/crowdsdom/php-sdk)

## Install
```shell
composer require crowdsdom/php-sdk
```

## Example

```php
$apiKey = '';
$apiSecret = '';
$crowdsdom = new Crowdsdom($apiKey, $apiSecret);
$labor = $crowdsdom->labor();

// get all jobs
$jobs = $labor->job()->find();

// get tasks of jobId
$tasks = $labor->job()->tasks($jobId);

// approve a task
$labor->task()->approve($taskId);
```

0 comments on commit 10ef3dd

Please sign in to comment.