SabreAPI | Python bindings to the Sabre REST API | REST library
kandi X-RAY | SabreAPI Summary
kandi X-RAY | SabreAPI Summary
Python bindings to the Sabre REST API (This is a quick hack (~100 LoC) I made for a Hackathon sponsored by Sabre (the event was sponsored, not this project). Lots of room for improvement, feel free to send a PR.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Generic post method
- Returns a valid token
- Calls the given method with the given arguments
- Check if the token has expired
- Generic GET method
SabreAPI Key Features
SabreAPI Examples and Code Snippets
Community Discussions
Trending Discussions on SabreAPI
QUESTION
I have made a component - let's call it CUSTOMSELECT, which takes a few inputs, e.g. the list of options for the dropdown, the default-selected option, a label and so on.
I want to use this component multiple times on some pages. For instance, I need a CUSTOMSELECT of employees, and within a nested component on the page, I need a CUSTOMSELECT of departments and another of roles.
OK, all fine so far. Each instance is correctly displayed with the desired data.
Now I want to publish any change of selection within an instance of a CUSTOMSELECT, so that I can so that I can subscribe to it. For instance, when an employee is selected, I want to refresh the rest of the page.
I created a service for this purpose. I linked the click event in the CUSTOMSELECT to a function which publishes the selected value to the service. In the parent component I have subscribed to the 'subject' so that I can action the change of employee.
That works.
But, if I then change the selection with the nested component's department CUSTOMSELECT, this value is published and the parent component's employee subscriber picks up the change and processes it. Not what I want to happen. Not at all!
So, how can I tell the observers to pay attention only to messages of interest to them? ie, how can I publish to the appropriate observer: the employee instance does not need to know that the department instance has changed value, and so on.
Thanks for any help - a whole day trying to figure this one out so far.
It may help to see the component tree like this:
...ANSWER
Answered 2017-Apr-12 at 19:37I'm not sure exactly what your potential values are of the different selects are, but is it possible for you to have some sort of logic check on the value to differentiate between your scenarios?
for instance
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SabreAPI
You can use SabreAPI like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page