Campaign Images

You must be logged in to either request an API key or to access your API keys and data

The LOUDER API (currently under progressive beta)

The Louder API allows you to connect with Louder tools and the Louder dataset


API Call: getdirectory

format: http://www.louder.org.uk/api/getdirectory?key=your_api_key

parameters

  • key (required): key=your_api_key

returns the full louder directory structure in XML format in the form

<directory>
	<category>
		<categoryID>
			1
		</categoryID>
		<parentID>
			0
		</parentID>
		<categoryname>
			Society and Community
		</categoryname>
		<category>
			<categoryID>
				6
			</categoryID>
			<parentID>
				1
			</parentID>
			<categoryname>
				Poverty
			</categoryname>
		</category>
	</category>
	<category>
		<categoryID>
			2
		</categoryID>
		<parentID>
			0
		</parentID>
		<categoryname>
			Environment
		</categoryname>
		<category>
			<categoryID>
				12
			</categoryID>
			<parentID>
				2
			</parentID>
			<categoryname>
				Conservation
			</categoryname>
		</category>
	</category>
</directory>

back to top


API Call: listcampaigns

format: http://www.louder.org.uk/api/listcampaigns?key=your_api_key[&categoryID=integer&displaycount=integer&showown=binary]

parameters

  • key (required): key=your_api_key
  • categoryID (optional): categoryID=integer
    The categoryID from the Louder Directory from which to show campaigns. This API call will show all in that category and all sub-categories below it, in order of most recent entries first. The category ID can be obtained using the getdirectory API call. If this value is set to 0 or not used, the API call will return from all campaigns.
  • displaycount (optional): displaycount=integer
    Sets the maximum number of campaigns to be returned. If not set, this call will return all the results it finds. If set to 0, will return no results!
  • showown (optional): showown=1 or 0
    If set, will return only campaigns owned/run by the Developer for whom the Developer API key is registered

returns a list of campaigns in the category selected in XML format, along with other campaign data, as follows

<campaigns>
	<campaign>
		<campaignID>
			78
		</campaignID>
		<campaignlogo>
			1
		</campaignlogo>
		<campaignname>
			WWF's Earth Hour 2010
		</campaignname>
		<campaignshortdescription>
			A short description
		</campaignshortdescription>
		<campaigndescription>
			A longer description
		</campaigndescription>
		<campaignslug>
			wwfearthhour2010
		</campaignslug>
	</campaign>
	<campaign>
		<campaignID>
			76
		</campaignID>
		<campaignlogo>
			1
		</campaignlogo>
		<campaignname>
			Big Squeeze
		</campaignname>
		<campaignshortdescription>
			A short description
		</campaignshortdescription>
		<campaigndescription>
			A longer description
		</campaigndescription>
		<campaignslug>
			NewBigSqueeze
		</campaignslug>
	</campaign>
	<campaign>
		<campaignID>
			69
		</campaignID>
		<campaignlogo>
			1
		</campaignlogo>
		<campaignname>
			Fitting The Bill
		</campaignname>
		<campaignshortdescription>
			A short description
		</campaignshortdescription>
		<campaigndescription>
			A longer description
		</campaigndescription>
		<campaignslug>
			fittingthebill
		</campaignslug>
	</campaign>
</campaigns>

If the campaign logo exists (campaignlogo=1), it can be accessed using Louder's image script at
http://www.louder.org.uk/campaignlogodisplay.php?id=campaignID.

The campaignslug forms part of the campaign page's url in the form http://www.louder.org.uk/campaignslug/

back to top


API Call: getpetitiondata

format: http://www.louder.org.uk/api/getpetitiondata?key=your_api_key&campaignslug=campaignslug

parameters

  • key (required): key=your_api_key
  • campaignslug (required): campaignslug=campaignslug
    The campaignslug is the unique campaign identifier from the Louder campaign page URL, without trailing or preceeding slashes, i.e. http://www.louder.org.uk/campaignslug/

returns the title and description of a campaign's petition tool if one is active under that campaign or an error message if not, in XML format

<petition>
	<petitiontitle>
		Petition Title
	</petitiontitle>
	<petitiondescription>
		Lorem ipsum dolor sit amet, consectetur adipiscing
		elit. Phasellus a mi vitae eros suscipit pharetra
		nec ut neque. Cras at malesuada augue.
	</petitiondescription>
	<petitionsignatories>
		xx (integer total signatories)
	</petitionsignatories>
	<petitionconfirmations>
		yy (interger confirmed signatories)
	</petitionconfirmations>
</petition>

back to top


API Call: getpolldata

format: http://www.louder.org.uk/api/getpolldata?key=your_api_key&campaignslug=campaignslug

parameters

  • key (required): key=your_api_key
  • campaignslug (required): campaignslug=campaignslug
    The campaignslug is the unique campaign identifier from the Louder campaign page URL, without trailing or preceeding slashes, i.e. http://www.louder.org.uk/campaignslug/

Returns data relating to the campaigns poll results, in XML format

<poll>
	<polltitle>Poll Title</polltitle>
	<polldescription>Poll Description</polldescription>
	<item>
		<question>Question 1</question>
		<votes>Number of votes for question 1</votes>
		<votespercent>Percentage of total who voted</votespercent>
	</item>
	<item>
		<question>Question 2</question>
		<votes>Number of votes for question 2</votes>
		<votespercent>Percentage of total who voted</votespercent>
	</item>
	<totalvotes>Total number who voted</totalvotes>
</poll>

back to top


error messages

all error messages are returned in the same format

<error>
	<errormessage>
		Error Message
	</errormessage>
</error>

for example

<error>
	<errormessage>
		No Active Petition Found for that Campaign
	</errormessage>
</error>

back to top

Like this page? Share it:

Share this page on Facebook Tweet this page Digg This Share this page on Delicious Share this page on Stumbleupon
Capacity Builders
NCVO
BASSAC
BIHR
BOND
People and Planet
Roehampton University
SiteWriters