simplyspoke / node-harvest

Node.js Client API for the Harvest time tracking service
http://simplyspoke.github.io/node-harvest/
MIT License
106 stars 57 forks source link

timeTracking.daily is timeTracking.list? #65

Closed machineghost closed 7 years ago

machineghost commented 7 years ago

The timeTracking object has all of the normal CRUD methods except list, then it has daily method, which is even described in the unit tests as "should return a list of timers" (emphasis mine).

Would it maybe make more sense to rename daily => list so that timeTracking simply has the normal CRUD methods like most other objects, instead of its own unique name for list?

P.S. You could argue that "daily" is in the URL of the operation ... but it's also in the URL of create (https://YOURACCOUNT.harvestapp.com/daily/add), but that method is called create, not (say) dailyCreate.

simplyspoke commented 7 years ago

Proper crud paths is a good idea, though will likely postpone implementation until the future. Would likely create breaking changes and would be best planned for a new version. Added a comment in the code for consideration at a later date.