README.md in asana-0.0.4 vs README.md in asana-0.0.5
- old
+ new
@@ -85,15 +85,21 @@
tasks = workspace.tasks(:user_id)
# Get all users with access to a given workspace
users = workspace.users
+# Get all tags in a given workspace
+tags = workspace.tags
+
# Create a new task in a given workspace and assign it to the current user
workspace.create_task(:name => 'Get milk from the grocery store')
# Create a new project in a given workspace, current user as a watcher
workspace.create_project(:name => 'Upgrade Asana gem')
+
+# Create a new tag in a given workspace
+workspace.create_tag(:name => 'Programming')
```
### [Projects][]
> A project represents a prioritized list of tasks in Asana. It exists in a
@@ -131,10 +137,14 @@
# Get all tasks in a given workspace
workspace = Asana::Workspace.find(:workspace_id)
tasks = workspace.tasks
+# Get all tasks with a given tag
+tag = Asana::Tag.find(:tag_id)
+tasks = tag.tasks
+
# Get all stories for a given task
task = tasks.first
stories = task.stories
# Create a new task in a given workspace and assign it to the current user
@@ -145,10 +155,37 @@
# Add a project to the task (tasks can be in multiple projects)
task.add_project(project.id)
```
+### [Tags][]
+
+> A tag is a label that can be attached to any task in Asana. It exists in
+> a single workspace or organization.
+>
+> Tags have some metadata associated with them, but it is possible that we will
+> simplify them in the future so it is not encouraged to rely too heavily on
+> it. Unlike projects, tags do not provide any ordering on the tasks they are
+> associated with.
+
+```ruby
+# Get all tags in a given workspace
+workspace = Asana::Workspace.find(:workspace_id)
+tags = workspace.tags
+
+# Get all tasks with a given tag
+tag = Asana::Tag.find(:tag_id)
+tasks = tag.tasks
+
+# Create a new tag in a given workspace
+workspace.create_tag(:name => 'Programming')
+
+# Update a tag
+tag = Asana::Tag.find(:tag_id)
+tag.modify(:name => 'Development')
+```
+
### [Stories][]
> A story represents an activity associated with an object in the Asana
> system. Stories are generated by the system whenever users take actions
> such as creating or assigning tasks, or moving tasks between projects.
@@ -165,11 +202,10 @@
# Get a specific story
story = Story.find(:story_id)
# Create a new story for the given task/project
task.create_story(story_settings)
-project.create_story(story_settings)
```
## Contributing
1. Fork it
@@ -184,5 +220,6 @@
[Users]: http://developer.asana.com/documentation/#users
[Workspaces]: http://developer.asana.com/documentation/#workspaces
[Projects]: http://developer.asana.com/documentation/#projects
[Tasks]: http://developer.asana.com/documentation/#tasks
[Stories]: http://developer.asana.com/documentation/#stories
+[Tags]: http://developer.asana.com/documentation/#tags