pandarus 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/pandarus.rb +2 -1
- data/lib/pandarus/client.rb +5 -0
- data/lib/pandarus/models.rb +1 -0
- data/lib/pandarus/models/assignment.rb +2 -1
- data/lib/pandarus/models/course.rb +2 -16
- data/lib/pandarus/models/module.rb +3 -2
- data/lib/pandarus/models/page_view.rb +36 -0
- data/lib/pandarus/models/quiz.rb +2 -1
- data/lib/pandarus/v1_api.rb +154 -34
- data/lib/pandarus/version.rb +1 -1
- metadata +4 -2
data/lib/pandarus.rb
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
require "pandarus/v1_api"
|
1
|
+
require "pandarus/v1_api"
|
2
|
+
require "pandarus/client"
|
data/lib/pandarus/models.rb
CHANGED
@@ -14,6 +14,7 @@ require 'pandarus/models/quiz'
|
|
14
14
|
require 'pandarus/models/comm_message'
|
15
15
|
require 'pandarus/models/collection_item'
|
16
16
|
require 'pandarus/models/assignment_override'
|
17
|
+
require 'pandarus/models/page_view'
|
17
18
|
require 'pandarus/models/migrator'
|
18
19
|
require 'pandarus/models/outcome_group'
|
19
20
|
require 'pandarus/models/section'
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class Assignment < ModelBase
|
6
|
-
attr_accessor :id, :name, :description, :due_at, :lock_at, :unlock_at, :all_dates, :course_id, :html_url, :assignment_group_id, :allowed_extensions, :turnitin_enabled, :turnitin_settings, :grade_group_students_individually, :external_tool_tag_attributes, :peer_reviews, :automatic_peer_reviews, :peer_review_count, :peer_reviews_assign_at, :group_category_id, :needs_grading_count, :position, :muted, :points_possible, :submission_types, :grading_type, :grading_standard_id, :published, :locked_for_user, :lock_info, :lock_explanation, :quiz_id, :anonymous_submissions, :discussion_topic, :freeze_on_copy, :frozen, :frozen_attributes, :submission, :use_rubric_for_grading, :rubric_settings, :rubric
|
6
|
+
attr_accessor :id, :name, :description, :due_at, :lock_at, :unlock_at, :all_dates, :course_id, :html_url, :assignment_group_id, :allowed_extensions, :turnitin_enabled, :turnitin_settings, :grade_group_students_individually, :external_tool_tag_attributes, :peer_reviews, :automatic_peer_reviews, :peer_review_count, :peer_reviews_assign_at, :group_category_id, :needs_grading_count, :position, :muted, :points_possible, :submission_types, :grading_type, :grading_standard_id, :published, :unpublishable, :locked_for_user, :lock_info, :lock_explanation, :quiz_id, :anonymous_submissions, :discussion_topic, :freeze_on_copy, :frozen, :frozen_attributes, :submission, :use_rubric_for_grading, :rubric_settings, :rubric
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -36,6 +36,7 @@ module Pandarus
|
|
36
36
|
:grading_type => {:external => "grading_type", :container => false, :type => nil},
|
37
37
|
:grading_standard_id => {:external => "grading_standard_id", :container => false, :type => nil},
|
38
38
|
:published => {:external => "published", :container => false, :type => nil},
|
39
|
+
:unpublishable => {:external => "unpublishable", :container => false, :type => nil},
|
39
40
|
:locked_for_user => {:external => "locked_for_user", :container => false, :type => nil},
|
40
41
|
:lock_info => {:external => "lock_info", :container => false, :type => nil},
|
41
42
|
:lock_explanation => {:external => "lock_explanation", :container => false, :type => nil},
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class Course < ModelBase
|
6
|
-
attr_accessor :id, :sis_course_id, :name, :course_code, :workflow_state, :account_id, :
|
6
|
+
attr_accessor :id, :sis_course_id, :name, :course_code, :workflow_state, :account_id, :start_at, :end_at, :enrollments, :calendar, :default_view, :syllabus_body, :needs_grading_count, :term, :apply_assignment_group_weights, :permissions
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -14,10 +14,8 @@ module Pandarus
|
|
14
14
|
:course_code => {:external => "course_code", :container => false, :type => nil},
|
15
15
|
:workflow_state => {:external => "workflow_state", :container => false, :type => nil},
|
16
16
|
:account_id => {:external => "account_id", :container => false, :type => nil},
|
17
|
-
:root_account_id => {:external => "root_account_id", :container => false, :type => nil},
|
18
17
|
:start_at => {:external => "start_at", :container => false, :type => nil},
|
19
18
|
:end_at => {:external => "end_at", :container => false, :type => nil},
|
20
|
-
:conclude_at => {:external => "conclude_at", :container => false, :type => nil},
|
21
19
|
:enrollments => {:external => "enrollments", :container => false, :type => nil},
|
22
20
|
:calendar => {:external => "calendar", :container => false, :type => nil},
|
23
21
|
:default_view => {:external => "default_view", :container => false, :type => nil},
|
@@ -25,19 +23,7 @@ module Pandarus
|
|
25
23
|
:needs_grading_count => {:external => "needs_grading_count", :container => false, :type => nil},
|
26
24
|
:term => {:external => "term", :container => false, :type => nil},
|
27
25
|
:apply_assignment_group_weights => {:external => "apply_assignment_group_weights", :container => false, :type => nil},
|
28
|
-
:permissions => {:external => "permissions", :container => false, :type => nil}
|
29
|
-
:is_public => {:external => "is_public", :container => false, :type => nil},
|
30
|
-
:public_syllabus => {:external => "public_syllabus", :container => false, :type => nil},
|
31
|
-
:public_description => {:external => "public_description", :container => false, :type => nil},
|
32
|
-
:storage_quota_mb => {:external => "storage_quota_mb", :container => false, :type => nil},
|
33
|
-
:hide_final_grades => {:external => "hide_final_grades", :container => false, :type => nil},
|
34
|
-
:license => {:external => "license", :container => false, :type => nil},
|
35
|
-
:allow_student_assignment_edits => {:external => "allow_student_assignment_edits", :container => false, :type => nil},
|
36
|
-
:allow_wiki_comments => {:external => "allow_wiki_comments", :container => false, :type => nil},
|
37
|
-
:allow_student_forum_attachments => {:external => "allow_student_forum_attachments", :container => false, :type => nil},
|
38
|
-
:open_enrollment => {:external => "open_enrollment", :container => false, :type => nil},
|
39
|
-
:self_enrollment => {:external => "self_enrollment", :container => false, :type => nil},
|
40
|
-
:restrict_enrollments_to_course_dates => {:external => "restrict_enrollments_to_course_dates", :container => false, :type => nil}
|
26
|
+
:permissions => {:external => "permissions", :container => false, :type => nil}
|
41
27
|
|
42
28
|
}
|
43
29
|
end
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class Module < ModelBase
|
6
|
-
attr_accessor :id, :workflow_state, :position, :name, :unlock_at, :require_sequential_progress, :prerequisite_module_ids, :items_count, :items_url, :items, :state, :completed_at
|
6
|
+
attr_accessor :id, :workflow_state, :position, :name, :unlock_at, :require_sequential_progress, :prerequisite_module_ids, :items_count, :items_url, :items, :state, :completed_at, :publish_final_grade
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -19,7 +19,8 @@ module Pandarus
|
|
19
19
|
:items_url => {:external => "items_url", :container => false, :type => nil},
|
20
20
|
:items => {:external => "items", :container => false, :type => nil},
|
21
21
|
:state => {:external => "state", :container => false, :type => nil},
|
22
|
-
:completed_at => {:external => "completed_at", :container => false, :type => nil}
|
22
|
+
:completed_at => {:external => "completed_at", :container => false, :type => nil},
|
23
|
+
:publish_final_grade => {:external => "publish_final_grade", :container => false, :type => nil}
|
23
24
|
|
24
25
|
}
|
25
26
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "pandarus/model_base"
|
2
|
+
|
3
|
+
# This is an autogenerated file. See readme.md.
|
4
|
+
module Pandarus
|
5
|
+
class PageView < ModelBase
|
6
|
+
attr_accessor :request_id, :user_id, :url, :context_type, :context_id, :asset_type, :asset_id, :controller, :action, :contributed, :interaction_seconds, :created_at, :user_request, :render_time, :user_agent, :participated, :account_id, :real_user_id, :http_method, :remote_ip
|
7
|
+
|
8
|
+
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:request_id => {:external => "request_id", :container => false, :type => nil},
|
12
|
+
:user_id => {:external => "user_id", :container => false, :type => nil},
|
13
|
+
:url => {:external => "url", :container => false, :type => nil},
|
14
|
+
:context_type => {:external => "context_type", :container => false, :type => nil},
|
15
|
+
:context_id => {:external => "context_id", :container => false, :type => nil},
|
16
|
+
:asset_type => {:external => "asset_type", :container => false, :type => nil},
|
17
|
+
:asset_id => {:external => "asset_id", :container => false, :type => nil},
|
18
|
+
:controller => {:external => "controller", :container => false, :type => nil},
|
19
|
+
:action => {:external => "action", :container => false, :type => nil},
|
20
|
+
:contributed => {:external => "contributed", :container => false, :type => nil},
|
21
|
+
:interaction_seconds => {:external => "interaction_seconds", :container => false, :type => nil},
|
22
|
+
:created_at => {:external => "created_at", :container => false, :type => "Datetime"},
|
23
|
+
:user_request => {:external => "user_request", :container => false, :type => nil},
|
24
|
+
:render_time => {:external => "render_time", :container => false, :type => nil},
|
25
|
+
:user_agent => {:external => "user_agent", :container => false, :type => nil},
|
26
|
+
:participated => {:external => "participated", :container => false, :type => nil},
|
27
|
+
:account_id => {:external => "account_id", :container => false, :type => nil},
|
28
|
+
:real_user_id => {:external => "real_user_id", :container => false, :type => nil},
|
29
|
+
:http_method => {:external => "http_method", :container => false, :type => nil},
|
30
|
+
:remote_ip => {:external => "remote_ip", :container => false, :type => nil}
|
31
|
+
|
32
|
+
}
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
data/lib/pandarus/models/quiz.rb
CHANGED
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class Quiz < ModelBase
|
6
|
-
attr_accessor :id, :title, :html_url, :mobile_url, :description, :quiz_type, :assignment_group_id, :time_limit, :shuffle_answers, :hide_results, :show_correct_answers, :scoring_policy, :allowed_attempts, :one_question_at_a_time, :question_count, :points_possible, :cant_go_back, :access_code, :ip_filter, :due_at, :lock_at, :unlock_at, :published, :locked_for_user, :lock_info, :lock_explanation
|
6
|
+
attr_accessor :id, :title, :html_url, :mobile_url, :description, :quiz_type, :assignment_group_id, :time_limit, :shuffle_answers, :hide_results, :show_correct_answers, :scoring_policy, :allowed_attempts, :one_question_at_a_time, :question_count, :points_possible, :cant_go_back, :access_code, :ip_filter, :due_at, :lock_at, :unlock_at, :published, :unpublishable, :locked_for_user, :lock_info, :lock_explanation
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -31,6 +31,7 @@ module Pandarus
|
|
31
31
|
:lock_at => {:external => "lock_at", :container => false, :type => nil},
|
32
32
|
:unlock_at => {:external => "unlock_at", :container => false, :type => nil},
|
33
33
|
:published => {:external => "published", :container => false, :type => nil},
|
34
|
+
:unpublishable => {:external => "unpublishable", :container => false, :type => nil},
|
34
35
|
:locked_for_user => {:external => "locked_for_user", :container => false, :type => nil},
|
35
36
|
:lock_info => {:external => "lock_info", :container => false, :type => nil},
|
36
37
|
:lock_explanation => {:external => "lock_explanation", :container => false, :type => nil}
|
data/lib/pandarus/v1_api.rb
CHANGED
@@ -7264,6 +7264,7 @@ module Pandarus
|
|
7264
7264
|
:module__position__,
|
7265
7265
|
:module__require_sequential_progress__,
|
7266
7266
|
:module__prerequisite_module_ids__,
|
7267
|
+
:module__publish_final_grade__,
|
7267
7268
|
|
7268
7269
|
]
|
7269
7270
|
|
@@ -7301,6 +7302,7 @@ module Pandarus
|
|
7301
7302
|
:module__position__,
|
7302
7303
|
:module__require_sequential_progress__,
|
7303
7304
|
:module__prerequisite_module_ids__,
|
7305
|
+
:module__publish_final_grade__,
|
7304
7306
|
:module__published__,
|
7305
7307
|
|
7306
7308
|
]
|
@@ -7996,11 +7998,9 @@ module Pandarus
|
|
7996
7998
|
page_params_store(:put, path)
|
7997
7999
|
Outcome.new(response)
|
7998
8000
|
end
|
7999
|
-
def
|
8001
|
+
def show_front_page(group_id,opts={})
|
8000
8002
|
query_param_keys = [
|
8001
|
-
|
8002
|
-
:order,
|
8003
|
-
:search_term
|
8003
|
+
|
8004
8004
|
]
|
8005
8005
|
|
8006
8006
|
form_param_keys = [
|
@@ -8015,7 +8015,7 @@ module Pandarus
|
|
8015
8015
|
)
|
8016
8016
|
|
8017
8017
|
# resource path
|
8018
|
-
path = path_replace("/v1/groups/{group_id}/
|
8018
|
+
path = path_replace("/v1/groups/{group_id}/front_page",
|
8019
8019
|
:group_id => group_id)
|
8020
8020
|
headers = nil
|
8021
8021
|
form_params = select_params(options, form_param_keys)
|
@@ -8026,24 +8026,30 @@ module Pandarus
|
|
8026
8026
|
end
|
8027
8027
|
response = mixed_request(:get, path, query_params, form_params, headers)
|
8028
8028
|
page_params_store(:get, path)
|
8029
|
-
|
8029
|
+
Page.new(response)
|
8030
8030
|
end
|
8031
|
-
def
|
8031
|
+
def update_create_front_page(group_id,wiki_page__body__,opts={})
|
8032
8032
|
query_param_keys = [
|
8033
|
-
|
8033
|
+
|
8034
8034
|
]
|
8035
8035
|
|
8036
8036
|
form_param_keys = [
|
8037
|
+
:wiki_page__title__,
|
8038
|
+
:wiki_page__body__,
|
8039
|
+
:wiki_page__hide_from_students__,
|
8040
|
+
:wiki_page__editing_roles__,
|
8041
|
+
:wiki_page__notify_of_update__,
|
8042
|
+
:wiki_page__published__,
|
8037
8043
|
|
8038
8044
|
]
|
8039
8045
|
|
8040
8046
|
# verify existence of params
|
8041
8047
|
raise "group_id is required" if group_id.nil?
|
8042
|
-
raise "
|
8048
|
+
raise "wiki_page__body__ is required" if wiki_page__body__.nil?
|
8043
8049
|
# set default values and merge with input
|
8044
8050
|
options = underscored_merge_opts(opts,
|
8045
8051
|
:group_id => group_id,
|
8046
|
-
:
|
8052
|
+
:wiki_page__body__ => wiki_page__body__
|
8047
8053
|
)
|
8048
8054
|
|
8049
8055
|
# resource path
|
@@ -8052,13 +8058,46 @@ module Pandarus
|
|
8052
8058
|
headers = nil
|
8053
8059
|
form_params = select_params(options, form_param_keys)
|
8054
8060
|
query_params = select_params(options, query_param_keys)
|
8061
|
+
if opts[:next_page]
|
8062
|
+
pagination_params = page_params_load(:put, path)
|
8063
|
+
query_params.merge! pagination_params if pagination_params
|
8064
|
+
end
|
8065
|
+
response = mixed_request(:put, path, query_params, form_params, headers)
|
8066
|
+
page_params_store(:put, path)
|
8067
|
+
Page.new(response)
|
8068
|
+
end
|
8069
|
+
def list_pages(group_id,opts={})
|
8070
|
+
query_param_keys = [
|
8071
|
+
:sort,
|
8072
|
+
:order,
|
8073
|
+
:search_term,
|
8074
|
+
:published
|
8075
|
+
]
|
8076
|
+
|
8077
|
+
form_param_keys = [
|
8078
|
+
|
8079
|
+
]
|
8080
|
+
|
8081
|
+
# verify existence of params
|
8082
|
+
raise "group_id is required" if group_id.nil?
|
8083
|
+
# set default values and merge with input
|
8084
|
+
options = underscored_merge_opts(opts,
|
8085
|
+
:group_id => group_id
|
8086
|
+
)
|
8087
|
+
|
8088
|
+
# resource path
|
8089
|
+
path = path_replace("/v1/groups/{group_id}/pages",
|
8090
|
+
:group_id => group_id)
|
8091
|
+
headers = nil
|
8092
|
+
form_params = select_params(options, form_param_keys)
|
8093
|
+
query_params = select_params(options, query_param_keys)
|
8055
8094
|
if opts[:next_page]
|
8056
8095
|
pagination_params = page_params_load(:get, path)
|
8057
8096
|
query_params.merge! pagination_params if pagination_params
|
8058
8097
|
end
|
8059
8098
|
response = mixed_request(:get, path, query_params, form_params, headers)
|
8060
8099
|
page_params_store(:get, path)
|
8061
|
-
Page.new(response)
|
8100
|
+
response.map {|response|Page.new(response)}
|
8062
8101
|
end
|
8063
8102
|
def create_page(group_id,wiki_page__title__,wiki_page__body__,wiki_page__hide_from_students__,wiki_page__notify_of_update__,opts={})
|
8064
8103
|
query_param_keys = [
|
@@ -8105,13 +8144,45 @@ module Pandarus
|
|
8105
8144
|
page_params_store(:post, path)
|
8106
8145
|
Page.new(response)
|
8107
8146
|
end
|
8108
|
-
def
|
8147
|
+
def show_page(group_id,url,opts={})
|
8148
|
+
query_param_keys = [
|
8149
|
+
|
8150
|
+
]
|
8151
|
+
|
8152
|
+
form_param_keys = [
|
8153
|
+
|
8154
|
+
]
|
8155
|
+
|
8156
|
+
# verify existence of params
|
8157
|
+
raise "group_id is required" if group_id.nil?
|
8158
|
+
raise "url is required" if url.nil?
|
8159
|
+
# set default values and merge with input
|
8160
|
+
options = underscored_merge_opts(opts,
|
8161
|
+
:group_id => group_id,
|
8162
|
+
:url => url
|
8163
|
+
)
|
8164
|
+
|
8165
|
+
# resource path
|
8166
|
+
path = path_replace("/v1/groups/{group_id}/pages/{url}",
|
8167
|
+
:group_id => group_id,
|
8168
|
+
:url => url)
|
8169
|
+
headers = nil
|
8170
|
+
form_params = select_params(options, form_param_keys)
|
8171
|
+
query_params = select_params(options, query_param_keys)
|
8172
|
+
if opts[:next_page]
|
8173
|
+
pagination_params = page_params_load(:get, path)
|
8174
|
+
query_params.merge! pagination_params if pagination_params
|
8175
|
+
end
|
8176
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
8177
|
+
page_params_store(:get, path)
|
8178
|
+
Page.new(response)
|
8179
|
+
end
|
8180
|
+
def update_create_page(group_id,url,wiki_page__title__,wiki_page__body__,wiki_page__hide_from_students__,wiki_page__notify_of_update__,opts={})
|
8109
8181
|
query_param_keys = [
|
8110
8182
|
|
8111
8183
|
]
|
8112
8184
|
|
8113
8185
|
form_param_keys = [
|
8114
|
-
:url,
|
8115
8186
|
:wiki_page__title__,
|
8116
8187
|
:wiki_page__body__,
|
8117
8188
|
:wiki_page__hide_from_students__,
|
@@ -8140,8 +8211,9 @@ module Pandarus
|
|
8140
8211
|
)
|
8141
8212
|
|
8142
8213
|
# resource path
|
8143
|
-
path = path_replace("/v1/groups/{group_id}/
|
8144
|
-
:group_id => group_id
|
8214
|
+
path = path_replace("/v1/groups/{group_id}/pages/{url}",
|
8215
|
+
:group_id => group_id,
|
8216
|
+
:url => url)
|
8145
8217
|
headers = nil
|
8146
8218
|
form_params = select_params(options, form_param_keys)
|
8147
8219
|
query_params = select_params(options, query_param_keys)
|
@@ -8155,7 +8227,7 @@ module Pandarus
|
|
8155
8227
|
end
|
8156
8228
|
def delete_page(group_id,url,opts={})
|
8157
8229
|
query_param_keys = [
|
8158
|
-
|
8230
|
+
|
8159
8231
|
]
|
8160
8232
|
|
8161
8233
|
form_param_keys = [
|
@@ -8172,8 +8244,9 @@ module Pandarus
|
|
8172
8244
|
)
|
8173
8245
|
|
8174
8246
|
# resource path
|
8175
|
-
path = path_replace("/v1/groups/{group_id}/
|
8176
|
-
:group_id => group_id
|
8247
|
+
path = path_replace("/v1/groups/{group_id}/pages/{url}",
|
8248
|
+
:group_id => group_id,
|
8249
|
+
:url => url)
|
8177
8250
|
headers = nil
|
8178
8251
|
form_params = select_params(options, form_param_keys)
|
8179
8252
|
query_params = select_params(options, query_param_keys)
|
@@ -8795,7 +8868,7 @@ module Pandarus
|
|
8795
8868
|
page_params_store(:put, path)
|
8796
8869
|
Role.new(response)
|
8797
8870
|
end
|
8798
|
-
def import_sis_data(account_id,attachment,
|
8871
|
+
def import_sis_data(account_id,attachment,opts={})
|
8799
8872
|
query_param_keys = [
|
8800
8873
|
|
8801
8874
|
]
|
@@ -8815,22 +8888,10 @@ module Pandarus
|
|
8815
8888
|
# verify existence of params
|
8816
8889
|
raise "account_id is required" if account_id.nil?
|
8817
8890
|
raise "attachment is required" if attachment.nil?
|
8818
|
-
raise "extension is required" if extension.nil?
|
8819
|
-
raise "batch_mode is required" if batch_mode.nil?
|
8820
|
-
raise "batch_mode_term_id is required" if batch_mode_term_id.nil?
|
8821
|
-
raise "override_sis_stickiness is required" if override_sis_stickiness.nil?
|
8822
|
-
raise "add_sis_stickiness is required" if add_sis_stickiness.nil?
|
8823
|
-
raise "clear_sis_stickiness is required" if clear_sis_stickiness.nil?
|
8824
8891
|
# set default values and merge with input
|
8825
8892
|
options = underscored_merge_opts(opts,
|
8826
8893
|
:account_id => account_id,
|
8827
|
-
:attachment => attachment
|
8828
|
-
:extension => extension,
|
8829
|
-
:batch_mode => batch_mode,
|
8830
|
-
:batch_mode_term_id => batch_mode_term_id,
|
8831
|
-
:override_sis_stickiness => override_sis_stickiness,
|
8832
|
-
:add_sis_stickiness => add_sis_stickiness,
|
8833
|
-
:clear_sis_stickiness => clear_sis_stickiness
|
8894
|
+
:attachment => attachment
|
8834
8895
|
)
|
8835
8896
|
|
8836
8897
|
# resource path
|
@@ -9648,6 +9709,66 @@ module Pandarus
|
|
9648
9709
|
page_params_store(:get, path)
|
9649
9710
|
response
|
9650
9711
|
|
9712
|
+
end
|
9713
|
+
def hide_stream_item(id,opts={})
|
9714
|
+
query_param_keys = [
|
9715
|
+
|
9716
|
+
]
|
9717
|
+
|
9718
|
+
form_param_keys = [
|
9719
|
+
|
9720
|
+
]
|
9721
|
+
|
9722
|
+
# verify existence of params
|
9723
|
+
raise "id is required" if id.nil?
|
9724
|
+
# set default values and merge with input
|
9725
|
+
options = underscored_merge_opts(opts,
|
9726
|
+
:id => id
|
9727
|
+
)
|
9728
|
+
|
9729
|
+
# resource path
|
9730
|
+
path = path_replace("/v1/users/self/activity_stream/{id}",
|
9731
|
+
:id => id)
|
9732
|
+
headers = nil
|
9733
|
+
form_params = select_params(options, form_param_keys)
|
9734
|
+
query_params = select_params(options, query_param_keys)
|
9735
|
+
if opts[:next_page]
|
9736
|
+
pagination_params = page_params_load(:delete, path)
|
9737
|
+
query_params.merge! pagination_params if pagination_params
|
9738
|
+
end
|
9739
|
+
response = mixed_request(:delete, path, query_params, form_params, headers)
|
9740
|
+
page_params_store(:delete, path)
|
9741
|
+
response
|
9742
|
+
|
9743
|
+
end
|
9744
|
+
def hide_all_stream_items(opts={})
|
9745
|
+
query_param_keys = [
|
9746
|
+
|
9747
|
+
]
|
9748
|
+
|
9749
|
+
form_param_keys = [
|
9750
|
+
|
9751
|
+
]
|
9752
|
+
|
9753
|
+
# set default values and merge with input
|
9754
|
+
options = underscored_merge_opts(opts,
|
9755
|
+
|
9756
|
+
)
|
9757
|
+
|
9758
|
+
# resource path
|
9759
|
+
path = path_replace("/v1/users/self/activity_stream",
|
9760
|
+
)
|
9761
|
+
headers = nil
|
9762
|
+
form_params = select_params(options, form_param_keys)
|
9763
|
+
query_params = select_params(options, query_param_keys)
|
9764
|
+
if opts[:next_page]
|
9765
|
+
pagination_params = page_params_load(:delete, path)
|
9766
|
+
query_params.merge! pagination_params if pagination_params
|
9767
|
+
end
|
9768
|
+
response = mixed_request(:delete, path, query_params, form_params, headers)
|
9769
|
+
page_params_store(:delete, path)
|
9770
|
+
response
|
9771
|
+
|
9651
9772
|
end
|
9652
9773
|
def upload_file(user_id,opts={})
|
9653
9774
|
query_param_keys = [
|
@@ -10012,8 +10133,7 @@ module Pandarus
|
|
10012
10133
|
end
|
10013
10134
|
response = mixed_request(:get, path, query_params, form_params, headers)
|
10014
10135
|
page_params_store(:get, path)
|
10015
|
-
response
|
10016
|
-
|
10136
|
+
response.map {|response|PageView.new(response)}
|
10017
10137
|
end
|
10018
10138
|
|
10019
10139
|
end
|
data/lib/pandarus/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pandarus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -132,6 +132,7 @@ extra_rdoc_files: []
|
|
132
132
|
files:
|
133
133
|
- pandarus.gemspec
|
134
134
|
- lib/pandarus/api_base.rb
|
135
|
+
- lib/pandarus/client.rb
|
135
136
|
- lib/pandarus/model_base.rb
|
136
137
|
- lib/pandarus/models/account_authorization_config.rb
|
137
138
|
- lib/pandarus/models/admin.rb
|
@@ -165,6 +166,7 @@ files:
|
|
165
166
|
- lib/pandarus/models/outcome_link.rb
|
166
167
|
- lib/pandarus/models/page.rb
|
167
168
|
- lib/pandarus/models/page_revision.rb
|
169
|
+
- lib/pandarus/models/page_view.rb
|
168
170
|
- lib/pandarus/models/progress.rb
|
169
171
|
- lib/pandarus/models/quiz.rb
|
170
172
|
- lib/pandarus/models/quiz_report.rb
|