package com.asana.resources.gen;

import com.asana.Client;
import com.asana.resources.Resource;
import com.asana.models.Story;
import com.asana.requests.ItemRequest;
import com.asana.requests.CollectionRequest;

/**
 * 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. _Comments_
 * are also a form of user-generated story.
 * 
 * Stories are a form of history in the system, and as such they are read-only.
 * Once generated, it is not possible to modify a story.
 */
public class StoriesBase extends Resource {
    /**
     * @param client Parent client instance
     */
    public StoriesBase(Client client) {
        super(client);
    }

    /**
     * Returns the full record for a single story.
     *
     * @param  story Globally unique identifier for the story.
     * @return Request object
     */
    public ItemRequest<Story> findById(String story) {
    
        String path = String.format("/stories/%s", story);
        return new ItemRequest<Story>(this, Story.class, path, "GET");
    }

    /**
     * Returns the compact records for all stories on the task.
     *
     * @param  task Globally unique identifier for the task.
     * @return Request object
     */
    public CollectionRequest<Story> findByTask(String task) {
    
        String path = String.format("/tasks/%s/stories", task);
        return new CollectionRequest<Story>(this, Story.class, path, "GET");
    }

    /**
     * Adds a comment to a task. The comment will be authored by the
     * currently authenticated user, and timestamped when the server receives
     * the request.
     * 
     * Returns the full record for the new story added to the task.
     *
     * @param  task Globally unique identifier for the task.
     * @return Request object
     */
    public ItemRequest<Story> createOnTask(String task) {
    
        String path = String.format("/tasks/%s/stories", task);
        return new ItemRequest<Story>(this, Story.class, path, "POST");
    }
}
@@ -838,38 +838,51 @@
 the 
-full
+compact
  record
+s
  for a
- single story
+ll stories on the task
 .%0A  
@@ -901,21 +901,20 @@
 @param  
-story
+task
  Globall
@@ -941,21 +941,20 @@
 for the 
-story
+task
 .%0A     *
@@ -988,36 +988,42 @@
   */%0A    public 
-Item
+Collection
 Request%3CStory%3E f
@@ -1031,18 +1031,20 @@
 ndBy
-Id
+Task
 (String 
 stor
@@ -1039,21 +1039,20 @@
 (String 
-story
+task
 ) %7B%0A    
@@ -1094,26 +1094,31 @@
 t(%22/
-stories/%25s%22, story
+tasks/%25s/stories%22, task
 );%0A 
@@ -1127,36 +1127,42 @@
      return new 
-Item
+Collection
 Request%3CStory%3E(t
@@ -1231,51 +1231,38 @@
 the 
-compact
+full
  record
-s
  for a
-ll stories on the task
+ single story
 .%0A  
@@ -1273,36 +1273,37 @@
 %0A     * @param  
-task
+story
  Globally unique
@@ -1314,36 +1314,37 @@
 ntifier for the 
-task
+story
 .%0A     * @return
@@ -1374,34 +1374,28 @@
 %0A    public 
-Collection
+Item
 Request%3CStor
@@ -1399,36 +1399,34 @@
 tory%3E findBy
-Task
+Id
 (String 
 task) %7B%0A    
@@ -1405,36 +1405,37 @@
 findById(String 
-task
+story
 ) %7B%0A    %0A       
@@ -1465,39 +1465,34 @@
 ormat(%22/
-tasks/%25s/stories%22, task
+stories/%25s%22, story
 );%0A     
@@ -1501,34 +1501,28 @@
  return new 
-Collection
+Item
 Request%3CStor

Deploy from asana-api-meta v0.4.5 (c7c1b64/master) by noonhub