remove spaces from API docs' @object types
Spaces were inconsistently applied to @object types. In this patch, all spaces are removed. Change-Id: Ibabe5544b4d4cf33450d54c4643aa1f1baefa49e Reviewed-on: https://gerrit.instructure.com/23870 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com> Product-Review: Duane Johnson <duane@instructure.com> QA-Review: Duane Johnson <duane@instructure.com>
This commit is contained in:
parent
74f0baf418
commit
cc62dbb771
|
@ -55,6 +55,11 @@
|
|||
# "position":1,
|
||||
# "auth_base":"127.0.0.1"
|
||||
# }
|
||||
#
|
||||
# @object DiscoveryUrl
|
||||
# {
|
||||
# "discovery_url": "http://..."
|
||||
# }
|
||||
|
||||
class AccountAuthorizationConfigsController < ApplicationController
|
||||
before_filter :require_context, :require_root_account_management
|
||||
|
@ -434,7 +439,7 @@ class AccountAuthorizationConfigsController < ApplicationController
|
|||
# curl 'https://<canvas>/api/v1/account/<account_id>/account_authorization_configs/discovery_url' \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns discovery url
|
||||
# @returns DiscoveryUrl
|
||||
def show_discovery_url
|
||||
render :json => {:discovery_url => @account.auth_discovery_url}
|
||||
end
|
||||
|
@ -454,7 +459,7 @@ class AccountAuthorizationConfigsController < ApplicationController
|
|||
# -F 'discovery_url=<new_url>' \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns discovery url
|
||||
# @returns DiscoveryUrl
|
||||
def update_discovery_url
|
||||
if params[:discovery_url] && params[:discovery_url] != ''
|
||||
@account.auth_discovery_url = params[:discovery_url]
|
||||
|
|
|
@ -140,7 +140,7 @@ class AccountReportsController < ApplicationController
|
|||
# curl -H 'Authorization: Bearer <token>' \
|
||||
# https://<canvas>/api/v1/accounts/<account_id>/reports/<report_type>
|
||||
#
|
||||
# @returns [report]
|
||||
# @returns [Report]
|
||||
#
|
||||
def index
|
||||
if authorized_action(@context, @current_user, :read_reports)
|
||||
|
@ -160,7 +160,7 @@ class AccountReportsController < ApplicationController
|
|||
# curl -H 'Authorization: Bearer <token>' \
|
||||
# https://<canvas>/api/v1/accounts/<account_id>/reports/<report_type>/<report_id>
|
||||
#
|
||||
# @returns report
|
||||
# @returns Report
|
||||
#
|
||||
def show
|
||||
if authorized_action(@context, @current_user, :read_reports)
|
||||
|
@ -178,7 +178,7 @@ class AccountReportsController < ApplicationController
|
|||
# -X DELETE \
|
||||
# https://<canvas>/api/v1/accounts/<account_id>/reports/<report_type>/<id>
|
||||
#
|
||||
# @returns report
|
||||
# @returns Report
|
||||
#
|
||||
def destroy
|
||||
if authorized_action(@context, @current_user, :read_reports)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
# (e.g. "Office Hours" or "Meet with professor about Final Project"). Both time
|
||||
# slots and reservations of time slots are stored as Calendar Events.
|
||||
#
|
||||
# @object Appointment Group
|
||||
# @object AppointmentGroup
|
||||
# {
|
||||
# // The ID of the appointment group
|
||||
# "id": 543,
|
||||
|
|
|
@ -34,7 +34,7 @@ class AssignmentGroupsApiController < ApplicationController
|
|||
# @argument override_assignment_dates [Optional, Boolean]
|
||||
# Apply assignment overrides for each assignment, defaults to true.
|
||||
#
|
||||
# @returns Assignment Group
|
||||
# @returns AssignmentGroup
|
||||
def show
|
||||
if authorized_action(@assignment_group, @current_user, :read)
|
||||
includes = Array(params[:include])
|
||||
|
@ -62,7 +62,7 @@ class AssignmentGroupsApiController < ApplicationController
|
|||
# The grading rules that are applied within this assignment group
|
||||
# See the Assignment Group object definition for format
|
||||
#
|
||||
# @returns Assignment Group
|
||||
# @returns AssignmentGroup
|
||||
def create
|
||||
@assignment_group = @context.assignment_groups.new
|
||||
if authorized_action(@assignment_group, @current_user, :create)
|
||||
|
@ -75,7 +75,7 @@ class AssignmentGroupsApiController < ApplicationController
|
|||
# Modify an existing Assignment Group.
|
||||
# Accepts the same parameters as Assignment Group creation
|
||||
#
|
||||
# @returns Assignment Group
|
||||
# @returns AssignmentGroup
|
||||
def update
|
||||
if authorized_action(@assignment_group, @current_user, :update)
|
||||
process_assignment_group
|
||||
|
@ -92,7 +92,7 @@ class AssignmentGroupsApiController < ApplicationController
|
|||
# NOTE: If this argument is not provided, any assignments in this Assignment
|
||||
# Group will be deleted.
|
||||
#
|
||||
# @returns Assignment Group
|
||||
# @returns AssignmentGroup
|
||||
def destroy
|
||||
if authorized_action(@assignment_group, @current_user, :delete)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#
|
||||
# API for accessing Assignment Group and Assignment information.
|
||||
#
|
||||
# @object Assignment Group
|
||||
# @object AssignmentGroup
|
||||
# {
|
||||
# // the id of the Assignment Group
|
||||
# "id": 1,
|
||||
|
@ -62,7 +62,7 @@ class AssignmentGroupsController < ApplicationController
|
|||
# @argument override_assignment_dates [Optional, Boolean]
|
||||
# Apply assignment overrides for each assignment, defaults to true.
|
||||
#
|
||||
# @returns [Assignment Group]
|
||||
# @returns [AssignmentGroup]
|
||||
def index
|
||||
if authorized_action(@context.assignment_groups.new, @current_user, :read)
|
||||
@groups = @context.assignment_groups.active
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#
|
||||
# API for creating, accessing and updating calendar events.
|
||||
#
|
||||
# @object Calendar Event
|
||||
# @object CalendarEvent
|
||||
# {
|
||||
# // The ID of the calendar event
|
||||
# "id": 234,
|
||||
|
@ -137,7 +137,7 @@
|
|||
# "group": null
|
||||
# }
|
||||
#
|
||||
# @object Assignment Event
|
||||
# @object AssignmentEvent
|
||||
# {
|
||||
# // A synthetic ID for the assignment
|
||||
# "id": "assignment_987",
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#
|
||||
# /api/v1/collection_items/<id>/discussion_topics/self/view
|
||||
#
|
||||
# @object Collection Item
|
||||
# @object CollectionItem
|
||||
#
|
||||
# {
|
||||
# // The ID of the collection item.
|
||||
|
@ -144,7 +144,7 @@ class CollectionItemsController < ApplicationController
|
|||
# curl https://<canvas>/api/v1/collections/<collection_id>/items \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns [Collection Item]
|
||||
# @returns [CollectionItem]
|
||||
def index
|
||||
pagination_route = api_v1_collection_items_list_url(@collection)
|
||||
if authorized_action(@collection, @current_user, :read)
|
||||
|
@ -163,7 +163,7 @@ class CollectionItemsController < ApplicationController
|
|||
# curl https://<canvas>/api/v1/collections/items/<item_id> \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Collection Item
|
||||
# @returns CollectionItem
|
||||
def show
|
||||
if !api_request?
|
||||
render :template => "collections/collection_backbone_app"
|
||||
|
@ -258,7 +258,7 @@ class CollectionItemsController < ApplicationController
|
|||
# -F user_comment='edited comment' \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Collection Item
|
||||
# @returns CollectionItem
|
||||
def update
|
||||
find_item_and_collection
|
||||
if authorized_action(@item, @current_user, :update)
|
||||
|
@ -282,7 +282,7 @@ class CollectionItemsController < ApplicationController
|
|||
# -X DELETE \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Collection Item
|
||||
# @returns CollectionItem
|
||||
def destroy
|
||||
find_item_and_collection
|
||||
if authorized_action(@item, @current_user, :delete)
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
# In this API, the `:user_id` parameter can always be replaced with `self` if
|
||||
# the requesting user is asking for his/her own information.
|
||||
#
|
||||
# @object Communication Channel
|
||||
# @object CommunicationChannel
|
||||
# {
|
||||
# // The ID of the communication channel.
|
||||
# "id": 16,
|
||||
|
@ -63,7 +63,7 @@ class CommunicationChannelsController < ApplicationController
|
|||
# curl https://<canvas>/api/v1/users/12345/communication_channels \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns [Communication Channel]
|
||||
# @returns [CommunicationChannel]
|
||||
def index
|
||||
@user = api_find(User, params[:user_id])
|
||||
return unless authorized_action(@user, @current_user, :read)
|
||||
|
@ -98,7 +98,7 @@ class CommunicationChannelsController < ApplicationController
|
|||
# -d 'communication_channel[address]=new@example.com' \
|
||||
# -d 'communication_channel[type]=email' \
|
||||
#
|
||||
# @returns Communication Channel
|
||||
# @returns CommunicationChannel
|
||||
def create
|
||||
@user = api_request? ? api_find(User, params[:user_id]) : @current_user
|
||||
|
||||
|
@ -356,7 +356,7 @@ class CommunicationChannelsController < ApplicationController
|
|||
# -H 'Authorization: Bearer <token>
|
||||
# -X DELETE
|
||||
#
|
||||
# @returns Communication Channel
|
||||
# @returns CommunicationChannel
|
||||
def destroy
|
||||
@user = api_request? ? api_find(User, params[:user_id]) : @current_user
|
||||
@cc = @user.communication_channels.find(params[:id]) if params[:id]
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# @API Modules
|
||||
# @subtopic Module Items
|
||||
#
|
||||
# @object Module Item
|
||||
# @object ModuleItem
|
||||
# {
|
||||
# // the unique identifier for the module item
|
||||
# "id": 768,
|
||||
|
@ -84,7 +84,7 @@
|
|||
# }
|
||||
#
|
||||
#
|
||||
# @object Module Item Sequence
|
||||
# @object ModuleItemSequence
|
||||
# {
|
||||
# // an array containing one hash for each appearence of the asset in the module sequence
|
||||
# // (up to 10 total)
|
||||
|
@ -151,7 +151,7 @@ class ContextModuleItemsApiController < ApplicationController
|
|||
# curl -H 'Authorization: Bearer <token>' \
|
||||
# https://<canvas>/api/v1/courses/222/modules/123/items
|
||||
#
|
||||
# @returns [Module Item]
|
||||
# @returns [ModuleItem]
|
||||
def index
|
||||
if authorized_action(@context, @current_user, :read)
|
||||
mod = @context.modules_visible_to(@current_user).find(params[:module_id])
|
||||
|
@ -178,7 +178,7 @@ class ContextModuleItemsApiController < ApplicationController
|
|||
# curl -H 'Authorization: Bearer <token>' \
|
||||
# https://<canvas>/api/v1/courses/222/modules/123/items/768
|
||||
#
|
||||
# @returns Module Item
|
||||
# @returns ModuleItem
|
||||
def show
|
||||
if authorized_action(@context, @current_user, :read)
|
||||
mod = @context.modules_visible_to(@current_user).find(params[:module_id])
|
||||
|
@ -260,7 +260,7 @@ class ContextModuleItemsApiController < ApplicationController
|
|||
# -d 'module_item[indent]=1' \
|
||||
# -d 'module_item[new_tab]=true'
|
||||
#
|
||||
# @returns Module Item
|
||||
# @returns ModuleItem
|
||||
def create
|
||||
@module = @context.context_modules.not_deleted.find(params[:module_id])
|
||||
if authorized_action(@module, @current_user, :update)
|
||||
|
@ -345,7 +345,7 @@ class ContextModuleItemsApiController < ApplicationController
|
|||
# -d 'module_item[indent]=1' \
|
||||
# -d 'module_item[new_tab]=true'
|
||||
#
|
||||
# @returns Module Item
|
||||
# @returns ModuleItem
|
||||
def update
|
||||
@tag = @context.context_module_tags.not_deleted.find(params[:id])
|
||||
if authorized_action(@tag.context_module, @current_user, :update)
|
||||
|
@ -400,7 +400,7 @@ class ContextModuleItemsApiController < ApplicationController
|
|||
# -X Delete \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Module Item
|
||||
# @returns ModuleItem
|
||||
def destroy
|
||||
@tag = @context.context_module_tags.not_deleted.find(params[:id])
|
||||
if authorized_action(@tag.context_module, @current_user, :update)
|
||||
|
@ -415,7 +415,7 @@ class ContextModuleItemsApiController < ApplicationController
|
|||
|
||||
# @API Get module item sequence
|
||||
#
|
||||
# Given an asset in a course, find the Module Item it belongs to, and also the previous and next Module Items
|
||||
# Given an asset in a course, find the ModuleItem it belongs to, and also the previous and next Module Items
|
||||
# in the course sequence.
|
||||
#
|
||||
# @argument asset_type [String, "ModuleItem"|"File"|"Page"|"Discussion"|"Assignment"|"Quiz"|"ExternalTool"]
|
||||
|
@ -431,7 +431,7 @@ class ContextModuleItemsApiController < ApplicationController
|
|||
# curl https://<canvas>/api/v1/courses/<course_id>/module_item_sequence?asset_type=Assignment&asset_id=123 \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Module Item Sequence
|
||||
# @returns ModuleItemSequence
|
||||
def item_sequence
|
||||
if authorized_action(@context, @current_user, :read)
|
||||
asset_type = Api.api_type_to_canvas_name(params[:asset_type])
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
# in order to automatically create announcements for each new item in
|
||||
# the feed.
|
||||
#
|
||||
# @object External Feed
|
||||
# @object ExternalFeed
|
||||
# {
|
||||
# // The ID of the feed
|
||||
# "id": 5,
|
||||
|
@ -63,7 +63,7 @@ class ExternalFeedsController < ApplicationController
|
|||
# curl https://<canvas>/api/v1/courses/<course_id>/external_feeds \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns [External Feed]
|
||||
# @returns [ExternalFeed]
|
||||
def index
|
||||
if authorized_action(@context.announcements.new, @current_user, :create)
|
||||
api_route = polymorphic_url([:api, :v1, @context, :external_feeds])
|
||||
|
@ -91,7 +91,7 @@ class ExternalFeedsController < ApplicationController
|
|||
# -F verbosity='full' \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns External Feed
|
||||
# @returns ExternalFeed
|
||||
def create
|
||||
if authorized_action(@context.announcements.new, @current_user, :create)
|
||||
@feed = create_api_external_feed(@context, params, @current_user)
|
||||
|
@ -111,7 +111,7 @@ class ExternalFeedsController < ApplicationController
|
|||
# curl -X DELETE https://<canvas>/api/v1/courses/<course_id>/external_feeds/<feed_id> \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns External Feed
|
||||
# @returns ExternalFeed
|
||||
def destroy
|
||||
if authorized_action(@context.announcements.new, @current_user, :create)
|
||||
@feed = @context.external_feeds.find(params[:external_feed_id])
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
# different built-in group categories used, or custom ones can be created. The
|
||||
# built in group categories are: "communities", "student_organized", and "imported".
|
||||
#
|
||||
# @object Group Category
|
||||
# @object GroupCategory
|
||||
# {
|
||||
# // The ID of the group category.
|
||||
# "id": 17,
|
||||
|
@ -410,7 +410,7 @@ class GroupCategoriesController < ApplicationController
|
|||
# }
|
||||
# ]
|
||||
#
|
||||
# @returns Group Membership or Progress
|
||||
# @returns GroupMembership | Progress
|
||||
def assign_unassigned_members
|
||||
return unless authorized_action(@context, @current_user, :manage_groups)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#
|
||||
# Group memberships are the objects that tie users and groups together.
|
||||
#
|
||||
# @object Group Membership
|
||||
# @object GroupMembership
|
||||
# {
|
||||
# // The id of the membership object
|
||||
# "id": 92,
|
||||
|
@ -62,7 +62,7 @@ class GroupMembershipsController < ApplicationController
|
|||
# -F 'filter_states[]=invited&filter_states[]=requested' \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns [Group Membership]
|
||||
# @returns [GroupMembership]
|
||||
def index
|
||||
if authorized_action(@group, @current_user, :read_roster)
|
||||
memberships_route = polymorphic_url([:api_v1, @group, :memberships])
|
||||
|
@ -92,7 +92,7 @@ class GroupMembershipsController < ApplicationController
|
|||
# -F 'user_id=self'
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Group Membership
|
||||
# @returns GroupMembership
|
||||
def create
|
||||
@user = api_find(User, params[:user_id])
|
||||
if authorized_action(GroupMembership.new(:group => @group, :user => @user), @current_user, :create)
|
||||
|
@ -123,7 +123,7 @@ class GroupMembershipsController < ApplicationController
|
|||
# -F 'moderator=true'
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Group Membership
|
||||
# @returns GroupMembership
|
||||
def update
|
||||
find_membership
|
||||
if authorized_action(@membership, @current_user, :update)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#
|
||||
# When you upload or record webcam video/audio to kaltura, it makes a Media Object
|
||||
#
|
||||
# @object Media Object
|
||||
# @object MediaObject
|
||||
# {
|
||||
# // whether or not the current user can upload media_tracks (subtitles) to this Media Object
|
||||
# "can_add_captions": true,
|
||||
|
@ -76,7 +76,7 @@ class MediaObjectsController < ApplicationController
|
|||
# curl https://<canvas>/media_objects/<media_object_id> \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Media Object
|
||||
# @returns MediaObject
|
||||
def show
|
||||
media_object = MediaObject.by_media_id(params[:media_object_id]).first
|
||||
unless media_object
|
||||
|
|
|
@ -42,7 +42,7 @@ class MediaTracksController < ApplicationController
|
|||
# -F content='0\n00:00:00,000 --> 00:00:01,000\nInstructor…This is the first sentance\n\n\n1\n00:00:01,000 --> 00:00:04,000\nand a second...' \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Media Object
|
||||
# @returns MediaObject
|
||||
def create
|
||||
@media_object = MediaObject.active.by_media_id(params[:media_object_id]).first
|
||||
if authorized_action(@media_object, @current_user, :add_captions)
|
||||
|
@ -77,7 +77,7 @@ class MediaTracksController < ApplicationController
|
|||
# curl -X DELETE https://<canvas>/media_objects/<media_object_id>/media_tracks/<media_track_id> \
|
||||
# -H 'Authorization: Bearer <token>'
|
||||
#
|
||||
# @returns Media Object
|
||||
# @returns MediaObject
|
||||
def destroy
|
||||
@media_object = MediaObject.by_media_id(params[:media_object_id]).first
|
||||
if authorized_action(@media_object, @current_user, :delete_captions)
|
||||
|
|
Loading…
Reference in New Issue