Function: SendRSSDirect
Send a message to a hosted RSS data feed. You can share the RSS URL with others to effectively create a public broadcast distribution for messages you generate, over any device type that has an RSS reader app (most do!). Message limits (both sending and viewing) are determined by the type of mailbox you have set up under your xskrape.com account profile.
Usage
-
HTTP GET
https://www.xs.codexframework.com/api/SendRSSDirect?cc=CLIENT_CODE
&body=ENCODED_BODY
&mailbox=ENCODED_MAILBOX
&subject=ENCODED_SUBJECT
&link=ENCODED_LINK
Parameters
-
CLIENT_CODEThis is an authorization token that identifies your xSkrape.com account to which any credit charges will be applied. You can locate this code by logging into your xSkrape.com account, under My Account - Queries. (Remember: it's your duty to secure your client code against unauthorized use.) Required.
-
ENCODED_BODYThe message text you wish to send. Credit charges based on message size. The text needs to be URL encoded. Required.
-
ENCODED_MAILBOXThe format may be either "USER_MONIKER/MAILBOX_MONIKER" or simply "MAILBOX_MONIKER" if the client code is linked to the user whose mailbox is being used. A USER_MONIKER may only be used for "public sender" RSS mailboxes. The USER_MONIKER is set on the user profile page of all xSkrape.com accounts. The MAILBOX_MONIKER is set on the My Account - Messages page. Required.
-
ENCODED_SUBJECTThe subject for the RSS message, which effectively becomes the item "title". (It is up to the RSS reader used to interpret this field.) Required. The text needs to be URL encoded.
-
ENCODED_LINKAn optional link that can be included as part of the message, effectively becoming the "link" element, under the item. (It is up to the RSS reader used to interpret this field.) Optional.
Return Value(s)
- Returns JSON in all cases (success and failure).
- Format: { "Success":true|false, "Message":"message", "Source":"source" }
- Success: Indicates overall success or failure status of the request.
- Message: In the case of failure, provides an error message. (On success, provides status.)
- Source: In the case of failure, identifies the origin of the message.
Remarks
This API allows you to append messages to an RSS feed that is hosted by us, on xskrape.com. As a prerequisite, you must configure your mailboxes by logging into your xskrape.com account. As a part of this configuration, you're given the URL address where your feed is located. We offer additional details on how to use this form of messaging in a blog post. We additionally prevent the sending of "duplicate messages" at your discretion. If you send a duplicate, the return message may say "The same message has been delievered within the last x minute(s) as set on user profile - will not be resent." You can control the interval as noted by updating your user profile on xSkrape.com.
Examples
-
cURL
1. Send a message to an RSS mailbox
In this example we use the "curl" command line tool to illustate calling the SendRSSDirect API.
curl --data-urlencode "cc=5e......2e" --data-urlencode "body=My sample RSS message." --data-urlencode "mailbox=EndPoint2" --data-urlencode "subject=Test Subject" -G "https://www.xs.codexframework.com/api/SendRSSDirect"
Results:
{"Success":true, "Message":"Message successfully added to mailbox.", "Source":"Result"}
Of note, we've omitted most of our client token: you would substitute your own, as found when you log into your xSkrape.com account. Various parameters are encoded as part of our request to SendRSSDirect, and the result shows a successful completion (Success = true). By sending the message to the "EndPoint2" mailbox, we expect to see the message arrive at the corresponding web address http://www.xsrss.co/CodexTest29/EndPoint2. This is derived from the fact that the client code is linked to an account with a user moniker of "CodexTest29" and the mailbox moniker is "EndPoint2".
What we see at this web address after running this curl command is:
-
jQuery
2. Send a message to an RSS mailbox
This is effectively the same example as above, except implemented using a jQuery get call.
<input type="text" id="result"/>
<script type="text/javascript">
var requestUrl = "https://www.xs.codexframework.com/api/SendRSSDirect";
var parm = {
cc: "5e......2e",
body: "Hello, world!",
mailbox: "EndPoint2",
subject: "jQuery Example"
};
$.get(requestUrl, parm).done(function (data) {
$("#result").val(data.Message);
});
</script>What we see at this web address after running this script is: