homesupportsample .net client library reference

overview

this sample client library (language binding) can be used to interact with the api in an object oriented manner using .net code such as vb.net and c#. the library wraps up sending requests and parsing the xml responses into objects.

the full source code (in vb.net and c#) is available from the download links below.

there’s a collection ofsample applications here, that further illustrate how to utilize this client library.

[jump to top]

download

[jump to top]

example

string api_key = "your_api_key"; // your unique api_key as provided via email
string apibaseurl = "your_api_base_url"; // your base url as provided via email
apicontext ac = new apicontext(api_key, apibaseurl);

[jump to top]

apicontext class reference

this is the main class which provides the core methods to interact with your feed and return several collections of objects related to your feed i.e. news items, category definitions and latest comments.

[constructor]

apicontext(string api_key, string baseurl)

  • description:apicontext class contructor.
  • parameter – api_key:your unique api key.
  • parameter – baseurl:the base url provided to you

apicontext(system.guid api_key, string baseurl)

  • description:apicontext class contructor.
  • parameter – api_key:your unique api key as guid type.
  • parameter – baseurl:the base url provided to you
  • exceptions:xmlloadexception

apicontext()

  • description:apicontext class contructor.
  • exceptions:xmlloadexception
[properties]
  • news:ienumerable – get a collection of news item objects for the feed

[jump to top]

newsitem class reference

[properties]
  • byline:string – author of the news article
  • categories:ienumerable – array of category objects associated with the news article
  • clientquote:string – quote text from the client relating to this item.
  • comments:ienumerable – array of comment objects associated with the news article
  • createddate:date – system autogenerated date when the item was created
  • encoding():string – character encoding system used eg. utf-8
  • extract():string – a summary of the news article
  • format():string – format of text content either html or raw
  • headline():string – the news article headline
  • htmlmetadescription():string – value for the description meta tag for the news article
  • htmlmetakeywords():string – value for the keywords meta tag for the news article
  • htmlmetalanguage():string – value for the language meta tag of the news article
  • htmltitle():string – value for the html title element
  • id():int – primary key. the unique news article id
  • lastmodifieddate()::date – date article was last modified
  • photos():ienumerable – array of photo objects associated with the news article
  • priority():int – priority flag 30 = high, normal = 20 used to prioritise news
  • publishdate():date – date article was published
  • source():string – original source of the article
  • state():enumeratedtypes.enumnewsitemstate – current state of the article eg live / approval / draft / deleted
  • tags():string – a comma separated list of free text tags
  • text():string – text content of the news article
  • tweettext():string – special 140 character twitter version of the news article

[jump to top]

category class reference

[properties]
  • id():int – the unique category id
  • name():string – the text name of the category

[jump to top]

photo class reference

[properties]
  • htmlalt():string – text which can be used in the alternative text attribute for the image
  • instances():ienumerable – get custom photoinstance of the photograph
  • id():int – the unique photo id
  • orientation():enumeratedtypes.enumphotoorientation – orientation of photo either portrait or landscape

[jump to top]

photo.photoinstance class reference

[properties]
  • height():int – the height in pixels of this instance of the image
  • url():string – the url that points to the source location of this instance of the image
  • width():int – the width in pixels of this instance of the image
  • type():enumeratedtypes.enumphotoinstancetype – the type of photo eg. thumbnail, large, highres, custom

[jump to top]

comment class reference

[properties]
  • text():string – the comment text
  • id():int – the unique comment id
  • location():string – geographic location information for the comment
  • postdate():date – date when the comment was submitted
  • name():string – name of commentor

[jump to top]