Skip to main content

NewsGator Support

Go Search
Home
Individual Support
Business Support
Express Installer
  
NewsGator Support > API Wiki > Locations  

Locations

 

http://services.newsgator.com/ngws/svc/Location.aspx

GET – returns an OPML outline of one-to-many locations currently configured for this user

 

Upon user account creation, four default locations are defined: NewsGator Web Edition, NewsGator Media Center Edition, NewsGator POP Edition, and NewsGator Mobile Edition. A Location allows a user to create distinct subscription lists for various devices/applications that synchronize with NewsGator. For example, a user can create a Location for a Mobile device and can edit that location to synchronize a subset of their subscriptions. A Location can also be used to control which articles are displayed in NewsGator Headlines or which subscriptions display in a BlogRoll.

 

The OPML that is returned in the output defines each Location in a single outline element. Each outline whether it is a default NewsGator Location or a user created location contain several properties describing the Location. For instance, ng:autoAddSubs defines if subscriptions are automatically added to this location even if the subscription was first added to another location. Another important property is ng:isPublic which defines if the OPML for this specific location is accessible to the public. The url property defines the endpoint for this location that can be used for PUT and DELETE operations.
This endpoint requires a NewsGator API Token. If you do not have one, you can get one for free here: Free NewsGator API Token

 

Required Inputs:

 

C# Example:

uri = http://services.newsgator.com/ngws/svc/Location.aspx

  • request.Credentials = ICredentials networkCreds
  • request.Headers["X-NGAPIToken"] = NewsGatorAPIToken
  • request.ContentType = "application/xml; charset=utf-8"
  • request.Method = GET

Example Output:

<?xml version="1.0" encoding="utf-8"?>
<opml xmlns:ng="http://newsgator.com/schema/opml">
<head>
<title>NewsGator Locations</title>
</head>
<body>
<outline text="NewsGator Web Edition" ng:id="1" type="link" url="http://72.244.167.86/ngws/svc/Location.aspx/1" ng:autoAddSubs="True" ng:isPublic="True" />
<outline text="NewsGator Media Center Edition" ng:id="2" type="link" url="http://72.244.167.86/ngws/svc/Location.aspx/2" ng:autoAddSubs="True" ng:isPublic="False" />
<outline text="NewsGator POP Edition" ng:id="3" type="link" url="http://72.244.167.86/ngws/svc/Location.aspx/3" ng:autoAddSubs="True" ng:isPublic="False" />
<outline text="NewsGator Mobile Edition" ng:id="4" type="link" url="http://72.244.167.86/ngws/svc/Location.aspx/4" ng:autoAddSubs="True" ng:isPublic="False" />
</body>
</opml>

Element Definitions:

  • outline – an element that contains attributes that define a location's properties
Attribute Definitions:
  • text – the name of the location
  • ng:id – a unique id for the location assigned by NewsGator
  • url – a link to the specific location
  • ng:autoAddSubs – if true, subscriptions are automatically added to this location
  • ng:isPublic – if true, the OPML of subscriptions for this location can be accessed by other users

Last modified at 10/30/2007 3:14 PM  by NGESMH1\robp