Code Monkey home page Code Monkey logo

Comments (19)

uhthomas avatar uhthomas commented on August 16, 2024 1

I think 1.16 is reasonable. The Go compatibility promise makes this quite safe.

from tesla.

bogosj avatar bogosj commented on August 16, 2024 1

Discussion offline with @michaelharo:

  • I'm going to rollback and continue supporting Go 1.13+. He's currently on 1.15 and the changes that are 1.16 only will break him. We can investigate removing ioutil in the future.
  • As for the (*Client, error) return type, we're going to keep that for future compatibility in the case that we offer optional args that could cause the client creation to fail.

from tesla.

bogosj avatar bogosj commented on August 16, 2024

We should document how to acquire the token file first.

from tesla.

michaelharo avatar michaelharo commented on August 16, 2024

If I have time I'd like to improve the tests and possibly change some data types in the structs before v1.0.

from tesla.

bogosj avatar bogosj commented on August 16, 2024

Fine with me.

from tesla.

andig avatar andig commented on August 16, 2024

Could we expose the login stuff as api? My use is integrated with another application, running a separate cmd is not an option. I've basically done the same as here- copied and integrated- but I feel that it really deserves its own auth api?

from tesla.

bogosj avatar bogosj commented on August 16, 2024

@andig going to track that here: #22. I don't want to gate tagging v1.0 of a usable API wrapper on that. Hiding both of our comments here.

I've just finished up linting cmd/..., would you be interested in refactoring out the parts you care about to /login and having /cmd/login depend on it?

from tesla.

andig avatar andig commented on August 16, 2024

Some thoughts on the 1.0 release:

  • Should the error return for NewClient be removed before 1.0? It can never error and the method signature has changed anyway from jsgoecke.
  • I would also suggest to expose the entire oauth2.Config for sake of other users instead of just the Endpoint?
  • The go.mod targets go 1.16 which probably isn't necessary if though we might as well replace ioutil.ReadAll with io.ReadAll and the other ioutil functions with their os replacements.

from tesla.

bogosj avatar bogosj commented on August 16, 2024

re: oauth2.Config - going to leave that to @michaelharo to think about as he made those changes.

re: go.mod 1.16 - is the suggestion we drop that directive completely? I'll swap out the usage of ioutil in another PR.

from tesla.

bogosj avatar bogosj commented on August 16, 2024

@andig I'm using ioutil.ReadFile which is replaced by os.ReadFile doesn't exist <1.16. I'm not clear on the convention of how fast it's expected people would update to 1.16. I'm OK declaring that this library only works in 1.16+ but I'll wait to hear from you and @michaelharo and @uhthomas before I swap out the usages of ioutil.

from tesla.

andig avatar andig commented on August 16, 2024

As long as 1.16 is targeted we can swap the functions. I don‘t think theres any need to require it, could probably be 1.13. I wouldn‘t mind 1.16 as I love the new features even if we don‘t need them here.

from tesla.

bogosj avatar bogosj commented on August 16, 2024

#24 as expected, testing <1.16 is broken. I'll remove them from the matrix.

from tesla.

michaelharo avatar michaelharo commented on August 16, 2024

Should BaseURL and StreamingURL be exported? I'm wondering if they should be part of the 1.0 API.

from tesla.

uhthomas avatar uhthomas commented on August 16, 2024

Maybe not exported as a field, but definitely should be settable via functional options. It's essential for black box unit testing, and integration tests.

from tesla.

bogosj avatar bogosj commented on August 16, 2024

@michaelharo @uhthomas something like #33?

from tesla.

michaelharo avatar michaelharo commented on August 16, 2024

Yeah, that's what I was thinking.

from tesla.

andig avatar andig commented on August 16, 2024

I will send 2 more small PRs. One rename, one handling token expiry. The latter should go in before 1.0:

from tesla.

michaelharo avatar michaelharo commented on August 16, 2024

I just noticed that my change to make struct member names more meaningful is potentially inconsistent. Not sure if we should care...

It uses both DriverFrontDoor and FrontDriverWindow. This was based on the order of the letters in the json struct, but perhaps it Front/Back or Driver/Passenger should always be ordered the same in the names without regard to if it's a Door or Window?

from tesla.

bogosj avatar bogosj commented on August 16, 2024

I'm ambivalent to the inconsistency - the inconsistency matches the structure presented by the API. I'm going to tag HEAD as v1.0.

from tesla.

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.