Idea Melt

Focus Mode

Endpoints

Notifications: Send

Description

Sends a notification to a specific user.

endpoint /notifications/send
method POST
authentication required
Parameters
to_user_url the URL of the user who will get the notification.
from_user_url the URL of the user this notification is from.
content the content of the notification.
Response
{
    message_list: [ ], 
    success: true, // always use this boolean to check if the request succeeded
}
Example Request
// make sure you've initialized the library
// before you make requests using it!
// if you haven't, type in the following
IdeaMelt.init({api_key: IDEAMELT_KEY})

// now you're ready for awesomeness!
var data =  {
    from_user_url: "http://www.en.wikipedia.org/henry_ford",
    to_user_url: "http://www.en.wikipedia.org/louis_armstrong",
    content: "What a <a href='https://www.google.com/#q=weather'>wonderful day</a> it is today!"
}
var success = function(r) {
    // everything went perfectly, do something awesome now!
    // remember, this will fire asynchronously
}
var fail = function(r) {
    // yikes! something didn't go right
    // console.log(r.message_list) to see messages from the server
    // ps. this will also fire asynchronously
}

// success and fail are optional parameters
IdeaMelt.send('NotifSend', data, success, fail);