Refresh Method  
 

Refresh the current news feed.

Syntax

object.Refresh

Parameters

None.

Return Value

A value of zero is returned if the feed was refreshed successfully. Otherwise, a non-zero error code is returned which indicates the cause of the failure. If the method fails, the value of the LastError property can be used to determine cause of the failure.

Remarks

When the Refresh method is called, the news feed is reloaded from the original source and the items in the channel are updated. For news feeds that are frequently updated, the TimeToLive property can provide a hint to the application as to how frequently the feed should be refreshed.

If the news feed was originally opened using an http or https URL, this function will download the updated feed from the server and store it temporarily on the local system. Accessing a remote feed requires that the application has permission to establish a connection with the server and will cause the application to block until the feed has been downloaded, the operation times out or an error occurs. The same timeout period and options will be used as when the feed was originally opened.

The Refresh method should only be used if the feed was opened using the Open method, otherwise the method will fail with an error indicating that the operation is not supported.

It is important that the application does not make any assumptions about the number of news items in the channel, or the content associated with those items after the Refresh method has been called. For example, never assume that the number of items in the news feed remains the same, or that the item IDs for each item remains the same. If you need to find a specific item in the news feed, use the FindItem method.

See Also

TimeToLive Property, FindItem Method, GetItem Method, Open Method, Parse Method