NewsGator Online API

Location Operations

Location is NewsGator's mechanism for grouping subscriptions. Locations can be used to distinguish between groups of subscriptions that a user would read at different computers (e.g. "home" and "work"), but can also be used to group feeds together for other purposes; for example, to publish as a blogroll or for publishing headlines. Since NewsGator Online manages subscriptions with respect to location, an application's initial interaction with the Sync API will usually be with locations.

GetLocations()

This call returns a list of locations currently configured for the authenticated user, as a list of Location structures.

int CreateLocation(name, autoAddSubs)

This operation creates a location with the given name and returns a location ID that may be used to refer to the location in the future. All of the user's current subscriptions are automatically added to this location.

Parameters
name
The user-specified name for this location. This name is usually descriptive of the location, e.g. "work computer", "laptop", etc.
autoAddSubs
A boolean value specifying whether new subscriptions should be automatically added to this location in the future. Aggregators would normally set this to true, false is appropriate for locations with only limited uses, such as locations used to expose headlines or a blogroll.

void DeleteLocation(id)

This operation deletes the location specified.

Parameters
id
The same ID as was returned by the Create operation for this folder.

void Update(location)

This operation updates the location identified by the id member of the Location structure passed in.

id
NewsGator's identifier for the location.
name
The name for the location
contentOnline
Obsolete, not used
autoAddSubs
If true, new subscriptions are automatically added to this location.
isPublic
If true, the headlines for this location are publically accessible.

Parameters
location
A Location structure. The caller should specify the name and autoAddSubs members of the structure; the corresponding properties of the location will be set to the values provided.

int GetUnreadCount(name)

This operation returns the number of unread posts for the subscriptions in the authenticated user's location.

Parameters
name
The user-specified name for this location. Note that in this case, the location is named using its name as given in the Create operation, instead of using the location's ID.

void AddSubscription(locId, feedID)

This operation enables the given subscription for this location's subscription list.

Parameters
locId
The ID for this location, as returned by CreateLocation
feedId
The ID for the subscripion, as returned by Subscription.asmx/AddSubscription

void RemoveSubscription(locId, feedID)

This operation removes the given subscription from this location's subscription list. The subscription will still be present in the user's subscription list, but will not be returned on calls to GetSubscriptionList for this location.

Parameters
locId
The ID for this location, as returned by CreateLocation
feedId
The ID for the subscripion, as returned by Subscription.asmx/AddSubscription

SOAP Endpoint


Copyright © 2003-2008  NewsGator Technologies, Inc.  All Rights Reserved.
USA   FRA   GBR   BEL   ESP   ITA   DEU   NLD   

Microsoft Gold Certified Partner