trainline-eu / dovico Goto Github PK
View Code? Open in Web Editor NEWSimple client & tools to interact with the API of http://www.dovico.com/
License: MIT License
Simple client & tools to interact with the API of http://www.dovico.com/
License: MIT License
A gem install dovico
gave me
Fetching: dovico-1.2.0.gem (100%)
dovico's executable "console" conflicts with countries
Overwrite the executable? [yN] n
ERROR: Error installing dovico:
"console" from dovico conflicts with installed executable from countries
I guess renaming it devico-console
(and renaming countries' one) would make the consoles world better.
the correct name is special_weeks
Currently, we only fetch assignments returned by the API in a single call.
If there are too many assignments (>2000 ?), the results are paginated by the Dovico API, but we never fetch the 2nd page.
We need to implement pagination. Feel free to contribute if you want to!
For now, we need to fetch all the tasks from the API if we want to display list of tasks (obviously) or time entries.
While this can be pretty quick when the user has less than 5 tasks, it takes multiple seconds when he/she has more than 20.
Let's save locally the results and use it if possible, or fetch from the API.
TaskGroup is a kind of Assignment, some Tasks can be grouped in it.
This tool does not support it and therefore it can't find tasks assigned to a TaskGroup.
This is the issue @squiggleuk is facing.
My API connectivity is working ok...
gkendal@5005331:~$ dovico --myself
Informations about yourself
- ID: 3240
- First Name: Geoff
- Last Name: Kendal
But whenever I'm interacting with the actual projects etc...
gkendal@5005331:~$ dovico --show --start 2019-09-16 --end 2019-09-19
== List of Time Entries between 2019-09-16 and 2019-09-19 ==
Traceback (most recent call last):
9: from /Users/gkendal/.rbenv/versions/2.6.3/bin/dovico:23:in `<main>'
8: from /Users/gkendal/.rbenv/versions/2.6.3/bin/dovico:23:in `load'
7: from /Users/gkendal/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/dovico-1.4.0/bin/dovico:4:in `<top (required)>'
6: from /Users/gkendal/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/dovico-1.4.0/lib/dovico/app.rb:77:in `run'
5: from /Users/gkendal/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/dovico-1.4.0/lib/dovico/app.rb:123:in `display_time_entries'
4: from /Users/gkendal/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/dovico-1.4.0/lib/dovico/model/time_entry_formatter.rb:10:in `format_entries'
3: from /Users/gkendal/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/dovico-1.4.0/lib/dovico/model/time_entry_formatter.rb:10:in `map'
2: from /Users/gkendal/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/dovico-1.4.0/lib/dovico/model/time_entry_formatter.rb:12:in `block in format_entries'
1: from /Users/gkendal/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/dovico-1.4.0/lib/dovico/model/time_entry_formatter.rb:20:in `time_entry_text'
/Users/gkendal/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/dovico-1.4.0/lib/dovico/model/time_entry_formatter.rb:36:in `project_task': undefined method `tasks' for nil:NilClass (NoMethodError)
I can list projects and tasks ok, but we seem to have an additional level under here which seems to be missing from when I'm trying to interact with them... Any advice?
Working great for me now! Thanks for all your work guys :)
Not sure if this is new to PR #23 or has always been there, but I seem to get moe extra spaces with each row returned by --show
- By the end of the output I see several empty lines! Here is the beginning of the issue... Not a critical one for me, but might be a problem for others!
dovico --show --current-week |more
== List of Time Entries between 2019-11-04 and 2019-11-08 ==
2019-11-04 [××××××××××××××××] [approved ] 8.00h Operational *End User Computing
2019-11-04 [ ××××××××××××××××] [approved ] 8.00h Leave & Absence "Sick leave
2019-11-04 [ ××××××××××××××××] [approved ] 8.00h Operational *Service Desk & Incident Management
2019-11-04 [ ××××××××××××××××] [approved ] 8.00h Operational *Service Desk & Incident Management
2019-11-04 [ ××××××××××××××××] [approved ] 8.00h Operational *Service Desk & Incident Management
2019-11-04 [ ××××××××××××××××] [approved ] 8.00h Leave & Absence "Maternity leave/Paternity leave
Dovico seems to have had an upgrade... Since then I am receiving auth issues.
Has the API changed and broken things? or maybe my client token has changed (Hard for me to validate this!)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.