_news¶
-
class
appian_locust._news.
_News
(interactor: appian_locust._interactor._Interactor)¶ Bases:
appian_locust._base._Base
-
_visit_internal
(news_name: str, exact_match: bool = True, search_string: str = None) → Tuple¶
-
get_all
(search_string: str = None, locust_request_label: str = '') → Dict[str, Any]¶ Retrieves all the available “news” and assgit ociated metadata from “Appian-Tempo-News”
Note: All the retrieved data about news is stored in the private variable self._news
- Parameters
search_string (str, optional) – results will be filtered based on the search string.
Returns (dict): List of news and associated metadata
Examples
>>> self.appian.action.get_all()
-
get_news
(news_name: str, exact_match: bool = True, search_string: str = None) → Dict[str, Any]¶ Get the information about specific news by name.
- Parameters
news_name (str) – name of the news entry
exact_match (bool, optional) – Should news name match exactly or to be partial match. Default : True
search_string (str, optional) – results will be filtered based on the search string.
Returns: Specific News’s info
Raises: In case news is not found in the system, it throws an “Exception”
Example
If full name of action is known,
>>> self.appian.news.get("news_name")
If only partial name is known,
>>> self.appian.news.get("news_name", exact_match=False)
-
search
(search_string: str = '*') → Dict[str, Any]¶
-
visit
(news_name: str, exact_match: bool = True, search_string: str = None) → None¶ This function calls the nav API for the specific news item and its related records if any
- Parameters
news_name (str) – Name of the news entry to be called
exact_match (bool, optional) – Should news name match exactly or to be partial match. Default : True
search_string (str, optional) – results will be filtered based on the search string.
Returns: None
Examples
If full name of news is known,
>>> self.appian.news.visit("news_name")
If only partial name is known,
>>> self.appian.news.visit("news_name", exact_match=False)
-
visit_news_entry
(news_name: str, exact_match: bool = True, search_string: str = None) → Tuple¶ This function simulates navigating to a single entry in the ui. There are two parts to navigating to a news entry: navigating to the view and getting the news entry’s feed.
- Parameters
news_name (str) – Name of the news entry to be called
exact_match (bool, optional) – Should news name match exactly or to be partial match. Default : True
search_string (str, optional) – results will be filtered based on the search string.
Returns (Tuple): Response codes for the view navigation and getting the feed entry
Examples
If full name of news is known,
>>> self.appian.news.visit("news_name")
If only partial name is known,
>>> self.appian.news.visit("news_name", exact_match=False)
-