%% Money.Net News Workflow Example

%   Copyright 2016 The Mathworks Inc.

%% Connect to Money.Net
c = moneynet(username,password);

%% Obtain the 50 latest news stories
n = news(c); %#ok<NASGU>

%% Obtain the 10 latest news stories
n = news(c,'Number',10); %#ok<NASGU>

%% Search the latest news stories for the term "technology"
n = news(c,'Number',10,'SearchTerm','technology'); %#ok<NASGU>

%% Search for stories within a particular category
n = news(c,'Number',10,'SearchTerm','technology','Category','Analyst Ratings'); %#ok<NASGU>

%% Search for news stories regarding a particular symbol
n = news(c,'Number',10,'SearchTerm','technology','Symbol','IBM');

%% Subscribe to the money.Net news stream
news(c,'Subscription','on');

%% Unsubscribe from the Money.Net news stream
news(c,'Subscription','off');

%% Close the connection
close(c);

