Difference between revisions of "User:Ina Centaur/UUID/calimg.api"
Jump to navigation
Jump to search
Ina Centaur (talk | contribs) (Created page with '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 defaul...') |
m (<lsl> tag to <source>) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
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. | 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/ | [http://inacentaur.com/uuidcal.php?month={Insert%20Month%20Number%20HERE%20in%20two%20digit%20form} 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: | A prim can display this generic calendar image by HTTP-fetching the UUID from the web API like this: | ||
< | <source lang="lsl2"> | ||
string urlCalImg="http://inacentaur.com/uuidcal.php?month="; | string urlCalImg="http://inacentaur.com/uuidcal.php?month="; | ||
default | default | ||
Line 12: | Line 12: | ||
{ | { | ||
llOwnerSay("Plastering prim with generic calendar image via http://inacentaur.com/uuidcal.php?month={2 digit month entered in object description}"); | 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) | touch_start(integer total_number) | ||
Line 23: | Line 23: | ||
} | } | ||
} | } | ||
</ | </source> |
Latest revision as of 19:26, 24 January 2015
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);
}
}