-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow API keys to be passed into directive #2
Comments
The truth is that I didn't think about it, but it seems to be a cool feature for this module. Anyway, feel free to develop it by yourself and make a pull request, if you need some help I can point you to the right direction!! ;-) |
The API I'm using lets me pass the API key as a request parameter in the URL or as an HTTP request header. I'll decide which to use after I poke around your module and see what's easier. |
I think it could be a cleaner solution in a header param of the request. It should be sent along with the requests if API key it is defined and not sent if it is not defined. The starting point would be the directive, then you will have it available in controller and finally you can pass it to the factory as a parameter and send it in the requests. I hope this help you! |
Thanks for the tips! In addition to the API key I also have a secret key that I can't expose on the client, so I'll need to make my own endpoints for consuming the vendor's API. I also need to integrate multiple vendors, so at minimum I need to pass in a vendor identifier. I'm thinking it will be easier if I fork the repo and continue working on the module separately so I don't clutter yours up with my requirements. |
Yeah, I think it could be a good idea to fork the repo like you say. Any question you have you can post it here and I will be glad to help you if I can! |
Cheers! |
I'd like to use this reservation system with multiple vendors. Each vendor will have a unique API key that must be used when calling an endpoint, so I need some way to pass the API key to this module. Do you have plans on adding this feature or should I add it myself?
The text was updated successfully, but these errors were encountered: