Class: ApiController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApiController
- Includes:
- ApiDeprecatedModule, ApiExperimentalModule, ApiSyncModule
- Defined in:
- app/controllers/api_controller.rb
Overview
Astrid JSON API controller
Constant Summary
- CURRENT_API_VERSION =
7
Instance Method Summary (collapse)
-
- (Hash) user_signin
Creates or signs in a user.
-
- (Hash) user_save
Saves changes to user profile.
-
- (Hash) user_add_auth
Adds an authentication token for a supported OAUTH service.
-
- (Hash) user_invite
Send email invite to someone.
-
- (Hash) user_set_status
Sets user friendship status.
-
- (Hash) user_reset_password
Send user forgotten password link.
-
- (Hash) user_status
Get user status.
-
- (Hash) users_exist
Checks if each user in the specified email list exists, returning a list of only those that do.
-
- (Hash) task_save
Saves a new or existing task.
-
- (Hash) task_show
Get information about a task.
-
- (Hash) task_set_following
Follow or unfollow task notifications.
-
- (Hash) task_update_people
Adds or removes people task is shared with.
-
- (Hash) task_share_social
Share this task on a social network.
-
- (Hash) task_list
Gets a list of all of this user's tasks.
-
- (Hash) list_order
Read or update list manual ordering.
-
- (Hash) task_attachment_create
Adds attachment to task.
-
- (Hash) task_attachment_remove
Removes attachment from task.
-
- (Hash) task_attachment_list
Lists task attachments.
-
- (Hash) list_save
Saves a new or existing list.
-
- (Hash) list_show
Get information about a list.
-
- (Hash) list_list
Gets a list of all of this user's lists.
- - (Hash) tag_save
- - (Hash) tag_show
- - (Hash) tag_list
-
- (Hash) activity_list
Gets a list of all of recent site activity.
-
- (Hash) model_history_list
Gets a list of all of changes to the given object.
-
- (Hash) comment_add
Add a comment to a task or list.
-
- (Hash) user_show
Gets information and tasks for this user.
-
- (Hash) user_list
Gets a list of users and their recent activity.
-
- (Hash) featured_lists
Gets a list of all featured lists.
-
- (Hash) featured_list_subscribe
Subscribe to a featured list.
-
- (Hash) time
Test API to get server time.
Instance Method Details
- (Hash) user_signin
Creates or signs in a user
- (Hash) user_save
Saves changes to user profile
- (Hash) user_add_auth
Adds an authentication token for a supported OAUTH service
- (Hash) user_invite
Send email invite to someone
- (Hash) user_set_status
Sets user friendship status
- (Hash) user_reset_password
Send user forgotten password link
- (Hash) user_status
Get user status
{
'id': user's id (note, user ids can change when two users are merged into one)
'first_name': user's first name
'last_name': user's last name
'name': user's name
'picture': user's picture
'quiet_start': hours quiet hours start
'quiet_end': hours quiet hours end
'premium': true if user is premium
}
- (Hash) users_exist
Checks if each user in the specified email list exists, returning a list of only those that do
- (Hash) task_save
Saves a new or existing task
- (Hash) task_show
Get information about a task
- (Hash) task_set_following
Follow or unfollow task notifications
- (Hash) task_update_people
Adds or removes people task is shared with
- (Hash) task_share_social
Share this task on a social network
- (Hash) task_list
Gets a list of all of this user's tasks
- (Hash) list_order
Read or update list manual ordering. One of tag_id or filter must be specified
- (Hash) task_attachment_create
Adds attachment to task
- (Hash) task_attachment_remove
Removes attachment from task
- (Hash) task_attachment_list
Lists task attachments
- (Hash) list_save
Saves a new or existing list
- (Hash) list_show
Get information about a list
- (Hash) list_list
Gets a list of all of this user's lists
- (Hash) tag_save
- (Hash) tag_show
- (Hash) tag_list
- (Hash) activity_list
Gets a list of all of recent site activity. If no parameters are passed, a list of other people's activity that the current user has visibility into will be returned.
Note: parameters are mutually exclusive
- (Hash) model_history_list
Gets a list of all of changes to the given object. Sends entries 10 at a time. For a reference implementation on displaying history, see this gist: gist.github.com/timsu/4726684
These parameters apply to all requests:
- (Hash) comment_add
Add a comment to a task or list
Note: parameters are mutually exclusive
- (Hash) user_show
Gets information and tasks for this user
- (Hash) user_list
Gets a list of users and their recent activity
Unless query parameter is passed, will get list of user's 'people', who are defined in Astrid as users the user has explicitly requested to be friends with and users the user has shared tasks with.
- (Hash) featured_lists
Gets a list of all featured lists
- (Hash) featured_list_subscribe
Subscribe to a featured list
- (Hash) time
Test API to get server time