Closed vitr closed 6 years ago
Thanks for the comments.
There are always multiple ways to approach a problem and it's good to hear about what you want from this SDK.
We focused on getting reliable, working, examples up for this project and have not optimized it for multiple use cases. It is skewed towards public and partner apps rather than private apps as we see more use from those types.
A good way forward for you would be to get in touch with our Developer Evangelists and talk about why you're using private apps rather than a partner app and see how we can help there. A Xero organisation can have a maximum of 2 private apps connected to it at any time and they require extra setup that isn't required with a Partner app so it's well worth exploring.
I totally understand that this is just an alpha version, but let me share my issue with the general approach you take here. I'm using private api, I don't need sessions, my tokens are valid infinitely and I couldn't find an easy way to use this library for my needs. See this php example https://github.com/calcinai/xero-php/blob/master/examples/private.php hardly 15 lines of code, too easy. Why are you coupling golang api with sessions so passionately? Just look at bigger picture, we don't need sessions to run api (hello tokens)! You can add sessions on top of basic api implementation, but it should be optional. When I see something like this
I don't understand, why is there provider or session? you're the only provider (the Xero) and session is just a storage for tokens. I really appreciate the work you've done, but please, consider simplifying the golang api and making it more generic and logical. Thank you.