Skip to content

Instantly share code, notes, and snippets.

@shrutis22
Created July 15, 2016 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shrutis22/dc51d5ab069a5b58fd34d31bc0ddbdba to your computer and use it in GitHub Desktop.
Save shrutis22/dc51d5ab069a5b58fd34d31bc0ddbdba to your computer and use it in GitHub Desktop.
Sends search string to Google News Class which in turn makes an API Request to Google News Servers
/**
* This class is created to call
* Google News Generating class
* and display in the VisualForce
* Page.
*
* @author Shruti Sridharan
* @since 08/03/2016
* @version 1.0
* @revisons N/A
*/
global class NewsWidgetController {
/**
* This method calls the GoogleNews
* Class which in turn calls the
* Google News API.
*
* @since 08/03/2016
* @version 1.0
* @revisons N/A
*/
@RemoteAction
global static String newsDisplayer( String searchTerm ) {
String newsBody = GoogleNews.newsGrabber( searchTerm );
return newsBody;
}
public NewsWidgetController(ApexPages.StandardController controller){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment