Skip to content
Open
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: python
python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
- '3.6'
- pypy
install:
- pip install httpretty==0.8.14
- python setup.py -q install
environment:
START_DATE: 2000-01-01
END_DATE: 2000-01-07
script:
- ci/generate_tests_live_config.sh
- python -m unittest discover
env:
matrix:
secure: jdD2OsR6f9fKflbgF70mXiyexC7rIeiRqumeJNwD5WQ5nh7WKARU98KstZHJpABECnc4rLwYK+1jnnsWXBUicEfWvqqKcr+Fg8yGPXnYa8+rDg/sVPKl+OpMUjlUB+vu61jGGIfxZ5qqsTO7C4XJIx2Khq0aqqGYfQW+920pzaT8zZq+4HZxWUg4sPL+Z5QDR4H85+nFyR4ghC7tESbRUm0exdOW3Z4MJK3M11CGDif+eIQsrvsggFYS6FllTKHux2AHvQl2Rn/bA+PaHKW/zOITIKjGx3ygD8jM7dE1m2cbO0zmgwqqWtXeNM/9fjVhxhsoK5yFM9e96IAuMccI41IfzicIE4J/CQocdOtC1j8rNSlDQ2i3D+n2ubxu/6rm6UR/KHzFkLOGPAUzWWFO+ciSc1TLz/kWVfqB/JiFwNPPifVmkZ8o4PUjPYu24zz4JJgWGyNJ3AzmM4xqYpXoyDLjICgKOXue/Fq9iTBJI9kaWXNbUvTi5XS/oYI3S4+/D714jAPGCgreHDgtT8SaelP0T00PCq7g/9m0E14poD3rvlKXxu0HOdRaKxbIRwSbpliBRLbRTLJ+lKNvvTR6UpIs5GsbNvluCfT+Xg/j3jn6NJYAPQs15RTItYZeUNZ5rUKylV6LU1HdQ+fK1NCc+OhaNeaOi+dGd9QIUCa9uII=
13 changes: 13 additions & 0 deletions ci/generate_tests_live_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

rm tests_live_config.json
touch tests_live_config.json

echo "{" >> tests_live_config.json
echo " \"workspace_name\": \"${WORKSPACE_NAME}\"," >> tests_live_config.json
echo " \"token\": \"${TOKEN}\"," >> tests_live_config.json
echo " \"workspace_id\": ${WORKSPACE_ID}," >> tests_live_config.json
echo " \"user_id\": ${USER_ID}," >> tests_live_config.json
echo " \"start_date\": \"${START_DATE}\"," >> tests_live_config.json
echo " \"end_date\": \"${END_DATE}\"" >> tests_live_config.json
echo "}" >> tests_live_config.json
3 changes: 2 additions & 1 deletion toggl/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class TogglClientApi:
'base_url': 'https://www.toggl.com/api',
'ver_api': 8,
'base_url_report': 'https://toggl.com/reports/api',
'ver_report': 2
'ver_report': 2,
'user_agent': 'python'
}
credentials = {}
api_token = ''
Expand Down