Skip to content

Instantly share code, notes, and snippets.

@boddhisattva
Last active August 29, 2015 14:05
Show Gist options
  • Save boddhisattva/51caee4e72aa19c91d6f to your computer and use it in GitHub Desktop.
Save boddhisattva/51caee4e72aa19c91d6f to your computer and use it in GitHub Desktop.
Reminder API
Create Reminders
POST /reminders
Creates a reminder for a user
Status Codes
Success: 201
Validation Errors: 400
Post Data
This specifies the data in JSON required to create a reminder. A sample JSON request object is
{
"reminder":{
"requester_email": "[email protected]",
"reminder_at": "Thu, 03 Mar 2011 12:30:54 UTC +00:00",
"reminded_url": "http://yourstory.com/",
"reminded_page_title": "Entrepreneurs, Founders and much more"
}
}
requester_email
Specifies the user of the widget(the actual service) who needs a reminder.
Required
reminder_at
Specifies cleary when is the reminder required.
Required
reminded_url
Specifies which url does the requestor needs a reminder of.
Required
reminded_page_title
Specifies the title of the page url for which the requestor needs a reminder.
Required
Example Response
{
"reminder":{
"id": 24,
"requester_email": "[email protected]",
"reminder_at": "Thu, 03 Mar 2011 12:30:54 UTC +00:00",
"reminded_url": "http://yourstory.com/",
"reminded_page_title": "Entrepreneurs, Founders and much more"
}
}
Delete Reminder
DELETE /reminders/{id}
Deletes a reminder.
Status Codes
Success: 204
Example
DELETE /reminders/1
GET /reminders
Retrieves all the reminders
Status Codes
Success: 200
Not Found: 404
Example
GET /reminders
{
"reminder":[{
"id": 1,
"requester_email": "[email protected]",
"reminder_at": "Thu, 03 Oct 2014 12:30:54 UTC +00:00",
"reminded_url": "http://yourstory.com/",
"reminded_page_title": "Entrepreneurs, Founders and much more"
},
{
"id": 2,
"requester_email": "[email protected]",
"reminder_at": "Thu, 30 Oct 2014 12:30:54 UTC +00:00",
"reminded_url": "http://www.gophercon.in/",
"reminded_page_title": "Gopher Conf India 2015"
}]
}
Show Reminder
GET /reminders/{id}
Retrieves the reminder specified by the id
Status Codes
Success: 200
Not Found: 404
Example
GET /reminders/1
{
"reminder":{
"id": 1,
"requester_email": "[email protected]",
"reminder_at": "Thu, 03 Mar 2011 12:30:54 UTC +00:00",
"reminded_url": "http://yourstory.com/",
"reminded_page_title": "Entrepreneurs, Founders and much more"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment