Consume all of the Cheddar (API).
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
vermonster
.gitignore
README.md
requirements.txt

README.md

Vermonster (Python)

Consume all of the Cheddar (API).

Want Ruby instead? Check out vermonster.

##General

###Create a client instance

cheddar = vermonster.Client(oauth_id='oauth-id', oauth_secret='oauth-secret')

##Authentication

###Obtain authentication url

url = cheddar.get_authentication_url()

###Obtain an access token

cheddar.get_token(code)

###Determine if you have authenticated

cheddar.is_authentication()

##Lists

###Get all lists

lists = cheddar.lists.all()

###Get a single list

foo = cheddar.lists.get(id=42)

###Get a single list, including the tasks for that list

foo = cheddar.lists.get(id=42, include_active_tasks=True)

###Update the title of a list

foo = cheddar.lists.get(id=42)
foo.update(title="foobar")

###Create a new list

bar = cheddar.lists.create(title="barfoo")

###Archive a list

foo = cheddar.lists.get(id=42)
foo.archive()

###Reorder lists

cheddar.lists.reorder([42, 45, 78, 89])

##Tasks

###Get active tasks for a list

foo = cheddar.lists.get(id=42)
tasks = foo.tasks.all()

#Another way
tasks = cheddar.tasks.get_for_list(id=42)

###Get all tasks for a list

foo = cheddar.lists.get(id=42)
tasks = foo.tasks.all(include_archived=True)

#Another way
tasks = cheddar.tasks.get_for_list(id=42, include_archived=True)

###Get a single task

task = cheddar.tasks.get(id=23)

###Update a task

task = cheddar.tasks.get(id=23)
task.update(text="foo #bar")

###Archive a task

task = cheddar.tasks.get(id=23)
task.archive()

###Reorder tasks

foo = cheddar.lists.get(id=42)
foo.tasks.reorder([23, 67, 78, 34, 12])

###Archive all tasks in a list

foo = cheddar.lists.get(id=42)
foo.tasks.archive_all()

###Archive completed tasks in a list

foo = cheddar.lists.get(id=42)
foo.tasks.archive_completed()

##Users

###Get the currently authenticated user

user = cheddar.user

Contributing

Vermonster-py is under active development, and we would really appreciate you helping us out! Here's how.

  1. Fork this repository.
  2. Take a look at the issues. What needs to be done?
  3. Make a topic branch for what you want to do. Bonus points for referencing an issue (like 2-authentication).
  4. Make your changes.
  5. Create a Pull Request.
  6. Profit!