diff options
author | Antony Kellermann | 2018-05-30 21:45:49 -0400 |
---|---|---|
committer | Antony Kellermann | 2018-05-30 21:45:49 -0400 |
commit | c10d35fecaad4da4d1edd19b8e9bbc7acb9778e8 (patch) | |
tree | 7be3ba512a953fe7f4c3773f75df30325dcc991b | |
parent | 0ff3a7de5bc55607b7e496534701cc0bc5826120 (diff) | |
download | aur-c10d35fecaad4da4d1edd19b8e9bbc7acb9778e8.tar.gz |
Documentation
-rw-r--r-- | api.h | 18 | ||||
-rw-r--r-- | info.h | 25 |
2 files changed, 39 insertions, 4 deletions
@@ -48,7 +48,7 @@ typedef struct info { et – Exchange Traded Fund (ETF) (blank) = Not Available, i.e., Warrant, Note, or (non-filing) Closed Ended Funds - */ + */ char sector[INFO_TEXT_MAX]; // ex. Technology /* Quote */ @@ -81,6 +81,10 @@ typedef struct info { int num_articles; // Number of News pointers in array } Info; +/** + * Allocates a News struct and returns a pointer to it. + * @return News* + */ News* api_news_init(void); /** @@ -153,6 +157,14 @@ void* iex_store_earnings(void* vpInfo); */ void* iex_store_chart(void* vpInfo); +/** + * Designed for threading + * + * Queries IEX's news endpoint and stores the data in the Info object pointed to by vpInfo. num_articles number of + * articles are stored. + * @param vpInfo Info* + * @return NULL + */ void* iex_store_news(void* vpInfo); /** @@ -222,6 +234,10 @@ Info* api_get_check_info(const char* symbol); */ Info* api_get_info(const char* symbol); +/** + * Destroys News object and frees memory. Sets the pointer of the News to NULL + * @param phNews the News to destroy + */ void api_news_destroy(News** phNews); /** @@ -44,25 +44,44 @@ extern int zoom_months[9], zoom_change_x_months[9]; +/** + * Main function to print information about a security. Stocks/etfs/mutf/otc securities will print in an ncurses window, + * while cryptos will print to stdout due to lack of information. + * @param symbol any security + */ void interface_print(const char* symbol); +/** + * Prints basic price information header to an Ncurses window. + * @param window + * @param symbol_info Info* + */ void header_printw(WINDOW* window, Info* symbol_info); /** - * Prints information about the given symbol and the graph of it in an NCurses window. - * @param symbol + * Prints basic information about a security to stdout. + * @param symbol_info Info* */ void info_print(Info* symbol_info); +/** + * Prints basic information about a security to an Ncurses window. + * @param symbol_info Info* + */ void info_printw(WINDOW* window, Info* symbol_info); /** - * Prints num_articles articles relating to the given symbol. Currently on works for stocks/etfs + * Prints num_articles articles relating to the given symbol to stdout. Currently on works for stocks/etfs * @param symbol stock/etf symbol * @param num_articles number of articles to print (max 50) */ void news_print(const char* symbol, int num_articles); +/** + * Prints articles relating to the given symbol to an Ncurses window. Currently on works for stocks/etfs + * @param window + * @param symbol_info Info* + */ void news_printw(WINDOW* window, Info* symbol_info); /** |