lib/asana/resources/project.rb in asana-0.0.3 vs lib/asana/resources/project.rb in asana-0.0.4

- old
+ new

@@ -16,7 +16,20 @@ def tasks Task.all_by_project(:params => { :project_id => self.id }) end + def modify(modified_fields) + resource = Resource.new(modified_fields) + response = Project.put(self.id, nil, resource.to_json) + Project.new(connection.format.decode(response.body)) + end + + def create_story(*args) + path = "#{self.id}/stories" + story = Story.new(args.first) + response = Project.post(path, nil, story.to_json) + Story.new(connection.format.decode(response.body)) + end + end end