Giter VIP home page Giter VIP logo

Comments (10)

efatsi avatar efatsi commented on May 29, 2024

My initial idea for this task would be to parse the response from hitting /daily through the API. It appears that response has all a list of all available Projects to the user, along with related client info, and associated Tasks. We could catch the 404 that happens when non-admin users attempt to call client.projects.all and attempt a parse of /daily.

from harvested.

efatsi avatar efatsi commented on May 29, 2024

Did this thing if you want to check it out: https://github.com/efatsi/harvested/compare/non-admin-projects. My test suite is blowing up today in all random directions so I haven't written any tests around this, but it gets the job done.

from harvested.

jvdp avatar jvdp commented on May 29, 2024

I implemented this as well: jvdp@3cfe6f7

See: #52

from harvested.

zmoazeni avatar zmoazeni commented on May 29, 2024

Cool. You both have the commit bit. Feel free to run with this.

from harvested.

efatsi avatar efatsi commented on May 29, 2024

@jvdp big fan of what you've implemented.

from harvested.

jvdp avatar jvdp commented on May 29, 2024

We could merge my changes and add a clearer error message (hinting at time.trackable_projects) when requesting all projects as non-admin. This would model the Harvest API the most closely. Thoughts?

from harvested.

zmoazeni avatar zmoazeni commented on May 29, 2024

We could merge my changes and add a clearer error message (hinting at time.trackable_projects) when requesting all projects as non-admin. This would model the Harvest API the most closely. Thoughts?

I like this. I'm a fan of sending back a better error message and having them change their code vs detecting which resource they should hit and doing the appropriate request for them.

from harvested.

mscharley avatar mscharley commented on May 29, 2024

I've had to monkey patch this solution in on my project. Is this likely to see the light of day in the mainline soon? Seems like the problem has been solved already.

from harvested.

jvdp avatar jvdp commented on May 29, 2024

I'll have a look this week.

from harvested.

jvdp avatar jvdp commented on May 29, 2024

Version 1.2.0 with this functionality is now on rubygems.org.

from harvested.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.