Skip to content
An elegantly simple todo list http://fluttrly.com
Ruby JavaScript
Find file
Latest commit e48c883 @excid3 Added a redirect after login to the list you requested to look at if …
…you were allowed to view it
Failed to load latest commit information.
app Added a redirect after login to the list you requested to look at if …
chrome_app Added chrome web store manifest and transparent logo
config Removed SMS support for security holes and nobody uses it anyways
db Updated gems
doc first commit
lib/tasks Added devise and protected lists
public Added public checkbox to list if you claimed it
script first commit
test Added devise and protected lists
vendor/plugins first commit
.gitignore Ignore swap files and others
Gemfile Updated gems
Gemfile.lock Updated gems
LICENSE added license file, and edited readme for it
README.md
Rakefile first commit
config.ru first commit

README.md

Fluttrly

Fluttrly is a simple to-do list that allows you and others to add to a todo list for all to see!

Usage

At the home screen, just add your name to the text box and you're ready to start adding to a list.

License

Fluttrly is protected under the AGPL license.

Please see LICENSE for more details.

Author

Lovingly created by Chris Oliver.

API

The Fluttrly API is ridiculously simple. Just append ".json" or ".xml" to the end of the list URL that you would like to retrieve.

JSON

Example: GET Request http://fluttrly.com/test.json

Result: [{"task":{"name":"Example","created_at":"2010-12-19T02:58:06Z","completed":false,"updated_at":"2010-12-19T02:58:06Z","id":446,"content":"And you can easily share from the web"}}, {"task":{"name":"Example","created_at":"2010-12-19T02:57:58Z","completed":true,"updated_at":"2010-12-19T02:58:00Z","id":445,"content":"This is a completed task"}}, {"task":{"name":"Example","created_at":"2010-12-19T02:57:37Z","completed":false,"updated_at":"2010-12-19T02:57:51Z","id":443,"content":"Items can be checked as completed"}}, {"task":{"name":"Example","created_at":"2010-12-19T02:57:22Z","completed":false,"updated_at":"2010-12-19T02:57:22Z","id":440,"content":"Type a new task"}}]

XML

Example: GET Request http://fluttrly.com/test.xml

Result: <?xml version="1.0" encoding="UTF-8"?> Example 2010-12-19T02:58:06Z false 2010-12-19T02:58:06Z 446 And you can easily share from the web Example 2010-12-19T02:57:58Z true 2010-12-19T02:58:00Z 445 This is a completed task Example 2010-12-19T02:57:37Z false 2010-12-19T02:57:51Z 443 Items can be checked as completed Example 2010-12-19T02:57:22Z false 2010-12-19T02:57:22Z 440 Type a new task

POST

Posting a new task is easy too! Request a normal page to retrieve the authenticity_token, then you can submit the name of the list the task is for as well as the content of the task.

Example (Python):

#!/usr/bin/env python
# This example assumes you have a copy of Fluttr running on localhost:3000

import cookielib
import re
import urllib, urllib2

# Build the URL opener that saves cookies
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))

# Request the test page so that we can get the auth token
f = opener.open("http://localhost:3000/test")
data = f.read()

# Parse out the auth token
auth_token = re.search(r'name="authenticity_token".*value="(.+)"', data).group(1)

# Setup the POST request and encode it
data = {"authenticity_token": auth_token,
        "task[name]": "test",
        "task[content]": "This is a test",
        }
data = urllib.urlencode(data)

# POST!
f = opener.open("http://localhost:3000/tasks.js", data)

# You're done! Now visiting /test will have your new task!

Example (Ruby):

require 'net/http'
require 'uri'

# Initialize our session
url = URI.parse("http://localhost:3000/test")
req = Net::HTTP::Get.new(url.path)
res = Net::HTTP.start(url.host, url.port) { |http| http.request(req) }

# Parse out the auth token and get the session cookie
auth_token = $1 if res.body =~ /"authenticity_token".*value="(.+)"/ or nil
cookie = res['set-cookie'].split("; ")[0]

raise "No auth token" if auth_token.nil?

# Setup the params for POST
params = { 
    "task[content]" => "NICE", 
    "task[name]" => "test", 
    "authenticity_token" => auth_token
}

# Create a POST request
url = URI.parse("http://localhost:3000/tasks.js")
req = Net::HTTP::Post.new(url.path)

# Setup parameters
req.add_field("Cookie", cookie)
req.set_form_data(params)

# POST!
res = Net::HTTP.start(url.host, url.port) { |http| http.request(req) }
Something went wrong with that request. Please try again.