# vitadock-client
Vitadock API Client for Python

# vitadock-client
Vitadock API Client for Python

This is a basic implementation of [Vitadock API](https://github.com/Medisana/vitadock-api/wiki) client for Python.
Currently it supports only Heart Rate measurements, but can be easily extended to support full array of API functionality - pull requests welcome.

This library does not implement authentication [vitadock-auth](https://github.com/gkotsis/vitadock-oauth) is recommended for this purpose. 

## Usage:

```python
from vitadock_client.api_client import VitadockClient, MODULE_CARDIODOCKS

# get Vitadock client targeting prod server (cloud.vitadock.com) 
client = VitadockClient('app_key', 'app_secret', 'access_token', 'access_token_secret', test=False)
bp_measurements = client.get_measurements(MODULE_CARDIODOCKS)
for bp in bp_measurements:
    print '{}/{} on {}'.format(bp.systole, bp.diastole, bp.measurement_date)
```

## Mock client

Mock client can be used for testing your vitadock-related code without actually having to authenticated and make requests to vitadock API. 
The mock client will always return data regardless of authentication.
In order to use the mock client instead of the regular client, put the following code in `setUp()` of your test:

```python
import vitadock
from vitadock_client.mock_api_client import MockVitadockClient

vitadock.VitadockOauthClient = MockVitadockOAuthClient
```
Add instructions and code samples to readme
Add instructions  and code samples to readme
