User:Ina Centaur/UUID/calimg.api

From Second Life Wiki
< User:Ina Centaur
Revision as of 20:26, 24 January 2015 by ObviousAltIsObvious Resident (talk | contribs) (<lsl> tag to <source>)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This is a basic API service that fetches the UUID to a generic calendar image, when you input the month you want. Future versions will also include year argument. Argument defaults to the last month in its queue.

http://inacentaur.com/uuidcal.php?month={Insert Month Number HERE in two digit form}

A prim can display this generic calendar image by HTTP-fetching the UUID from the web API like this:

string urlCalImg="http://inacentaur.com/uuidcal.php?month=";
default
{
	state_entry()
	{
		llOwnerSay("Plastering prim with generic calendar image via http://inacentaur.com/uuidcal.php?month={2 digit month entered in object description}");
                llOwnerSay("Please update my description with a two digit calendar month. Touch me when ready to load a calendar image.");
	}
	touch_start(integer total_number)
	{
		llHTTPRequest(urlCalImg+llGetObjectDesc(),[],"");
	}
	http_response(key request_id, integer status, list metadata, string body)
	{
		llSetTexture(body,ALL_SIDES);
	}
}