pandarus 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pandarus/client.rb +59 -1
- data/lib/pandarus/models.rb +7 -2
- data/lib/pandarus/models/assignment.rb +2 -1
- data/lib/pandarus/models/assignment_date.rb +3 -1
- data/lib/pandarus/models/calendar_event.rb +45 -0
- data/lib/pandarus/models/calendar_link.rb +17 -0
- data/lib/pandarus/models/content_details.rb +5 -2
- data/lib/pandarus/models/course.rb +2 -1
- data/lib/pandarus/models/course_progress.rb +20 -0
- data/lib/pandarus/models/enrollment.rb +4 -1
- data/lib/pandarus/models/enrollment_term.rb +22 -0
- data/lib/pandarus/models/grading_scheme_entry.rb +18 -0
- data/lib/pandarus/models/grading_standard.rb +21 -0
- data/lib/pandarus/models/group.rb +3 -1
- data/lib/pandarus/models/group_membership.rb +3 -2
- data/lib/pandarus/models/quiz.rb +5 -2
- data/lib/pandarus/models/quiz_permissions.rb +23 -0
- data/lib/pandarus/models/quiz_report.rb +6 -2
- data/lib/pandarus/models/report_parameters.rb +6 -4
- data/lib/pandarus/models/section.rb +2 -1
- data/lib/pandarus/models/user.rb +2 -1
- data/lib/pandarus/v1_api.rb +682 -909
- data/lib/pandarus/version.rb +1 -1
- data/pandarus.gemspec +1 -0
- data/spec/client_spec.rb +42 -0
- metadata +27 -4
- data/lib/pandarus/models/collection.rb +0 -22
- data/lib/pandarus/models/collection_item.rb +0 -33
@@ -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 ReportParameters < ModelBase
|
6
|
-
attr_accessor :enrollment_term_id, :include_deleted, :course_id, :order, :users, :accounts, :terms, :courses, :sections, :enrollments, :groups, :xlist, :
|
6
|
+
attr_accessor :enrollment_term_id, :include_deleted, :course_id, :order, :users, :accounts, :terms, :courses, :sections, :enrollments, :groups, :xlist, :sis_terms_csv, :sis_accounts_csv, :include_enrollment_state, :enrollment_state____, :start_at, :end_at
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -20,10 +20,12 @@ module Pandarus
|
|
20
20
|
:enrollments => {:external => "enrollments", :container => false, :type => nil},
|
21
21
|
:groups => {:external => "groups", :container => false, :type => nil},
|
22
22
|
:xlist => {:external => "xlist", :container => false, :type => nil},
|
23
|
-
:start_at => {:external => "start_at", :container => false, :type => "DateTime"},
|
24
|
-
:end_at => {:external => "end_at", :container => false, :type => "DateTime"},
|
25
23
|
:sis_terms_csv => {:external => "sis_terms_csv", :container => false, :type => "Integer"},
|
26
|
-
:sis_accounts_csv => {:external => "sis_accounts_csv", :container => false, :type => "Integer"}
|
24
|
+
:sis_accounts_csv => {:external => "sis_accounts_csv", :container => false, :type => "Integer"},
|
25
|
+
:include_enrollment_state => {:external => "include_enrollment_state", :container => false, :type => nil},
|
26
|
+
:enrollment_state____ => {:external => "enrollment_state[]", :container => false, :type => "String"},
|
27
|
+
:start_at => {:external => "start_at", :container => false, :type => "DateTime"},
|
28
|
+
:end_at => {:external => "end_at", :container => false, :type => "DateTime"}
|
27
29
|
|
28
30
|
}
|
29
31
|
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 Section < ModelBase
|
6
|
-
attr_accessor :id, :name, :sis_section_id, :course_id, :start_at, :end_at, :nonxlist_course_id
|
6
|
+
attr_accessor :id, :name, :sis_section_id, :sis_import_id, :course_id, :start_at, :end_at, :nonxlist_course_id
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -11,6 +11,7 @@ module Pandarus
|
|
11
11
|
:id => {:external => "id", :container => false, :type => "Integer"},
|
12
12
|
:name => {:external => "name", :container => false, :type => "String"},
|
13
13
|
:sis_section_id => {:external => "sis_section_id", :container => false, :type => "String"},
|
14
|
+
:sis_import_id => {:external => "sis_import_id", :container => false, :type => "Integer"},
|
14
15
|
:course_id => {:external => "course_id", :container => false, :type => "Integer"},
|
15
16
|
:start_at => {:external => "start_at", :container => false, :type => "DateTime"},
|
16
17
|
:end_at => {:external => "end_at", :container => false, :type => "DateTime"},
|
data/lib/pandarus/models/user.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 User < ModelBase
|
6
|
-
attr_accessor :id, :name, :sortable_name, :short_name, :sis_user_id, :sis_login_id, :login_id, :avatar_url, :enrollments, :email, :locale, :last_login, :time_zone
|
6
|
+
attr_accessor :id, :name, :sortable_name, :short_name, :sis_user_id, :sis_import_id, :sis_login_id, :login_id, :avatar_url, :enrollments, :email, :locale, :last_login, :time_zone
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -13,6 +13,7 @@ module Pandarus
|
|
13
13
|
:sortable_name => {:external => "sortable_name", :container => false, :type => "String"},
|
14
14
|
:short_name => {:external => "short_name", :container => false, :type => "String"},
|
15
15
|
:sis_user_id => {:external => "sis_user_id", :container => false, :type => "String"},
|
16
|
+
:sis_import_id => {:external => "sis_import_id", :container => false, :type => "Int64"},
|
16
17
|
:sis_login_id => {:external => "sis_login_id", :container => false, :type => "String"},
|
17
18
|
:login_id => {:external => "login_id", :container => false, :type => "String"},
|
18
19
|
:avatar_url => {:external => "avatar_url", :container => false, :type => "String"},
|
data/lib/pandarus/v1_api.rb
CHANGED
@@ -592,8 +592,7 @@ module Pandarus
|
|
592
592
|
end
|
593
593
|
response = mixed_request(:put, path, query_params, form_params, headers)
|
594
594
|
page_params_store(:put, path)
|
595
|
-
response
|
596
|
-
|
595
|
+
Account.new(response)
|
597
596
|
end
|
598
597
|
def change_the_domains_for_account(id,account__domains__,opts={})
|
599
598
|
query_param_keys = [
|
@@ -833,7 +832,7 @@ module Pandarus
|
|
833
832
|
page_params_store(:get, path)
|
834
833
|
response.map {|response|Admin.new(response)}
|
835
834
|
end
|
836
|
-
def
|
835
|
+
def get_department_level_participation_data_terms(account_id,term_id,opts={})
|
837
836
|
query_param_keys = [
|
838
837
|
|
839
838
|
]
|
@@ -867,7 +866,7 @@ module Pandarus
|
|
867
866
|
response
|
868
867
|
|
869
868
|
end
|
870
|
-
def
|
869
|
+
def get_department_level_participation_data_current(account_id,opts={})
|
871
870
|
query_param_keys = [
|
872
871
|
|
873
872
|
]
|
@@ -898,7 +897,7 @@ module Pandarus
|
|
898
897
|
response
|
899
898
|
|
900
899
|
end
|
901
|
-
def
|
900
|
+
def get_department_level_participation_data_completed(account_id,opts={})
|
902
901
|
query_param_keys = [
|
903
902
|
|
904
903
|
]
|
@@ -929,7 +928,7 @@ module Pandarus
|
|
929
928
|
response
|
930
929
|
|
931
930
|
end
|
932
|
-
def
|
931
|
+
def get_department_level_grade_data_terms(account_id,term_id,opts={})
|
933
932
|
query_param_keys = [
|
934
933
|
|
935
934
|
]
|
@@ -963,7 +962,7 @@ module Pandarus
|
|
963
962
|
response
|
964
963
|
|
965
964
|
end
|
966
|
-
def
|
965
|
+
def get_department_level_grade_data_current(account_id,opts={})
|
967
966
|
query_param_keys = [
|
968
967
|
|
969
968
|
]
|
@@ -994,7 +993,7 @@ module Pandarus
|
|
994
993
|
response
|
995
994
|
|
996
995
|
end
|
997
|
-
def
|
996
|
+
def get_department_level_grade_data_completed(account_id,opts={})
|
998
997
|
query_param_keys = [
|
999
998
|
|
1000
999
|
]
|
@@ -1025,7 +1024,7 @@ module Pandarus
|
|
1025
1024
|
response
|
1026
1025
|
|
1027
1026
|
end
|
1028
|
-
def
|
1027
|
+
def get_department_level_statistics_terms(account_id,term_id,opts={})
|
1029
1028
|
query_param_keys = [
|
1030
1029
|
|
1031
1030
|
]
|
@@ -1059,7 +1058,7 @@ module Pandarus
|
|
1059
1058
|
response
|
1060
1059
|
|
1061
1060
|
end
|
1062
|
-
def
|
1061
|
+
def get_department_level_statistics_current(account_id,opts={})
|
1063
1062
|
query_param_keys = [
|
1064
1063
|
|
1065
1064
|
]
|
@@ -1090,7 +1089,7 @@ module Pandarus
|
|
1090
1089
|
response
|
1091
1090
|
|
1092
1091
|
end
|
1093
|
-
def
|
1092
|
+
def get_department_level_statistics_completed(account_id,opts={})
|
1094
1093
|
query_param_keys = [
|
1095
1094
|
|
1096
1095
|
]
|
@@ -2064,6 +2063,7 @@ module Pandarus
|
|
2064
2063
|
:assignment__assignment_group_id__,
|
2065
2064
|
:assignment__muted__,
|
2066
2065
|
:assignment__assignment_overrides__,
|
2066
|
+
:assignment__only_visible_to_overrides__,
|
2067
2067
|
:assignment__published__,
|
2068
2068
|
|
2069
2069
|
]
|
@@ -2117,6 +2117,7 @@ module Pandarus
|
|
2117
2117
|
]
|
2118
2118
|
|
2119
2119
|
form_param_keys = [
|
2120
|
+
:assignment__grading_standard_id__,
|
2120
2121
|
|
2121
2122
|
]
|
2122
2123
|
|
@@ -2488,632 +2489,35 @@ module Pandarus
|
|
2488
2489
|
if opts[:next_page]
|
2489
2490
|
pagination_params = page_params_load(:get, path)
|
2490
2491
|
query_params.merge! pagination_params if pagination_params
|
2491
|
-
end
|
2492
|
-
response = mixed_request(:get, path, query_params, form_params, headers)
|
2493
|
-
page_params_store(:get, path)
|
2494
|
-
response
|
2495
|
-
|
2496
|
-
end
|
2497
|
-
def list_calendar_events(opts={})
|
2498
|
-
query_param_keys = [
|
2499
|
-
:type,
|
2500
|
-
:start_date,
|
2501
|
-
:end_date,
|
2502
|
-
:undated,
|
2503
|
-
:all_events,
|
2504
|
-
:context_codes
|
2505
|
-
]
|
2506
|
-
|
2507
|
-
form_param_keys = [
|
2508
|
-
|
2509
|
-
]
|
2510
|
-
|
2511
|
-
# set default values and merge with input
|
2512
|
-
options = underscored_merge_opts(opts,
|
2513
|
-
{}
|
2514
|
-
|
2515
|
-
)
|
2516
|
-
|
2517
|
-
# resource path
|
2518
|
-
path = path_replace("/v1/calendar_events",
|
2519
|
-
)
|
2520
|
-
headers = nil
|
2521
|
-
form_params = select_params(options, form_param_keys)
|
2522
|
-
query_params = select_params(options, query_param_keys)
|
2523
|
-
if opts[:next_page]
|
2524
|
-
pagination_params = page_params_load(:get, path)
|
2525
|
-
query_params.merge! pagination_params if pagination_params
|
2526
|
-
end
|
2527
|
-
response = mixed_request(:get, path, query_params, form_params, headers)
|
2528
|
-
page_params_store(:get, path)
|
2529
|
-
response
|
2530
|
-
|
2531
|
-
end
|
2532
|
-
def create_calendar_event(calendar_event__context_code__,opts={})
|
2533
|
-
query_param_keys = [
|
2534
|
-
|
2535
|
-
]
|
2536
|
-
|
2537
|
-
form_param_keys = [
|
2538
|
-
:calendar_event__context_code__,
|
2539
|
-
:calendar_event__title__,
|
2540
|
-
:calendar_event__description__,
|
2541
|
-
:calendar_event__start_at__,
|
2542
|
-
:calendar_event__end_at__,
|
2543
|
-
:calendar_event__location_name__,
|
2544
|
-
:calendar_event__location_address__,
|
2545
|
-
:calendar_event__time_zone_edited__,
|
2546
|
-
:calendar_event__child_event_data_____x____start_at__,
|
2547
|
-
:calendar_event__child_event_data_____x____end_at__,
|
2548
|
-
:calendar_event__child_event_data_____x____context_code__,
|
2549
|
-
|
2550
|
-
]
|
2551
|
-
|
2552
|
-
# verify existence of params
|
2553
|
-
raise "calendar_event__context_code__ is required" if calendar_event__context_code__.nil?
|
2554
|
-
# set default values and merge with input
|
2555
|
-
options = underscored_merge_opts(opts,
|
2556
|
-
:calendar_event__context_code__ => calendar_event__context_code__
|
2557
|
-
)
|
2558
|
-
|
2559
|
-
# resource path
|
2560
|
-
path = path_replace("/v1/calendar_events",
|
2561
|
-
)
|
2562
|
-
headers = nil
|
2563
|
-
form_params = select_params(options, form_param_keys)
|
2564
|
-
query_params = select_params(options, query_param_keys)
|
2565
|
-
if opts[:next_page]
|
2566
|
-
pagination_params = page_params_load(:post, path)
|
2567
|
-
query_params.merge! pagination_params if pagination_params
|
2568
|
-
end
|
2569
|
-
response = mixed_request(:post, path, query_params, form_params, headers)
|
2570
|
-
page_params_store(:post, path)
|
2571
|
-
response
|
2572
|
-
|
2573
|
-
end
|
2574
|
-
def get_single_calendar_event_or_assignment(id,opts={})
|
2575
|
-
query_param_keys = [
|
2576
|
-
|
2577
|
-
]
|
2578
|
-
|
2579
|
-
form_param_keys = [
|
2580
|
-
|
2581
|
-
]
|
2582
|
-
|
2583
|
-
# verify existence of params
|
2584
|
-
raise "id is required" if id.nil?
|
2585
|
-
# set default values and merge with input
|
2586
|
-
options = underscored_merge_opts(opts,
|
2587
|
-
:id => id
|
2588
|
-
)
|
2589
|
-
|
2590
|
-
# resource path
|
2591
|
-
path = path_replace("/v1/calendar_events/{id}",
|
2592
|
-
:id => id)
|
2593
|
-
headers = nil
|
2594
|
-
form_params = select_params(options, form_param_keys)
|
2595
|
-
query_params = select_params(options, query_param_keys)
|
2596
|
-
if opts[:next_page]
|
2597
|
-
pagination_params = page_params_load(:get, path)
|
2598
|
-
query_params.merge! pagination_params if pagination_params
|
2599
|
-
end
|
2600
|
-
response = mixed_request(:get, path, query_params, form_params, headers)
|
2601
|
-
page_params_store(:get, path)
|
2602
|
-
response
|
2603
|
-
|
2604
|
-
end
|
2605
|
-
def reserve_time_slot_calendar_events(id,opts={})
|
2606
|
-
query_param_keys = [
|
2607
|
-
|
2608
|
-
]
|
2609
|
-
|
2610
|
-
form_param_keys = [
|
2611
|
-
:participant_id,
|
2612
|
-
:cancel_existing,
|
2613
|
-
|
2614
|
-
]
|
2615
|
-
|
2616
|
-
# verify existence of params
|
2617
|
-
raise "id is required" if id.nil?
|
2618
|
-
# set default values and merge with input
|
2619
|
-
options = underscored_merge_opts(opts,
|
2620
|
-
:id => id
|
2621
|
-
)
|
2622
|
-
|
2623
|
-
# resource path
|
2624
|
-
path = path_replace("/v1/calendar_events/{id}/reservations",
|
2625
|
-
:id => id)
|
2626
|
-
headers = nil
|
2627
|
-
form_params = select_params(options, form_param_keys)
|
2628
|
-
query_params = select_params(options, query_param_keys)
|
2629
|
-
if opts[:next_page]
|
2630
|
-
pagination_params = page_params_load(:post, path)
|
2631
|
-
query_params.merge! pagination_params if pagination_params
|
2632
|
-
end
|
2633
|
-
response = mixed_request(:post, path, query_params, form_params, headers)
|
2634
|
-
page_params_store(:post, path)
|
2635
|
-
response
|
2636
|
-
|
2637
|
-
end
|
2638
|
-
def reserve_time_slot_calendar_events(id,participant_id,opts={})
|
2639
|
-
query_param_keys = [
|
2640
|
-
|
2641
|
-
]
|
2642
|
-
|
2643
|
-
form_param_keys = [
|
2644
|
-
:cancel_existing,
|
2645
|
-
|
2646
|
-
]
|
2647
|
-
|
2648
|
-
# verify existence of params
|
2649
|
-
raise "id is required" if id.nil?
|
2650
|
-
raise "participant_id is required" if participant_id.nil?
|
2651
|
-
# set default values and merge with input
|
2652
|
-
options = underscored_merge_opts(opts,
|
2653
|
-
:id => id,
|
2654
|
-
:participant_id => participant_id
|
2655
|
-
)
|
2656
|
-
|
2657
|
-
# resource path
|
2658
|
-
path = path_replace("/v1/calendar_events/{id}/reservations/{participant_id}",
|
2659
|
-
:id => id,
|
2660
|
-
:participant_id => participant_id)
|
2661
|
-
headers = nil
|
2662
|
-
form_params = select_params(options, form_param_keys)
|
2663
|
-
query_params = select_params(options, query_param_keys)
|
2664
|
-
if opts[:next_page]
|
2665
|
-
pagination_params = page_params_load(:post, path)
|
2666
|
-
query_params.merge! pagination_params if pagination_params
|
2667
|
-
end
|
2668
|
-
response = mixed_request(:post, path, query_params, form_params, headers)
|
2669
|
-
page_params_store(:post, path)
|
2670
|
-
response
|
2671
|
-
|
2672
|
-
end
|
2673
|
-
def update_calendar_event(id,calendar_event__context_code__,opts={})
|
2674
|
-
query_param_keys = [
|
2675
|
-
|
2676
|
-
]
|
2677
|
-
|
2678
|
-
form_param_keys = [
|
2679
|
-
:calendar_event__context_code__,
|
2680
|
-
:calendar_event__title__,
|
2681
|
-
:calendar_event__description__,
|
2682
|
-
:calendar_event__start_at__,
|
2683
|
-
:calendar_event__end_at__,
|
2684
|
-
:calendar_event__location_name__,
|
2685
|
-
:calendar_event__location_address__,
|
2686
|
-
:calendar_event__time_zone_edited__,
|
2687
|
-
:calendar_event__child_event_data_____x____start_at__,
|
2688
|
-
:calendar_event__child_event_data_____x____end_at__,
|
2689
|
-
:calendar_event__child_event_data_____x____context_code__,
|
2690
|
-
|
2691
|
-
]
|
2692
|
-
|
2693
|
-
# verify existence of params
|
2694
|
-
raise "id is required" if id.nil?
|
2695
|
-
raise "calendar_event__context_code__ is required" if calendar_event__context_code__.nil?
|
2696
|
-
# set default values and merge with input
|
2697
|
-
options = underscored_merge_opts(opts,
|
2698
|
-
:id => id,
|
2699
|
-
:calendar_event__context_code__ => calendar_event__context_code__
|
2700
|
-
)
|
2701
|
-
|
2702
|
-
# resource path
|
2703
|
-
path = path_replace("/v1/calendar_events/{id}",
|
2704
|
-
:id => id)
|
2705
|
-
headers = nil
|
2706
|
-
form_params = select_params(options, form_param_keys)
|
2707
|
-
query_params = select_params(options, query_param_keys)
|
2708
|
-
if opts[:next_page]
|
2709
|
-
pagination_params = page_params_load(:put, path)
|
2710
|
-
query_params.merge! pagination_params if pagination_params
|
2711
|
-
end
|
2712
|
-
response = mixed_request(:put, path, query_params, form_params, headers)
|
2713
|
-
page_params_store(:put, path)
|
2714
|
-
response
|
2715
|
-
|
2716
|
-
end
|
2717
|
-
def delete_calendar_event(id,opts={})
|
2718
|
-
query_param_keys = [
|
2719
|
-
:cancel_reason
|
2720
|
-
]
|
2721
|
-
|
2722
|
-
form_param_keys = [
|
2723
|
-
|
2724
|
-
]
|
2725
|
-
|
2726
|
-
# verify existence of params
|
2727
|
-
raise "id is required" if id.nil?
|
2728
|
-
# set default values and merge with input
|
2729
|
-
options = underscored_merge_opts(opts,
|
2730
|
-
:id => id
|
2731
|
-
)
|
2732
|
-
|
2733
|
-
# resource path
|
2734
|
-
path = path_replace("/v1/calendar_events/{id}",
|
2735
|
-
:id => id)
|
2736
|
-
headers = nil
|
2737
|
-
form_params = select_params(options, form_param_keys)
|
2738
|
-
query_params = select_params(options, query_param_keys)
|
2739
|
-
if opts[:next_page]
|
2740
|
-
pagination_params = page_params_load(:delete, path)
|
2741
|
-
query_params.merge! pagination_params if pagination_params
|
2742
|
-
end
|
2743
|
-
response = mixed_request(:delete, path, query_params, form_params, headers)
|
2744
|
-
page_params_store(:delete, path)
|
2745
|
-
response
|
2746
|
-
|
2747
|
-
end
|
2748
|
-
def list_members_of_collaboration(id,opts={})
|
2749
|
-
query_param_keys = [
|
2750
|
-
|
2751
|
-
]
|
2752
|
-
|
2753
|
-
form_param_keys = [
|
2754
|
-
|
2755
|
-
]
|
2756
|
-
|
2757
|
-
# verify existence of params
|
2758
|
-
raise "id is required" if id.nil?
|
2759
|
-
# set default values and merge with input
|
2760
|
-
options = underscored_merge_opts(opts,
|
2761
|
-
:id => id
|
2762
|
-
)
|
2763
|
-
|
2764
|
-
# resource path
|
2765
|
-
path = path_replace("/v1/collaborations/{id}/members",
|
2766
|
-
:id => id)
|
2767
|
-
headers = nil
|
2768
|
-
form_params = select_params(options, form_param_keys)
|
2769
|
-
query_params = select_params(options, query_param_keys)
|
2770
|
-
if opts[:next_page]
|
2771
|
-
pagination_params = page_params_load(:get, path)
|
2772
|
-
query_params.merge! pagination_params if pagination_params
|
2773
|
-
end
|
2774
|
-
response = mixed_request(:get, path, query_params, form_params, headers)
|
2775
|
-
page_params_store(:get, path)
|
2776
|
-
response.map {|response|Collaborator.new(response)}
|
2777
|
-
end
|
2778
|
-
def list_user_group_collections_users(user_id,opts={})
|
2779
|
-
query_param_keys = [
|
2780
|
-
|
2781
|
-
]
|
2782
|
-
|
2783
|
-
form_param_keys = [
|
2784
|
-
|
2785
|
-
]
|
2786
|
-
|
2787
|
-
# verify existence of params
|
2788
|
-
raise "user_id is required" if user_id.nil?
|
2789
|
-
# set default values and merge with input
|
2790
|
-
options = underscored_merge_opts(opts,
|
2791
|
-
:user_id => user_id
|
2792
|
-
)
|
2793
|
-
|
2794
|
-
# resource path
|
2795
|
-
path = path_replace("/v1/users/{user_id}/collections",
|
2796
|
-
:user_id => user_id)
|
2797
|
-
headers = nil
|
2798
|
-
form_params = select_params(options, form_param_keys)
|
2799
|
-
query_params = select_params(options, query_param_keys)
|
2800
|
-
if opts[:next_page]
|
2801
|
-
pagination_params = page_params_load(:get, path)
|
2802
|
-
query_params.merge! pagination_params if pagination_params
|
2803
|
-
end
|
2804
|
-
response = mixed_request(:get, path, query_params, form_params, headers)
|
2805
|
-
page_params_store(:get, path)
|
2806
|
-
response.map {|response|Collection.new(response)}
|
2807
|
-
end
|
2808
|
-
def list_user_group_collections_groups(group_id,opts={})
|
2809
|
-
query_param_keys = [
|
2810
|
-
|
2811
|
-
]
|
2812
|
-
|
2813
|
-
form_param_keys = [
|
2814
|
-
|
2815
|
-
]
|
2816
|
-
|
2817
|
-
# verify existence of params
|
2818
|
-
raise "group_id is required" if group_id.nil?
|
2819
|
-
# set default values and merge with input
|
2820
|
-
options = underscored_merge_opts(opts,
|
2821
|
-
:group_id => group_id
|
2822
|
-
)
|
2823
|
-
|
2824
|
-
# resource path
|
2825
|
-
path = path_replace("/v1/groups/{group_id}/collections",
|
2826
|
-
:group_id => group_id)
|
2827
|
-
headers = nil
|
2828
|
-
form_params = select_params(options, form_param_keys)
|
2829
|
-
query_params = select_params(options, query_param_keys)
|
2830
|
-
if opts[:next_page]
|
2831
|
-
pagination_params = page_params_load(:get, path)
|
2832
|
-
query_params.merge! pagination_params if pagination_params
|
2833
|
-
end
|
2834
|
-
response = mixed_request(:get, path, query_params, form_params, headers)
|
2835
|
-
page_params_store(:get, path)
|
2836
|
-
response.map {|response|Collection.new(response)}
|
2837
|
-
end
|
2838
|
-
def list_pinnable_collections(opts={})
|
2839
|
-
query_param_keys = [
|
2840
|
-
|
2841
|
-
]
|
2842
|
-
|
2843
|
-
form_param_keys = [
|
2844
|
-
|
2845
|
-
]
|
2846
|
-
|
2847
|
-
# set default values and merge with input
|
2848
|
-
options = underscored_merge_opts(opts,
|
2849
|
-
{}
|
2850
|
-
|
2851
|
-
)
|
2852
|
-
|
2853
|
-
# resource path
|
2854
|
-
path = path_replace("/v1/collections",
|
2855
|
-
)
|
2856
|
-
headers = nil
|
2857
|
-
form_params = select_params(options, form_param_keys)
|
2858
|
-
query_params = select_params(options, query_param_keys)
|
2859
|
-
if opts[:next_page]
|
2860
|
-
pagination_params = page_params_load(:get, path)
|
2861
|
-
query_params.merge! pagination_params if pagination_params
|
2862
|
-
end
|
2863
|
-
response = mixed_request(:get, path, query_params, form_params, headers)
|
2864
|
-
page_params_store(:get, path)
|
2865
|
-
response
|
2866
|
-
|
2867
|
-
end
|
2868
|
-
def get_single_collection(collection_id,opts={})
|
2869
|
-
query_param_keys = [
|
2870
|
-
|
2871
|
-
]
|
2872
|
-
|
2873
|
-
form_param_keys = [
|
2874
|
-
|
2875
|
-
]
|
2876
|
-
|
2877
|
-
# verify existence of params
|
2878
|
-
raise "collection_id is required" if collection_id.nil?
|
2879
|
-
# set default values and merge with input
|
2880
|
-
options = underscored_merge_opts(opts,
|
2881
|
-
:collection_id => collection_id
|
2882
|
-
)
|
2883
|
-
|
2884
|
-
# resource path
|
2885
|
-
path = path_replace("/v1/collections/{collection_id}",
|
2886
|
-
:collection_id => collection_id)
|
2887
|
-
headers = nil
|
2888
|
-
form_params = select_params(options, form_param_keys)
|
2889
|
-
query_params = select_params(options, query_param_keys)
|
2890
|
-
if opts[:next_page]
|
2891
|
-
pagination_params = page_params_load(:get, path)
|
2892
|
-
query_params.merge! pagination_params if pagination_params
|
2893
|
-
end
|
2894
|
-
response = mixed_request(:get, path, query_params, form_params, headers)
|
2895
|
-
page_params_store(:get, path)
|
2896
|
-
Collection.new(response)
|
2897
|
-
end
|
2898
|
-
def create_collection_users(user_id,name,visibility,opts={})
|
2899
|
-
query_param_keys = [
|
2900
|
-
|
2901
|
-
]
|
2902
|
-
|
2903
|
-
form_param_keys = [
|
2904
|
-
:name,
|
2905
|
-
:visibility,
|
2906
|
-
|
2907
|
-
]
|
2908
|
-
|
2909
|
-
# verify existence of params
|
2910
|
-
raise "user_id is required" if user_id.nil?
|
2911
|
-
raise "name is required" if name.nil?
|
2912
|
-
raise "visibility is required" if visibility.nil?
|
2913
|
-
# set default values and merge with input
|
2914
|
-
options = underscored_merge_opts(opts,
|
2915
|
-
:user_id => user_id,
|
2916
|
-
:name => name,
|
2917
|
-
:visibility => visibility
|
2918
|
-
)
|
2919
|
-
|
2920
|
-
# resource path
|
2921
|
-
path = path_replace("/v1/users/{user_id}/collections",
|
2922
|
-
:user_id => user_id)
|
2923
|
-
headers = nil
|
2924
|
-
form_params = select_params(options, form_param_keys)
|
2925
|
-
query_params = select_params(options, query_param_keys)
|
2926
|
-
if opts[:next_page]
|
2927
|
-
pagination_params = page_params_load(:post, path)
|
2928
|
-
query_params.merge! pagination_params if pagination_params
|
2929
|
-
end
|
2930
|
-
response = mixed_request(:post, path, query_params, form_params, headers)
|
2931
|
-
page_params_store(:post, path)
|
2932
|
-
Collection.new(response)
|
2933
|
-
end
|
2934
|
-
def create_collection_groups(group_id,name,visibility,opts={})
|
2935
|
-
query_param_keys = [
|
2936
|
-
|
2937
|
-
]
|
2938
|
-
|
2939
|
-
form_param_keys = [
|
2940
|
-
:name,
|
2941
|
-
:visibility,
|
2942
|
-
|
2943
|
-
]
|
2944
|
-
|
2945
|
-
# verify existence of params
|
2946
|
-
raise "group_id is required" if group_id.nil?
|
2947
|
-
raise "name is required" if name.nil?
|
2948
|
-
raise "visibility is required" if visibility.nil?
|
2949
|
-
# set default values and merge with input
|
2950
|
-
options = underscored_merge_opts(opts,
|
2951
|
-
:group_id => group_id,
|
2952
|
-
:name => name,
|
2953
|
-
:visibility => visibility
|
2954
|
-
)
|
2955
|
-
|
2956
|
-
# resource path
|
2957
|
-
path = path_replace("/v1/groups/{group_id}/collections",
|
2958
|
-
:group_id => group_id)
|
2959
|
-
headers = nil
|
2960
|
-
form_params = select_params(options, form_param_keys)
|
2961
|
-
query_params = select_params(options, query_param_keys)
|
2962
|
-
if opts[:next_page]
|
2963
|
-
pagination_params = page_params_load(:post, path)
|
2964
|
-
query_params.merge! pagination_params if pagination_params
|
2965
|
-
end
|
2966
|
-
response = mixed_request(:post, path, query_params, form_params, headers)
|
2967
|
-
page_params_store(:post, path)
|
2968
|
-
Collection.new(response)
|
2969
|
-
end
|
2970
|
-
def edit_collection(collection_id,name,visibility,opts={})
|
2971
|
-
query_param_keys = [
|
2972
|
-
|
2973
|
-
]
|
2974
|
-
|
2975
|
-
form_param_keys = [
|
2976
|
-
:name,
|
2977
|
-
:visibility,
|
2978
|
-
|
2979
|
-
]
|
2980
|
-
|
2981
|
-
# verify existence of params
|
2982
|
-
raise "collection_id is required" if collection_id.nil?
|
2983
|
-
raise "name is required" if name.nil?
|
2984
|
-
raise "visibility is required" if visibility.nil?
|
2985
|
-
# set default values and merge with input
|
2986
|
-
options = underscored_merge_opts(opts,
|
2987
|
-
:collection_id => collection_id,
|
2988
|
-
:name => name,
|
2989
|
-
:visibility => visibility
|
2990
|
-
)
|
2991
|
-
|
2992
|
-
# resource path
|
2993
|
-
path = path_replace("/v1/collections/{collection_id}",
|
2994
|
-
:collection_id => collection_id)
|
2995
|
-
headers = nil
|
2996
|
-
form_params = select_params(options, form_param_keys)
|
2997
|
-
query_params = select_params(options, query_param_keys)
|
2998
|
-
if opts[:next_page]
|
2999
|
-
pagination_params = page_params_load(:put, path)
|
3000
|
-
query_params.merge! pagination_params if pagination_params
|
3001
|
-
end
|
3002
|
-
response = mixed_request(:put, path, query_params, form_params, headers)
|
3003
|
-
page_params_store(:put, path)
|
3004
|
-
Collection.new(response)
|
3005
|
-
end
|
3006
|
-
def delete_collection(collection_id,opts={})
|
3007
|
-
query_param_keys = [
|
3008
|
-
|
3009
|
-
]
|
3010
|
-
|
3011
|
-
form_param_keys = [
|
3012
|
-
|
3013
|
-
]
|
3014
|
-
|
3015
|
-
# verify existence of params
|
3016
|
-
raise "collection_id is required" if collection_id.nil?
|
3017
|
-
# set default values and merge with input
|
3018
|
-
options = underscored_merge_opts(opts,
|
3019
|
-
:collection_id => collection_id
|
3020
|
-
)
|
3021
|
-
|
3022
|
-
# resource path
|
3023
|
-
path = path_replace("/v1/collections/{collection_id}",
|
3024
|
-
:collection_id => collection_id)
|
3025
|
-
headers = nil
|
3026
|
-
form_params = select_params(options, form_param_keys)
|
3027
|
-
query_params = select_params(options, query_param_keys)
|
3028
|
-
if opts[:next_page]
|
3029
|
-
pagination_params = page_params_load(:delete, path)
|
3030
|
-
query_params.merge! pagination_params if pagination_params
|
3031
|
-
end
|
3032
|
-
response = mixed_request(:delete, path, query_params, form_params, headers)
|
3033
|
-
page_params_store(:delete, path)
|
3034
|
-
Collection.new(response)
|
3035
|
-
end
|
3036
|
-
def follow_collection(collection_id,opts={})
|
3037
|
-
query_param_keys = [
|
3038
|
-
|
3039
|
-
]
|
3040
|
-
|
3041
|
-
form_param_keys = [
|
3042
|
-
|
3043
|
-
]
|
3044
|
-
|
3045
|
-
# verify existence of params
|
3046
|
-
raise "collection_id is required" if collection_id.nil?
|
3047
|
-
# set default values and merge with input
|
3048
|
-
options = underscored_merge_opts(opts,
|
3049
|
-
:collection_id => collection_id
|
3050
|
-
)
|
3051
|
-
|
3052
|
-
# resource path
|
3053
|
-
path = path_replace("/v1/collections/{collection_id}/followers/self",
|
3054
|
-
:collection_id => collection_id)
|
3055
|
-
headers = nil
|
3056
|
-
form_params = select_params(options, form_param_keys)
|
3057
|
-
query_params = select_params(options, query_param_keys)
|
3058
|
-
if opts[:next_page]
|
3059
|
-
pagination_params = page_params_load(:put, path)
|
3060
|
-
query_params.merge! pagination_params if pagination_params
|
3061
|
-
end
|
3062
|
-
response = mixed_request(:put, path, query_params, form_params, headers)
|
3063
|
-
page_params_store(:put, path)
|
3064
|
-
response
|
3065
|
-
|
3066
|
-
end
|
3067
|
-
def un_follow_collection(collection_id,opts={})
|
3068
|
-
query_param_keys = [
|
3069
|
-
|
3070
|
-
]
|
3071
|
-
|
3072
|
-
form_param_keys = [
|
3073
|
-
|
3074
|
-
]
|
3075
|
-
|
3076
|
-
# verify existence of params
|
3077
|
-
raise "collection_id is required" if collection_id.nil?
|
3078
|
-
# set default values and merge with input
|
3079
|
-
options = underscored_merge_opts(opts,
|
3080
|
-
:collection_id => collection_id
|
3081
|
-
)
|
3082
|
-
|
3083
|
-
# resource path
|
3084
|
-
path = path_replace("/v1/collections/{collection_id}/followers/self",
|
3085
|
-
:collection_id => collection_id)
|
3086
|
-
headers = nil
|
3087
|
-
form_params = select_params(options, form_param_keys)
|
3088
|
-
query_params = select_params(options, query_param_keys)
|
3089
|
-
if opts[:next_page]
|
3090
|
-
pagination_params = page_params_load(:delete, path)
|
3091
|
-
query_params.merge! pagination_params if pagination_params
|
3092
|
-
end
|
3093
|
-
response = mixed_request(:delete, path, query_params, form_params, headers)
|
3094
|
-
page_params_store(:delete, path)
|
2492
|
+
end
|
2493
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
2494
|
+
page_params_store(:get, path)
|
3095
2495
|
response
|
3096
2496
|
|
3097
2497
|
end
|
3098
|
-
def
|
2498
|
+
def list_calendar_events(opts={})
|
3099
2499
|
query_param_keys = [
|
3100
|
-
|
2500
|
+
:type,
|
2501
|
+
:start_date,
|
2502
|
+
:end_date,
|
2503
|
+
:undated,
|
2504
|
+
:all_events,
|
2505
|
+
:context_codes
|
3101
2506
|
]
|
3102
2507
|
|
3103
2508
|
form_param_keys = [
|
3104
2509
|
|
3105
2510
|
]
|
3106
2511
|
|
3107
|
-
# verify existence of params
|
3108
|
-
raise "collection_id is required" if collection_id.nil?
|
3109
2512
|
# set default values and merge with input
|
3110
2513
|
options = underscored_merge_opts(opts,
|
3111
|
-
|
2514
|
+
{}
|
2515
|
+
|
3112
2516
|
)
|
3113
2517
|
|
3114
2518
|
# resource path
|
3115
|
-
path = path_replace("/v1/
|
3116
|
-
|
2519
|
+
path = path_replace("/v1/calendar_events",
|
2520
|
+
)
|
3117
2521
|
headers = nil
|
3118
2522
|
form_params = select_params(options, form_param_keys)
|
3119
2523
|
query_params = select_params(options, query_param_keys)
|
@@ -3123,39 +2527,51 @@ module Pandarus
|
|
3123
2527
|
end
|
3124
2528
|
response = mixed_request(:get, path, query_params, form_params, headers)
|
3125
2529
|
page_params_store(:get, path)
|
3126
|
-
response.map {|response|
|
2530
|
+
response.map {|response|CalendarEvent.new(response)}
|
3127
2531
|
end
|
3128
|
-
def
|
2532
|
+
def create_calendar_event(calendar_event__context_code__,opts={})
|
3129
2533
|
query_param_keys = [
|
3130
2534
|
|
3131
2535
|
]
|
3132
2536
|
|
3133
2537
|
form_param_keys = [
|
2538
|
+
:calendar_event__context_code__,
|
2539
|
+
:calendar_event__title__,
|
2540
|
+
:calendar_event__description__,
|
2541
|
+
:calendar_event__start_at__,
|
2542
|
+
:calendar_event__end_at__,
|
2543
|
+
:calendar_event__location_name__,
|
2544
|
+
:calendar_event__location_address__,
|
2545
|
+
:calendar_event__time_zone_edited__,
|
2546
|
+
:calendar_event__child_event_data_____x____start_at__,
|
2547
|
+
:calendar_event__child_event_data_____x____end_at__,
|
2548
|
+
:calendar_event__child_event_data_____x____context_code__,
|
3134
2549
|
|
3135
2550
|
]
|
3136
2551
|
|
3137
2552
|
# verify existence of params
|
3138
|
-
raise "
|
2553
|
+
raise "calendar_event__context_code__ is required" if calendar_event__context_code__.nil?
|
3139
2554
|
# set default values and merge with input
|
3140
2555
|
options = underscored_merge_opts(opts,
|
3141
|
-
:
|
2556
|
+
:calendar_event__context_code__ => calendar_event__context_code__
|
3142
2557
|
)
|
3143
2558
|
|
3144
2559
|
# resource path
|
3145
|
-
path = path_replace("/v1/
|
3146
|
-
|
2560
|
+
path = path_replace("/v1/calendar_events",
|
2561
|
+
)
|
3147
2562
|
headers = nil
|
3148
2563
|
form_params = select_params(options, form_param_keys)
|
3149
2564
|
query_params = select_params(options, query_param_keys)
|
3150
2565
|
if opts[:next_page]
|
3151
|
-
pagination_params = page_params_load(:
|
2566
|
+
pagination_params = page_params_load(:post, path)
|
3152
2567
|
query_params.merge! pagination_params if pagination_params
|
3153
2568
|
end
|
3154
|
-
response = mixed_request(:
|
3155
|
-
page_params_store(:
|
3156
|
-
response
|
2569
|
+
response = mixed_request(:post, path, query_params, form_params, headers)
|
2570
|
+
page_params_store(:post, path)
|
2571
|
+
response
|
2572
|
+
|
3157
2573
|
end
|
3158
|
-
def
|
2574
|
+
def get_single_calendar_event_or_assignment(id,opts={})
|
3159
2575
|
query_param_keys = [
|
3160
2576
|
|
3161
2577
|
]
|
@@ -3165,15 +2581,15 @@ module Pandarus
|
|
3165
2581
|
]
|
3166
2582
|
|
3167
2583
|
# verify existence of params
|
3168
|
-
raise "
|
2584
|
+
raise "id is required" if id.nil?
|
3169
2585
|
# set default values and merge with input
|
3170
2586
|
options = underscored_merge_opts(opts,
|
3171
|
-
:
|
2587
|
+
:id => id
|
3172
2588
|
)
|
3173
2589
|
|
3174
2590
|
# resource path
|
3175
|
-
path = path_replace("/v1/
|
3176
|
-
:
|
2591
|
+
path = path_replace("/v1/calendar_events/{id}",
|
2592
|
+
:id => id)
|
3177
2593
|
headers = nil
|
3178
2594
|
form_params = select_params(options, form_param_keys)
|
3179
2595
|
query_params = select_params(options, query_param_keys)
|
@@ -3183,42 +2599,29 @@ module Pandarus
|
|
3183
2599
|
end
|
3184
2600
|
response = mixed_request(:get, path, query_params, form_params, headers)
|
3185
2601
|
page_params_store(:get, path)
|
3186
|
-
|
2602
|
+
CalendarEvent.new(response)
|
3187
2603
|
end
|
3188
|
-
def
|
2604
|
+
def reserve_time_slot(id,opts={})
|
3189
2605
|
query_param_keys = [
|
3190
2606
|
|
3191
2607
|
]
|
3192
2608
|
|
3193
2609
|
form_param_keys = [
|
3194
|
-
:
|
3195
|
-
:
|
3196
|
-
:description,
|
3197
|
-
:image_url,
|
3198
|
-
:user_comment,
|
2610
|
+
:participant_id,
|
2611
|
+
:cancel_existing,
|
3199
2612
|
|
3200
2613
|
]
|
3201
2614
|
|
3202
2615
|
# verify existence of params
|
3203
|
-
raise "
|
3204
|
-
raise "link_url is required" if link_url.nil?
|
3205
|
-
raise "title is required" if title.nil?
|
3206
|
-
raise "description is required" if description.nil?
|
3207
|
-
raise "image_url is required" if image_url.nil?
|
3208
|
-
raise "user_comment is required" if user_comment.nil?
|
2616
|
+
raise "id is required" if id.nil?
|
3209
2617
|
# set default values and merge with input
|
3210
2618
|
options = underscored_merge_opts(opts,
|
3211
|
-
:
|
3212
|
-
:link_url => link_url,
|
3213
|
-
:title => title,
|
3214
|
-
:description => description,
|
3215
|
-
:image_url => image_url,
|
3216
|
-
:user_comment => user_comment
|
2619
|
+
:id => id
|
3217
2620
|
)
|
3218
2621
|
|
3219
2622
|
# resource path
|
3220
|
-
path = path_replace("/v1/
|
3221
|
-
:
|
2623
|
+
path = path_replace("/v1/calendar_events/{id}/reservations",
|
2624
|
+
:id => id)
|
3222
2625
|
headers = nil
|
3223
2626
|
form_params = select_params(options, form_param_keys)
|
3224
2627
|
query_params = select_params(options, query_param_keys)
|
@@ -3228,74 +2631,91 @@ module Pandarus
|
|
3228
2631
|
end
|
3229
2632
|
response = mixed_request(:post, path, query_params, form_params, headers)
|
3230
2633
|
page_params_store(:post, path)
|
3231
|
-
|
2634
|
+
response
|
2635
|
+
|
3232
2636
|
end
|
3233
|
-
def
|
2637
|
+
def reserve_time_slot_participant_id(id,participant_id,opts={})
|
3234
2638
|
query_param_keys = [
|
3235
2639
|
|
3236
2640
|
]
|
3237
2641
|
|
3238
2642
|
form_param_keys = [
|
3239
|
-
:
|
2643
|
+
:cancel_existing,
|
3240
2644
|
|
3241
2645
|
]
|
3242
2646
|
|
3243
2647
|
# verify existence of params
|
3244
|
-
raise "
|
3245
|
-
raise "
|
2648
|
+
raise "id is required" if id.nil?
|
2649
|
+
raise "participant_id is required" if participant_id.nil?
|
3246
2650
|
# set default values and merge with input
|
3247
2651
|
options = underscored_merge_opts(opts,
|
3248
|
-
:
|
3249
|
-
:
|
2652
|
+
:id => id,
|
2653
|
+
:participant_id => participant_id
|
3250
2654
|
)
|
3251
2655
|
|
3252
2656
|
# resource path
|
3253
|
-
path = path_replace("/v1/
|
3254
|
-
:
|
2657
|
+
path = path_replace("/v1/calendar_events/{id}/reservations/{participant_id}",
|
2658
|
+
:id => id,
|
2659
|
+
:participant_id => participant_id)
|
3255
2660
|
headers = nil
|
3256
2661
|
form_params = select_params(options, form_param_keys)
|
3257
2662
|
query_params = select_params(options, query_param_keys)
|
3258
2663
|
if opts[:next_page]
|
3259
|
-
pagination_params = page_params_load(:
|
2664
|
+
pagination_params = page_params_load(:post, path)
|
3260
2665
|
query_params.merge! pagination_params if pagination_params
|
3261
2666
|
end
|
3262
|
-
response = mixed_request(:
|
3263
|
-
page_params_store(:
|
3264
|
-
|
2667
|
+
response = mixed_request(:post, path, query_params, form_params, headers)
|
2668
|
+
page_params_store(:post, path)
|
2669
|
+
response
|
2670
|
+
|
3265
2671
|
end
|
3266
|
-
def
|
2672
|
+
def update_calendar_event(id,calendar_event__context_code__,opts={})
|
3267
2673
|
query_param_keys = [
|
3268
2674
|
|
3269
2675
|
]
|
3270
2676
|
|
3271
2677
|
form_param_keys = [
|
2678
|
+
:calendar_event__context_code__,
|
2679
|
+
:calendar_event__title__,
|
2680
|
+
:calendar_event__description__,
|
2681
|
+
:calendar_event__start_at__,
|
2682
|
+
:calendar_event__end_at__,
|
2683
|
+
:calendar_event__location_name__,
|
2684
|
+
:calendar_event__location_address__,
|
2685
|
+
:calendar_event__time_zone_edited__,
|
2686
|
+
:calendar_event__child_event_data_____x____start_at__,
|
2687
|
+
:calendar_event__child_event_data_____x____end_at__,
|
2688
|
+
:calendar_event__child_event_data_____x____context_code__,
|
3272
2689
|
|
3273
2690
|
]
|
3274
2691
|
|
3275
2692
|
# verify existence of params
|
3276
|
-
raise "
|
2693
|
+
raise "id is required" if id.nil?
|
2694
|
+
raise "calendar_event__context_code__ is required" if calendar_event__context_code__.nil?
|
3277
2695
|
# set default values and merge with input
|
3278
2696
|
options = underscored_merge_opts(opts,
|
3279
|
-
:
|
2697
|
+
:id => id,
|
2698
|
+
:calendar_event__context_code__ => calendar_event__context_code__
|
3280
2699
|
)
|
3281
2700
|
|
3282
2701
|
# resource path
|
3283
|
-
path = path_replace("/v1/
|
3284
|
-
:
|
2702
|
+
path = path_replace("/v1/calendar_events/{id}",
|
2703
|
+
:id => id)
|
3285
2704
|
headers = nil
|
3286
2705
|
form_params = select_params(options, form_param_keys)
|
3287
2706
|
query_params = select_params(options, query_param_keys)
|
3288
2707
|
if opts[:next_page]
|
3289
|
-
pagination_params = page_params_load(:
|
2708
|
+
pagination_params = page_params_load(:put, path)
|
3290
2709
|
query_params.merge! pagination_params if pagination_params
|
3291
2710
|
end
|
3292
|
-
response = mixed_request(:
|
3293
|
-
page_params_store(:
|
3294
|
-
|
2711
|
+
response = mixed_request(:put, path, query_params, form_params, headers)
|
2712
|
+
page_params_store(:put, path)
|
2713
|
+
response
|
2714
|
+
|
3295
2715
|
end
|
3296
|
-
def
|
2716
|
+
def delete_calendar_event(id,opts={})
|
3297
2717
|
query_param_keys = [
|
3298
|
-
|
2718
|
+
:cancel_reason
|
3299
2719
|
]
|
3300
2720
|
|
3301
2721
|
form_param_keys = [
|
@@ -3303,28 +2723,28 @@ module Pandarus
|
|
3303
2723
|
]
|
3304
2724
|
|
3305
2725
|
# verify existence of params
|
3306
|
-
raise "
|
2726
|
+
raise "id is required" if id.nil?
|
3307
2727
|
# set default values and merge with input
|
3308
2728
|
options = underscored_merge_opts(opts,
|
3309
|
-
:
|
2729
|
+
:id => id
|
3310
2730
|
)
|
3311
2731
|
|
3312
2732
|
# resource path
|
3313
|
-
path = path_replace("/v1/
|
3314
|
-
:
|
2733
|
+
path = path_replace("/v1/calendar_events/{id}",
|
2734
|
+
:id => id)
|
3315
2735
|
headers = nil
|
3316
2736
|
form_params = select_params(options, form_param_keys)
|
3317
2737
|
query_params = select_params(options, query_param_keys)
|
3318
2738
|
if opts[:next_page]
|
3319
|
-
pagination_params = page_params_load(:
|
2739
|
+
pagination_params = page_params_load(:delete, path)
|
3320
2740
|
query_params.merge! pagination_params if pagination_params
|
3321
2741
|
end
|
3322
|
-
response = mixed_request(:
|
3323
|
-
page_params_store(:
|
2742
|
+
response = mixed_request(:delete, path, query_params, form_params, headers)
|
2743
|
+
page_params_store(:delete, path)
|
3324
2744
|
response
|
3325
2745
|
|
3326
2746
|
end
|
3327
|
-
def
|
2747
|
+
def list_members_of_collaboration(id,opts={})
|
3328
2748
|
query_param_keys = [
|
3329
2749
|
|
3330
2750
|
]
|
@@ -3334,26 +2754,25 @@ module Pandarus
|
|
3334
2754
|
]
|
3335
2755
|
|
3336
2756
|
# verify existence of params
|
3337
|
-
raise "
|
2757
|
+
raise "id is required" if id.nil?
|
3338
2758
|
# set default values and merge with input
|
3339
2759
|
options = underscored_merge_opts(opts,
|
3340
|
-
:
|
2760
|
+
:id => id
|
3341
2761
|
)
|
3342
2762
|
|
3343
2763
|
# resource path
|
3344
|
-
path = path_replace("/v1/
|
3345
|
-
:
|
2764
|
+
path = path_replace("/v1/collaborations/{id}/members",
|
2765
|
+
:id => id)
|
3346
2766
|
headers = nil
|
3347
2767
|
form_params = select_params(options, form_param_keys)
|
3348
2768
|
query_params = select_params(options, query_param_keys)
|
3349
2769
|
if opts[:next_page]
|
3350
|
-
pagination_params = page_params_load(:
|
2770
|
+
pagination_params = page_params_load(:get, path)
|
3351
2771
|
query_params.merge! pagination_params if pagination_params
|
3352
2772
|
end
|
3353
|
-
response = mixed_request(:
|
3354
|
-
page_params_store(:
|
3355
|
-
response
|
3356
|
-
|
2773
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
2774
|
+
page_params_store(:get, path)
|
2775
|
+
response.map {|response|Collaborator.new(response)}
|
3357
2776
|
end
|
3358
2777
|
def list_of_commmessages_for_user(user_id,opts={})
|
3359
2778
|
query_param_keys = [
|
@@ -3454,7 +2873,7 @@ module Pandarus
|
|
3454
2873
|
page_params_store(:post, path)
|
3455
2874
|
CommunicationChannel.new(response)
|
3456
2875
|
end
|
3457
|
-
def
|
2876
|
+
def delete_communication_channel_id(user_id,id,opts={})
|
3458
2877
|
query_param_keys = [
|
3459
2878
|
|
3460
2879
|
]
|
@@ -3487,7 +2906,7 @@ module Pandarus
|
|
3487
2906
|
page_params_store(:delete, path)
|
3488
2907
|
CommunicationChannel.new(response)
|
3489
2908
|
end
|
3490
|
-
def
|
2909
|
+
def delete_communication_channel_type(user_id,type,address,opts={})
|
3491
2910
|
query_param_keys = [
|
3492
2911
|
|
3493
2912
|
]
|
@@ -4523,6 +3942,7 @@ module Pandarus
|
|
4523
3942
|
:course__self_enrollment__,
|
4524
3943
|
:course__restrict_enrollments_to_course_dates__,
|
4525
3944
|
:course__enroll_me__,
|
3945
|
+
:course__term_id__,
|
4526
3946
|
:course__sis_course_id__,
|
4527
3947
|
:course__hide_final_grades__,
|
4528
3948
|
:course__apply_assignment_group_weights__,
|
@@ -4613,7 +4033,7 @@ module Pandarus
|
|
4613
4033
|
page_params_store(:get, path)
|
4614
4034
|
response.map {|response|User.new(response)}
|
4615
4035
|
end
|
4616
|
-
def
|
4036
|
+
def list_users_in_course_users(course_id,include,opts={})
|
4617
4037
|
query_param_keys = [
|
4618
4038
|
:search_term,
|
4619
4039
|
:enrollment_type,
|
@@ -4649,7 +4069,7 @@ module Pandarus
|
|
4649
4069
|
page_params_store(:get, path)
|
4650
4070
|
response.map {|response|User.new(response)}
|
4651
4071
|
end
|
4652
|
-
def
|
4072
|
+
def list_users_in_course_search_users(course_id,include,opts={})
|
4653
4073
|
query_param_keys = [
|
4654
4074
|
:search_term,
|
4655
4075
|
:enrollment_type,
|
@@ -5052,6 +4472,7 @@ module Pandarus
|
|
5052
4472
|
]
|
5053
4473
|
|
5054
4474
|
form_param_keys = [
|
4475
|
+
:course__grading_standard_id__,
|
5055
4476
|
|
5056
4477
|
]
|
5057
4478
|
|
@@ -5885,6 +5306,108 @@ module Pandarus
|
|
5885
5306
|
page_params_store(:delete, path)
|
5886
5307
|
response
|
5887
5308
|
|
5309
|
+
end
|
5310
|
+
def reorder_pinned_topics_courses(course_id,order,opts={})
|
5311
|
+
query_param_keys = [
|
5312
|
+
|
5313
|
+
]
|
5314
|
+
|
5315
|
+
form_param_keys = [
|
5316
|
+
:order,
|
5317
|
+
|
5318
|
+
]
|
5319
|
+
|
5320
|
+
# verify existence of params
|
5321
|
+
raise "course_id is required" if course_id.nil?
|
5322
|
+
raise "order is required" if order.nil?
|
5323
|
+
# set default values and merge with input
|
5324
|
+
options = underscored_merge_opts(opts,
|
5325
|
+
:course_id => course_id,
|
5326
|
+
:order => order
|
5327
|
+
)
|
5328
|
+
|
5329
|
+
# resource path
|
5330
|
+
path = path_replace("/v1/courses/{course_id}/discussion_topics/reorder",
|
5331
|
+
:course_id => course_id)
|
5332
|
+
headers = nil
|
5333
|
+
form_params = select_params(options, form_param_keys)
|
5334
|
+
query_params = select_params(options, query_param_keys)
|
5335
|
+
if opts[:next_page]
|
5336
|
+
pagination_params = page_params_load(:post, path)
|
5337
|
+
query_params.merge! pagination_params if pagination_params
|
5338
|
+
end
|
5339
|
+
response = mixed_request(:post, path, query_params, form_params, headers)
|
5340
|
+
page_params_store(:post, path)
|
5341
|
+
response
|
5342
|
+
|
5343
|
+
end
|
5344
|
+
def reorder_pinned_topics_groups(group_id,order,opts={})
|
5345
|
+
query_param_keys = [
|
5346
|
+
|
5347
|
+
]
|
5348
|
+
|
5349
|
+
form_param_keys = [
|
5350
|
+
:order,
|
5351
|
+
|
5352
|
+
]
|
5353
|
+
|
5354
|
+
# verify existence of params
|
5355
|
+
raise "group_id is required" if group_id.nil?
|
5356
|
+
raise "order is required" if order.nil?
|
5357
|
+
# set default values and merge with input
|
5358
|
+
options = underscored_merge_opts(opts,
|
5359
|
+
:group_id => group_id,
|
5360
|
+
:order => order
|
5361
|
+
)
|
5362
|
+
|
5363
|
+
# resource path
|
5364
|
+
path = path_replace("/v1/groups/{group_id}/discussion_topics/reorder",
|
5365
|
+
:group_id => group_id)
|
5366
|
+
headers = nil
|
5367
|
+
form_params = select_params(options, form_param_keys)
|
5368
|
+
query_params = select_params(options, query_param_keys)
|
5369
|
+
if opts[:next_page]
|
5370
|
+
pagination_params = page_params_load(:post, path)
|
5371
|
+
query_params.merge! pagination_params if pagination_params
|
5372
|
+
end
|
5373
|
+
response = mixed_request(:post, path, query_params, form_params, headers)
|
5374
|
+
page_params_store(:post, path)
|
5375
|
+
response
|
5376
|
+
|
5377
|
+
end
|
5378
|
+
def reorder_pinned_topics_collection_items(collection_item_id,order,opts={})
|
5379
|
+
query_param_keys = [
|
5380
|
+
|
5381
|
+
]
|
5382
|
+
|
5383
|
+
form_param_keys = [
|
5384
|
+
:order,
|
5385
|
+
|
5386
|
+
]
|
5387
|
+
|
5388
|
+
# verify existence of params
|
5389
|
+
raise "collection_item_id is required" if collection_item_id.nil?
|
5390
|
+
raise "order is required" if order.nil?
|
5391
|
+
# set default values and merge with input
|
5392
|
+
options = underscored_merge_opts(opts,
|
5393
|
+
:collection_item_id => collection_item_id,
|
5394
|
+
:order => order
|
5395
|
+
)
|
5396
|
+
|
5397
|
+
# resource path
|
5398
|
+
path = path_replace("/v1/collection_items/{collection_item_id}/discussion_topics/reorder",
|
5399
|
+
:collection_item_id => collection_item_id)
|
5400
|
+
headers = nil
|
5401
|
+
form_params = select_params(options, form_param_keys)
|
5402
|
+
query_params = select_params(options, query_param_keys)
|
5403
|
+
if opts[:next_page]
|
5404
|
+
pagination_params = page_params_load(:post, path)
|
5405
|
+
query_params.merge! pagination_params if pagination_params
|
5406
|
+
end
|
5407
|
+
response = mixed_request(:post, path, query_params, form_params, headers)
|
5408
|
+
page_params_store(:post, path)
|
5409
|
+
response
|
5410
|
+
|
5888
5411
|
end
|
5889
5412
|
def update_entry_courses(course_id,topic_id,id,message,opts={})
|
5890
5413
|
query_param_keys = [
|
@@ -7685,9 +7208,43 @@ module Pandarus
|
|
7685
7208
|
response
|
7686
7209
|
|
7687
7210
|
end
|
7688
|
-
def unsubscribe_from_topic_collection_items(collection_item_id,topic_id,opts={})
|
7211
|
+
def unsubscribe_from_topic_collection_items(collection_item_id,topic_id,opts={})
|
7212
|
+
query_param_keys = [
|
7213
|
+
|
7214
|
+
]
|
7215
|
+
|
7216
|
+
form_param_keys = [
|
7217
|
+
|
7218
|
+
]
|
7219
|
+
|
7220
|
+
# verify existence of params
|
7221
|
+
raise "collection_item_id is required" if collection_item_id.nil?
|
7222
|
+
raise "topic_id is required" if topic_id.nil?
|
7223
|
+
# set default values and merge with input
|
7224
|
+
options = underscored_merge_opts(opts,
|
7225
|
+
:collection_item_id => collection_item_id,
|
7226
|
+
:topic_id => topic_id
|
7227
|
+
)
|
7228
|
+
|
7229
|
+
# resource path
|
7230
|
+
path = path_replace("/v1/collection_items/{collection_item_id}/discussion_topics/{topic_id}/subscribed",
|
7231
|
+
:collection_item_id => collection_item_id,
|
7232
|
+
:topic_id => topic_id)
|
7233
|
+
headers = nil
|
7234
|
+
form_params = select_params(options, form_param_keys)
|
7235
|
+
query_params = select_params(options, query_param_keys)
|
7236
|
+
if opts[:next_page]
|
7237
|
+
pagination_params = page_params_load(:delete, path)
|
7238
|
+
query_params.merge! pagination_params if pagination_params
|
7239
|
+
end
|
7240
|
+
response = mixed_request(:delete, path, query_params, form_params, headers)
|
7241
|
+
page_params_store(:delete, path)
|
7242
|
+
response
|
7243
|
+
|
7244
|
+
end
|
7245
|
+
def list_enrollment_terms(account_id,opts={})
|
7689
7246
|
query_param_keys = [
|
7690
|
-
|
7247
|
+
:workflow_state
|
7691
7248
|
]
|
7692
7249
|
|
7693
7250
|
form_param_keys = [
|
@@ -7695,29 +7252,25 @@ module Pandarus
|
|
7695
7252
|
]
|
7696
7253
|
|
7697
7254
|
# verify existence of params
|
7698
|
-
raise "
|
7699
|
-
raise "topic_id is required" if topic_id.nil?
|
7255
|
+
raise "account_id is required" if account_id.nil?
|
7700
7256
|
# set default values and merge with input
|
7701
7257
|
options = underscored_merge_opts(opts,
|
7702
|
-
:
|
7703
|
-
:topic_id => topic_id
|
7258
|
+
:account_id => account_id
|
7704
7259
|
)
|
7705
7260
|
|
7706
7261
|
# resource path
|
7707
|
-
path = path_replace("/v1/
|
7708
|
-
:
|
7709
|
-
:topic_id => topic_id)
|
7262
|
+
path = path_replace("/v1/accounts/{account_id}/terms",
|
7263
|
+
:account_id => account_id)
|
7710
7264
|
headers = nil
|
7711
7265
|
form_params = select_params(options, form_param_keys)
|
7712
7266
|
query_params = select_params(options, query_param_keys)
|
7713
7267
|
if opts[:next_page]
|
7714
|
-
pagination_params = page_params_load(:
|
7268
|
+
pagination_params = page_params_load(:get, path)
|
7715
7269
|
query_params.merge! pagination_params if pagination_params
|
7716
7270
|
end
|
7717
|
-
response = mixed_request(:
|
7718
|
-
page_params_store(:
|
7719
|
-
response
|
7720
|
-
|
7271
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
7272
|
+
page_params_store(:get, path)
|
7273
|
+
response.map {|response|EnrollmentTerm.new(response)}
|
7721
7274
|
end
|
7722
7275
|
def list_enrollments_courses(course_id,type,role,state,opts={})
|
7723
7276
|
query_param_keys = [
|
@@ -9037,6 +8590,99 @@ module Pandarus
|
|
9037
8590
|
page_params_store(:delete, path)
|
9038
8591
|
FeatureFlag.new(response)
|
9039
8592
|
end
|
8593
|
+
def get_quota_information_courses(course_id,opts={})
|
8594
|
+
query_param_keys = [
|
8595
|
+
|
8596
|
+
]
|
8597
|
+
|
8598
|
+
form_param_keys = [
|
8599
|
+
|
8600
|
+
]
|
8601
|
+
|
8602
|
+
# verify existence of params
|
8603
|
+
raise "course_id is required" if course_id.nil?
|
8604
|
+
# set default values and merge with input
|
8605
|
+
options = underscored_merge_opts(opts,
|
8606
|
+
:course_id => course_id
|
8607
|
+
)
|
8608
|
+
|
8609
|
+
# resource path
|
8610
|
+
path = path_replace("/v1/courses/{course_id}/files/quota",
|
8611
|
+
:course_id => course_id)
|
8612
|
+
headers = nil
|
8613
|
+
form_params = select_params(options, form_param_keys)
|
8614
|
+
query_params = select_params(options, query_param_keys)
|
8615
|
+
if opts[:next_page]
|
8616
|
+
pagination_params = page_params_load(:get, path)
|
8617
|
+
query_params.merge! pagination_params if pagination_params
|
8618
|
+
end
|
8619
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
8620
|
+
page_params_store(:get, path)
|
8621
|
+
response
|
8622
|
+
|
8623
|
+
end
|
8624
|
+
def get_quota_information_groups(group_id,opts={})
|
8625
|
+
query_param_keys = [
|
8626
|
+
|
8627
|
+
]
|
8628
|
+
|
8629
|
+
form_param_keys = [
|
8630
|
+
|
8631
|
+
]
|
8632
|
+
|
8633
|
+
# verify existence of params
|
8634
|
+
raise "group_id is required" if group_id.nil?
|
8635
|
+
# set default values and merge with input
|
8636
|
+
options = underscored_merge_opts(opts,
|
8637
|
+
:group_id => group_id
|
8638
|
+
)
|
8639
|
+
|
8640
|
+
# resource path
|
8641
|
+
path = path_replace("/v1/groups/{group_id}/files/quota",
|
8642
|
+
:group_id => group_id)
|
8643
|
+
headers = nil
|
8644
|
+
form_params = select_params(options, form_param_keys)
|
8645
|
+
query_params = select_params(options, query_param_keys)
|
8646
|
+
if opts[:next_page]
|
8647
|
+
pagination_params = page_params_load(:get, path)
|
8648
|
+
query_params.merge! pagination_params if pagination_params
|
8649
|
+
end
|
8650
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
8651
|
+
page_params_store(:get, path)
|
8652
|
+
response
|
8653
|
+
|
8654
|
+
end
|
8655
|
+
def get_quota_information_users(user_id,opts={})
|
8656
|
+
query_param_keys = [
|
8657
|
+
|
8658
|
+
]
|
8659
|
+
|
8660
|
+
form_param_keys = [
|
8661
|
+
|
8662
|
+
]
|
8663
|
+
|
8664
|
+
# verify existence of params
|
8665
|
+
raise "user_id is required" if user_id.nil?
|
8666
|
+
# set default values and merge with input
|
8667
|
+
options = underscored_merge_opts(opts,
|
8668
|
+
:user_id => user_id
|
8669
|
+
)
|
8670
|
+
|
8671
|
+
# resource path
|
8672
|
+
path = path_replace("/v1/users/{user_id}/files/quota",
|
8673
|
+
:user_id => user_id)
|
8674
|
+
headers = nil
|
8675
|
+
form_params = select_params(options, form_param_keys)
|
8676
|
+
query_params = select_params(options, query_param_keys)
|
8677
|
+
if opts[:next_page]
|
8678
|
+
pagination_params = page_params_load(:get, path)
|
8679
|
+
query_params.merge! pagination_params if pagination_params
|
8680
|
+
end
|
8681
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
8682
|
+
page_params_store(:get, path)
|
8683
|
+
response
|
8684
|
+
|
8685
|
+
end
|
9040
8686
|
def list_files_courses(course_id,opts={})
|
9041
8687
|
query_param_keys = [
|
9042
8688
|
:content_types,
|
@@ -9956,6 +9602,84 @@ module Pandarus
|
|
9956
9602
|
page_params_store(:get, path)
|
9957
9603
|
response.map {|response|SubmissionVersion.new(response)}
|
9958
9604
|
end
|
9605
|
+
def create_new_grading_standard_accounts(account_id,title,grading_scheme_entry__name__,grading_scheme_entry__value__,opts={})
|
9606
|
+
query_param_keys = [
|
9607
|
+
|
9608
|
+
]
|
9609
|
+
|
9610
|
+
form_param_keys = [
|
9611
|
+
:title,
|
9612
|
+
:grading_scheme_entry__name__,
|
9613
|
+
:grading_scheme_entry__value__,
|
9614
|
+
|
9615
|
+
]
|
9616
|
+
|
9617
|
+
# verify existence of params
|
9618
|
+
raise "account_id is required" if account_id.nil?
|
9619
|
+
raise "title is required" if title.nil?
|
9620
|
+
raise "grading_scheme_entry__name__ is required" if grading_scheme_entry__name__.nil?
|
9621
|
+
raise "grading_scheme_entry__value__ is required" if grading_scheme_entry__value__.nil?
|
9622
|
+
# set default values and merge with input
|
9623
|
+
options = underscored_merge_opts(opts,
|
9624
|
+
:account_id => account_id,
|
9625
|
+
:title => title,
|
9626
|
+
:grading_scheme_entry__name__ => grading_scheme_entry__name__,
|
9627
|
+
:grading_scheme_entry__value__ => grading_scheme_entry__value__
|
9628
|
+
)
|
9629
|
+
|
9630
|
+
# resource path
|
9631
|
+
path = path_replace("/v1/accounts/{account_id}/grading_standards",
|
9632
|
+
:account_id => account_id)
|
9633
|
+
headers = nil
|
9634
|
+
form_params = select_params(options, form_param_keys)
|
9635
|
+
query_params = select_params(options, query_param_keys)
|
9636
|
+
if opts[:next_page]
|
9637
|
+
pagination_params = page_params_load(:post, path)
|
9638
|
+
query_params.merge! pagination_params if pagination_params
|
9639
|
+
end
|
9640
|
+
response = mixed_request(:post, path, query_params, form_params, headers)
|
9641
|
+
page_params_store(:post, path)
|
9642
|
+
GradingStandard.new(response)
|
9643
|
+
end
|
9644
|
+
def create_new_grading_standard_courses(course_id,title,grading_scheme_entry__name__,grading_scheme_entry__value__,opts={})
|
9645
|
+
query_param_keys = [
|
9646
|
+
|
9647
|
+
]
|
9648
|
+
|
9649
|
+
form_param_keys = [
|
9650
|
+
:title,
|
9651
|
+
:grading_scheme_entry__name__,
|
9652
|
+
:grading_scheme_entry__value__,
|
9653
|
+
|
9654
|
+
]
|
9655
|
+
|
9656
|
+
# verify existence of params
|
9657
|
+
raise "course_id is required" if course_id.nil?
|
9658
|
+
raise "title is required" if title.nil?
|
9659
|
+
raise "grading_scheme_entry__name__ is required" if grading_scheme_entry__name__.nil?
|
9660
|
+
raise "grading_scheme_entry__value__ is required" if grading_scheme_entry__value__.nil?
|
9661
|
+
# set default values and merge with input
|
9662
|
+
options = underscored_merge_opts(opts,
|
9663
|
+
:course_id => course_id,
|
9664
|
+
:title => title,
|
9665
|
+
:grading_scheme_entry__name__ => grading_scheme_entry__name__,
|
9666
|
+
:grading_scheme_entry__value__ => grading_scheme_entry__value__
|
9667
|
+
)
|
9668
|
+
|
9669
|
+
# resource path
|
9670
|
+
path = path_replace("/v1/courses/{course_id}/grading_standards",
|
9671
|
+
:course_id => course_id)
|
9672
|
+
headers = nil
|
9673
|
+
form_params = select_params(options, form_param_keys)
|
9674
|
+
query_params = select_params(options, query_param_keys)
|
9675
|
+
if opts[:next_page]
|
9676
|
+
pagination_params = page_params_load(:post, path)
|
9677
|
+
query_params.merge! pagination_params if pagination_params
|
9678
|
+
end
|
9679
|
+
response = mixed_request(:post, path, query_params, form_params, headers)
|
9680
|
+
page_params_store(:post, path)
|
9681
|
+
GradingStandard.new(response)
|
9682
|
+
end
|
9959
9683
|
def list_group_categories_for_context_accounts(account_id,opts={})
|
9960
9684
|
query_param_keys = [
|
9961
9685
|
|
@@ -10567,68 +10291,6 @@ module Pandarus
|
|
10567
10291
|
page_params_store(:delete, path)
|
10568
10292
|
Group.new(response)
|
10569
10293
|
end
|
10570
|
-
def follow_group(group_id,opts={})
|
10571
|
-
query_param_keys = [
|
10572
|
-
|
10573
|
-
]
|
10574
|
-
|
10575
|
-
form_param_keys = [
|
10576
|
-
|
10577
|
-
]
|
10578
|
-
|
10579
|
-
# verify existence of params
|
10580
|
-
raise "group_id is required" if group_id.nil?
|
10581
|
-
# set default values and merge with input
|
10582
|
-
options = underscored_merge_opts(opts,
|
10583
|
-
:group_id => group_id
|
10584
|
-
)
|
10585
|
-
|
10586
|
-
# resource path
|
10587
|
-
path = path_replace("/v1/groups/{group_id}/followers/self",
|
10588
|
-
:group_id => group_id)
|
10589
|
-
headers = nil
|
10590
|
-
form_params = select_params(options, form_param_keys)
|
10591
|
-
query_params = select_params(options, query_param_keys)
|
10592
|
-
if opts[:next_page]
|
10593
|
-
pagination_params = page_params_load(:put, path)
|
10594
|
-
query_params.merge! pagination_params if pagination_params
|
10595
|
-
end
|
10596
|
-
response = mixed_request(:put, path, query_params, form_params, headers)
|
10597
|
-
page_params_store(:put, path)
|
10598
|
-
response
|
10599
|
-
|
10600
|
-
end
|
10601
|
-
def un_follow_group(group_id,opts={})
|
10602
|
-
query_param_keys = [
|
10603
|
-
|
10604
|
-
]
|
10605
|
-
|
10606
|
-
form_param_keys = [
|
10607
|
-
|
10608
|
-
]
|
10609
|
-
|
10610
|
-
# verify existence of params
|
10611
|
-
raise "group_id is required" if group_id.nil?
|
10612
|
-
# set default values and merge with input
|
10613
|
-
options = underscored_merge_opts(opts,
|
10614
|
-
:group_id => group_id
|
10615
|
-
)
|
10616
|
-
|
10617
|
-
# resource path
|
10618
|
-
path = path_replace("/v1/groups/{group_id}/followers/self",
|
10619
|
-
:group_id => group_id)
|
10620
|
-
headers = nil
|
10621
|
-
form_params = select_params(options, form_param_keys)
|
10622
|
-
query_params = select_params(options, query_param_keys)
|
10623
|
-
if opts[:next_page]
|
10624
|
-
pagination_params = page_params_load(:delete, path)
|
10625
|
-
query_params.merge! pagination_params if pagination_params
|
10626
|
-
end
|
10627
|
-
response = mixed_request(:delete, path, query_params, form_params, headers)
|
10628
|
-
page_params_store(:delete, path)
|
10629
|
-
response
|
10630
|
-
|
10631
|
-
end
|
10632
10294
|
def invite_others_to_group(group_id,invitees,opts={})
|
10633
10295
|
query_param_keys = [
|
10634
10296
|
|
@@ -10820,7 +10482,7 @@ module Pandarus
|
|
10820
10482
|
response
|
10821
10483
|
|
10822
10484
|
end
|
10823
|
-
def
|
10485
|
+
def list_group_memberships_memberships(group_id,opts={})
|
10824
10486
|
query_param_keys = [
|
10825
10487
|
:filter_states
|
10826
10488
|
]
|
@@ -10850,7 +10512,7 @@ module Pandarus
|
|
10850
10512
|
page_params_store(:get, path)
|
10851
10513
|
response.map {|response|GroupMembership.new(response)}
|
10852
10514
|
end
|
10853
|
-
def
|
10515
|
+
def list_group_memberships_users(group_id,opts={})
|
10854
10516
|
query_param_keys = [
|
10855
10517
|
:filter_states
|
10856
10518
|
]
|
@@ -10913,7 +10575,7 @@ module Pandarus
|
|
10913
10575
|
page_params_store(:post, path)
|
10914
10576
|
GroupMembership.new(response)
|
10915
10577
|
end
|
10916
|
-
def
|
10578
|
+
def update_membership_memberships(group_id,membership_id,moderator,opts={})
|
10917
10579
|
query_param_keys = [
|
10918
10580
|
|
10919
10581
|
]
|
@@ -10950,7 +10612,7 @@ module Pandarus
|
|
10950
10612
|
page_params_store(:put, path)
|
10951
10613
|
GroupMembership.new(response)
|
10952
10614
|
end
|
10953
|
-
def
|
10615
|
+
def update_membership_users(group_id,user_id,moderator,opts={})
|
10954
10616
|
query_param_keys = [
|
10955
10617
|
|
10956
10618
|
]
|
@@ -10987,7 +10649,7 @@ module Pandarus
|
|
10987
10649
|
page_params_store(:put, path)
|
10988
10650
|
GroupMembership.new(response)
|
10989
10651
|
end
|
10990
|
-
def
|
10652
|
+
def leave_group_memberships(group_id,membership_id,opts={})
|
10991
10653
|
query_param_keys = [
|
10992
10654
|
|
10993
10655
|
]
|
@@ -11021,7 +10683,7 @@ module Pandarus
|
|
11021
10683
|
response
|
11022
10684
|
|
11023
10685
|
end
|
11024
|
-
def
|
10686
|
+
def leave_group_users(group_id,user_id,opts={})
|
11025
10687
|
query_param_keys = [
|
11026
10688
|
|
11027
10689
|
]
|
@@ -11669,7 +11331,7 @@ module Pandarus
|
|
11669
11331
|
page_params_store(:get, path)
|
11670
11332
|
ModuleItemSequence.new(response)
|
11671
11333
|
end
|
11672
|
-
def
|
11334
|
+
def list_preferences_communication_channel_id(user_id,communication_channel_id,opts={})
|
11673
11335
|
query_param_keys = [
|
11674
11336
|
|
11675
11337
|
]
|
@@ -11702,7 +11364,7 @@ module Pandarus
|
|
11702
11364
|
page_params_store(:get, path)
|
11703
11365
|
response.map {|response|NotificationPreference.new(response)}
|
11704
11366
|
end
|
11705
|
-
def
|
11367
|
+
def list_preferences_type(user_id,type,address,opts={})
|
11706
11368
|
query_param_keys = [
|
11707
11369
|
|
11708
11370
|
]
|
@@ -11738,7 +11400,7 @@ module Pandarus
|
|
11738
11400
|
page_params_store(:get, path)
|
11739
11401
|
response.map {|response|NotificationPreference.new(response)}
|
11740
11402
|
end
|
11741
|
-
def
|
11403
|
+
def get_preference_communication_channel_id(user_id,communication_channel_id,notification,opts={})
|
11742
11404
|
query_param_keys = [
|
11743
11405
|
|
11744
11406
|
]
|
@@ -11774,7 +11436,7 @@ module Pandarus
|
|
11774
11436
|
page_params_store(:get, path)
|
11775
11437
|
NotificationPreference.new(response)
|
11776
11438
|
end
|
11777
|
-
def
|
11439
|
+
def get_preference_type(user_id,type,address,notification,opts={})
|
11778
11440
|
query_param_keys = [
|
11779
11441
|
|
11780
11442
|
]
|
@@ -11813,7 +11475,7 @@ module Pandarus
|
|
11813
11475
|
page_params_store(:get, path)
|
11814
11476
|
NotificationPreference.new(response)
|
11815
11477
|
end
|
11816
|
-
def
|
11478
|
+
def update_preference_communication_channel_id(communication_channel_id,notification,notification_preferences__frequency__,opts={})
|
11817
11479
|
query_param_keys = [
|
11818
11480
|
|
11819
11481
|
]
|
@@ -11850,7 +11512,7 @@ module Pandarus
|
|
11850
11512
|
response
|
11851
11513
|
|
11852
11514
|
end
|
11853
|
-
def
|
11515
|
+
def update_preference_type(type,address,notification,notification_preferences__frequency__,opts={})
|
11854
11516
|
query_param_keys = [
|
11855
11517
|
|
11856
11518
|
]
|
@@ -11890,7 +11552,7 @@ module Pandarus
|
|
11890
11552
|
response
|
11891
11553
|
|
11892
11554
|
end
|
11893
|
-
def
|
11555
|
+
def update_multiple_preferences_communication_channel_id(communication_channel_id,notification_preferences____x_____frequency__,opts={})
|
11894
11556
|
query_param_keys = [
|
11895
11557
|
|
11896
11558
|
]
|
@@ -11924,7 +11586,7 @@ module Pandarus
|
|
11924
11586
|
response
|
11925
11587
|
|
11926
11588
|
end
|
11927
|
-
def
|
11589
|
+
def update_multiple_preferences_type(type,address,notification_preferences____x_____frequency__,opts={})
|
11928
11590
|
query_param_keys = [
|
11929
11591
|
|
11930
11592
|
]
|
@@ -12606,7 +12268,7 @@ module Pandarus
|
|
12606
12268
|
page_params_store(:post, path)
|
12607
12269
|
OutcomeLink.new(response)
|
12608
12270
|
end
|
12609
|
-
def
|
12271
|
+
def create_link_outcome_global_outcome_id(id,outcome_id,opts={})
|
12610
12272
|
query_param_keys = [
|
12611
12273
|
|
12612
12274
|
]
|
@@ -12685,7 +12347,7 @@ module Pandarus
|
|
12685
12347
|
page_params_store(:post, path)
|
12686
12348
|
OutcomeLink.new(response)
|
12687
12349
|
end
|
12688
|
-
def
|
12350
|
+
def create_link_outcome_accounts_outcome_id(account_id,id,outcome_id,opts={})
|
12689
12351
|
query_param_keys = [
|
12690
12352
|
|
12691
12353
|
]
|
@@ -12767,7 +12429,7 @@ module Pandarus
|
|
12767
12429
|
page_params_store(:post, path)
|
12768
12430
|
OutcomeLink.new(response)
|
12769
12431
|
end
|
12770
|
-
def
|
12432
|
+
def create_link_outcome_courses_outcome_id(course_id,id,outcome_id,opts={})
|
12771
12433
|
query_param_keys = [
|
12772
12434
|
|
12773
12435
|
]
|
@@ -13212,19 +12874,52 @@ module Pandarus
|
|
13212
12874
|
)
|
13213
12875
|
|
13214
12876
|
# resource path
|
13215
|
-
path = path_replace("/v1/courses/{course_id}/outcome_groups/{id}/import",
|
13216
|
-
:course_id => course_id,
|
13217
|
-
:id => id)
|
12877
|
+
path = path_replace("/v1/courses/{course_id}/outcome_groups/{id}/import",
|
12878
|
+
:course_id => course_id,
|
12879
|
+
:id => id)
|
12880
|
+
headers = nil
|
12881
|
+
form_params = select_params(options, form_param_keys)
|
12882
|
+
query_params = select_params(options, query_param_keys)
|
12883
|
+
if opts[:next_page]
|
12884
|
+
pagination_params = page_params_load(:post, path)
|
12885
|
+
query_params.merge! pagination_params if pagination_params
|
12886
|
+
end
|
12887
|
+
response = mixed_request(:post, path, query_params, form_params, headers)
|
12888
|
+
page_params_store(:post, path)
|
12889
|
+
OutcomeGroup.new(response)
|
12890
|
+
end
|
12891
|
+
def get_outcome_results(course_id,opts={})
|
12892
|
+
query_param_keys = [
|
12893
|
+
:user_ids,
|
12894
|
+
:outcome_ids,
|
12895
|
+
:include
|
12896
|
+
]
|
12897
|
+
|
12898
|
+
form_param_keys = [
|
12899
|
+
|
12900
|
+
]
|
12901
|
+
|
12902
|
+
# verify existence of params
|
12903
|
+
raise "course_id is required" if course_id.nil?
|
12904
|
+
# set default values and merge with input
|
12905
|
+
options = underscored_merge_opts(opts,
|
12906
|
+
:course_id => course_id
|
12907
|
+
)
|
12908
|
+
|
12909
|
+
# resource path
|
12910
|
+
path = path_replace("/v1/courses/{course_id}/outcome_results",
|
12911
|
+
:course_id => course_id)
|
13218
12912
|
headers = nil
|
13219
12913
|
form_params = select_params(options, form_param_keys)
|
13220
12914
|
query_params = select_params(options, query_param_keys)
|
13221
12915
|
if opts[:next_page]
|
13222
|
-
pagination_params = page_params_load(:
|
12916
|
+
pagination_params = page_params_load(:get, path)
|
13223
12917
|
query_params.merge! pagination_params if pagination_params
|
13224
12918
|
end
|
13225
|
-
response = mixed_request(:
|
13226
|
-
page_params_store(:
|
13227
|
-
|
12919
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
12920
|
+
page_params_store(:get, path)
|
12921
|
+
response
|
12922
|
+
|
13228
12923
|
end
|
13229
12924
|
def get_outcome_result_rollups(course_id,opts={})
|
13230
12925
|
query_param_keys = [
|
@@ -13912,7 +13607,7 @@ module Pandarus
|
|
13912
13607
|
page_params_store(:get, path)
|
13913
13608
|
response.map {|response|PageRevision.new(response)}
|
13914
13609
|
end
|
13915
|
-
def
|
13610
|
+
def show_revision_courses_latest(course_id,url,opts={})
|
13916
13611
|
query_param_keys = [
|
13917
13612
|
:summary
|
13918
13613
|
]
|
@@ -13945,7 +13640,7 @@ module Pandarus
|
|
13945
13640
|
page_params_store(:get, path)
|
13946
13641
|
PageRevision.new(response)
|
13947
13642
|
end
|
13948
|
-
def
|
13643
|
+
def show_revision_groups_latest(group_id,url,opts={})
|
13949
13644
|
query_param_keys = [
|
13950
13645
|
:summary
|
13951
13646
|
]
|
@@ -13978,7 +13673,7 @@ module Pandarus
|
|
13978
13673
|
page_params_store(:get, path)
|
13979
13674
|
PageRevision.new(response)
|
13980
13675
|
end
|
13981
|
-
def
|
13676
|
+
def show_revision_courses_revision_id(course_id,url,revision_id,opts={})
|
13982
13677
|
query_param_keys = [
|
13983
13678
|
:summary
|
13984
13679
|
]
|
@@ -14014,7 +13709,7 @@ module Pandarus
|
|
14014
13709
|
page_params_store(:get, path)
|
14015
13710
|
PageRevision.new(response)
|
14016
13711
|
end
|
14017
|
-
def
|
13712
|
+
def show_revision_groups_revision_id(group_id,url,revision_id,opts={})
|
14018
13713
|
query_param_keys = [
|
14019
13714
|
:summary
|
14020
13715
|
]
|
@@ -14344,6 +14039,39 @@ module Pandarus
|
|
14344
14039
|
response
|
14345
14040
|
|
14346
14041
|
end
|
14042
|
+
def retrieve_all_quiz_reports(course_id,quiz_id,opts={})
|
14043
|
+
query_param_keys = [
|
14044
|
+
:includes_all_versions
|
14045
|
+
]
|
14046
|
+
|
14047
|
+
form_param_keys = [
|
14048
|
+
|
14049
|
+
]
|
14050
|
+
|
14051
|
+
# verify existence of params
|
14052
|
+
raise "course_id is required" if course_id.nil?
|
14053
|
+
raise "quiz_id is required" if quiz_id.nil?
|
14054
|
+
# set default values and merge with input
|
14055
|
+
options = underscored_merge_opts(opts,
|
14056
|
+
:course_id => course_id,
|
14057
|
+
:quiz_id => quiz_id
|
14058
|
+
)
|
14059
|
+
|
14060
|
+
# resource path
|
14061
|
+
path = path_replace("/v1/courses/{course_id}/quizzes/{quiz_id}/reports",
|
14062
|
+
:course_id => course_id,
|
14063
|
+
:quiz_id => quiz_id)
|
14064
|
+
headers = nil
|
14065
|
+
form_params = select_params(options, form_param_keys)
|
14066
|
+
query_params = select_params(options, query_param_keys)
|
14067
|
+
if opts[:next_page]
|
14068
|
+
pagination_params = page_params_load(:get, path)
|
14069
|
+
query_params.merge! pagination_params if pagination_params
|
14070
|
+
end
|
14071
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
14072
|
+
page_params_store(:get, path)
|
14073
|
+
response.map {|response| QuizReport .new(response)}
|
14074
|
+
end
|
14347
14075
|
def create_quiz_report(course_id,quiz_id,quiz_report__report_type__,opts={})
|
14348
14076
|
query_param_keys = [
|
14349
14077
|
|
@@ -14352,6 +14080,7 @@ module Pandarus
|
|
14352
14080
|
form_param_keys = [
|
14353
14081
|
:quiz_report__report_type__,
|
14354
14082
|
:quiz_report__includes_all_versions__,
|
14083
|
+
:include,
|
14355
14084
|
|
14356
14085
|
]
|
14357
14086
|
|
@@ -14383,7 +14112,7 @@ module Pandarus
|
|
14383
14112
|
end
|
14384
14113
|
def get_quiz_report(course_id,quiz_id,id,opts={})
|
14385
14114
|
query_param_keys = [
|
14386
|
-
|
14115
|
+
:include
|
14387
14116
|
]
|
14388
14117
|
|
14389
14118
|
form_param_keys = [
|
@@ -14417,6 +14146,42 @@ module Pandarus
|
|
14417
14146
|
page_params_store(:get, path)
|
14418
14147
|
QuizReport.new(response)
|
14419
14148
|
end
|
14149
|
+
def fetching_the_latest_quiz_statistics(course_id,quiz_id,all_versions,opts={})
|
14150
|
+
query_param_keys = [
|
14151
|
+
:all_versions
|
14152
|
+
]
|
14153
|
+
|
14154
|
+
form_param_keys = [
|
14155
|
+
|
14156
|
+
]
|
14157
|
+
|
14158
|
+
# verify existence of params
|
14159
|
+
raise "course_id is required" if course_id.nil?
|
14160
|
+
raise "quiz_id is required" if quiz_id.nil?
|
14161
|
+
raise "all_versions is required" if all_versions.nil?
|
14162
|
+
# set default values and merge with input
|
14163
|
+
options = underscored_merge_opts(opts,
|
14164
|
+
:course_id => course_id,
|
14165
|
+
:quiz_id => quiz_id,
|
14166
|
+
:all_versions => all_versions
|
14167
|
+
)
|
14168
|
+
|
14169
|
+
# resource path
|
14170
|
+
path = path_replace("/v1/courses/{course_id}/quizzes/{quiz_id}/statistics",
|
14171
|
+
:course_id => course_id,
|
14172
|
+
:quiz_id => quiz_id)
|
14173
|
+
headers = nil
|
14174
|
+
form_params = select_params(options, form_param_keys)
|
14175
|
+
query_params = select_params(options, query_param_keys)
|
14176
|
+
if opts[:next_page]
|
14177
|
+
pagination_params = page_params_load(:get, path)
|
14178
|
+
query_params.merge! pagination_params if pagination_params
|
14179
|
+
end
|
14180
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
14181
|
+
page_params_store(:get, path)
|
14182
|
+
response
|
14183
|
+
|
14184
|
+
end
|
14420
14185
|
def upload_file(course_id,quiz_id,name,on_duplicate,opts={})
|
14421
14186
|
query_param_keys = [
|
14422
14187
|
|
@@ -16714,7 +16479,7 @@ module Pandarus
|
|
16714
16479
|
page_params_store(:get, path)
|
16715
16480
|
response.map {|response|User.new(response)}
|
16716
16481
|
end
|
16717
|
-
def
|
16482
|
+
def list_the_activity_stream_self(opts={})
|
16718
16483
|
query_param_keys = [
|
16719
16484
|
|
16720
16485
|
]
|
@@ -16744,7 +16509,7 @@ module Pandarus
|
|
16744
16509
|
response
|
16745
16510
|
|
16746
16511
|
end
|
16747
|
-
def
|
16512
|
+
def list_the_activity_stream_activity_stream(opts={})
|
16748
16513
|
query_param_keys = [
|
16749
16514
|
|
16750
16515
|
]
|
@@ -16975,6 +16740,7 @@ module Pandarus
|
|
16975
16740
|
:pseudonym__send_confirmation__,
|
16976
16741
|
:communication_channel__type__,
|
16977
16742
|
:communication_channel__address__,
|
16743
|
+
:skip_confirmation,
|
16978
16744
|
|
16979
16745
|
]
|
16980
16746
|
|
@@ -17001,7 +16767,7 @@ module Pandarus
|
|
17001
16767
|
page_params_store(:post, path)
|
17002
16768
|
User.new(response)
|
17003
16769
|
end
|
17004
|
-
def
|
16770
|
+
def update_user_settings(id,manual_mark_as_read,opts={})
|
17005
16771
|
query_param_keys = [
|
17006
16772
|
:manual_mark_as_read
|
17007
16773
|
]
|
@@ -17033,40 +16799,6 @@ module Pandarus
|
|
17033
16799
|
page_params_store(:get, path)
|
17034
16800
|
response
|
17035
16801
|
|
17036
|
-
end
|
17037
|
-
def update_user_settings_users(id,manual_mark_as_read,opts={})
|
17038
|
-
query_param_keys = [
|
17039
|
-
|
17040
|
-
]
|
17041
|
-
|
17042
|
-
form_param_keys = [
|
17043
|
-
:manual_mark_as_read,
|
17044
|
-
|
17045
|
-
]
|
17046
|
-
|
17047
|
-
# verify existence of params
|
17048
|
-
raise "id is required" if id.nil?
|
17049
|
-
raise "manual_mark_as_read is required" if manual_mark_as_read.nil?
|
17050
|
-
# set default values and merge with input
|
17051
|
-
options = underscored_merge_opts(opts,
|
17052
|
-
:id => id,
|
17053
|
-
:manual_mark_as_read => manual_mark_as_read
|
17054
|
-
)
|
17055
|
-
|
17056
|
-
# resource path
|
17057
|
-
path = path_replace("/v1/users/{id}/settings",
|
17058
|
-
:id => id)
|
17059
|
-
headers = nil
|
17060
|
-
form_params = select_params(options, form_param_keys)
|
17061
|
-
query_params = select_params(options, query_param_keys)
|
17062
|
-
if opts[:next_page]
|
17063
|
-
pagination_params = page_params_load(:put, path)
|
17064
|
-
query_params.merge! pagination_params if pagination_params
|
17065
|
-
end
|
17066
|
-
response = mixed_request(:put, path, query_params, form_params, headers)
|
17067
|
-
page_params_store(:put, path)
|
17068
|
-
response
|
17069
|
-
|
17070
16802
|
end
|
17071
16803
|
def edit_user(id,opts={})
|
17072
16804
|
query_param_keys = [
|
@@ -17138,69 +16870,7 @@ module Pandarus
|
|
17138
16870
|
page_params_store(:delete, path)
|
17139
16871
|
User.new(response)
|
17140
16872
|
end
|
17141
|
-
def
|
17142
|
-
query_param_keys = [
|
17143
|
-
|
17144
|
-
]
|
17145
|
-
|
17146
|
-
form_param_keys = [
|
17147
|
-
|
17148
|
-
]
|
17149
|
-
|
17150
|
-
# verify existence of params
|
17151
|
-
raise "user_id is required" if user_id.nil?
|
17152
|
-
# set default values and merge with input
|
17153
|
-
options = underscored_merge_opts(opts,
|
17154
|
-
:user_id => user_id
|
17155
|
-
)
|
17156
|
-
|
17157
|
-
# resource path
|
17158
|
-
path = path_replace("/v1/users/{user_id}/followers/self",
|
17159
|
-
:user_id => user_id)
|
17160
|
-
headers = nil
|
17161
|
-
form_params = select_params(options, form_param_keys)
|
17162
|
-
query_params = select_params(options, query_param_keys)
|
17163
|
-
if opts[:next_page]
|
17164
|
-
pagination_params = page_params_load(:put, path)
|
17165
|
-
query_params.merge! pagination_params if pagination_params
|
17166
|
-
end
|
17167
|
-
response = mixed_request(:put, path, query_params, form_params, headers)
|
17168
|
-
page_params_store(:put, path)
|
17169
|
-
response
|
17170
|
-
|
17171
|
-
end
|
17172
|
-
def un_follow_user(user_id,opts={})
|
17173
|
-
query_param_keys = [
|
17174
|
-
|
17175
|
-
]
|
17176
|
-
|
17177
|
-
form_param_keys = [
|
17178
|
-
|
17179
|
-
]
|
17180
|
-
|
17181
|
-
# verify existence of params
|
17182
|
-
raise "user_id is required" if user_id.nil?
|
17183
|
-
# set default values and merge with input
|
17184
|
-
options = underscored_merge_opts(opts,
|
17185
|
-
:user_id => user_id
|
17186
|
-
)
|
17187
|
-
|
17188
|
-
# resource path
|
17189
|
-
path = path_replace("/v1/users/{user_id}/followers/self",
|
17190
|
-
:user_id => user_id)
|
17191
|
-
headers = nil
|
17192
|
-
form_params = select_params(options, form_param_keys)
|
17193
|
-
query_params = select_params(options, query_param_keys)
|
17194
|
-
if opts[:next_page]
|
17195
|
-
pagination_params = page_params_load(:delete, path)
|
17196
|
-
query_params.merge! pagination_params if pagination_params
|
17197
|
-
end
|
17198
|
-
response = mixed_request(:delete, path, query_params, form_params, headers)
|
17199
|
-
page_params_store(:delete, path)
|
17200
|
-
response
|
17201
|
-
|
17202
|
-
end
|
17203
|
-
def merge_user_into_another_user_users(id,destination_user_id,opts={})
|
16873
|
+
def merge_user_into_another_user_destination_user_id(id,destination_user_id,opts={})
|
17204
16874
|
query_param_keys = [
|
17205
16875
|
|
17206
16876
|
]
|
@@ -17233,7 +16903,7 @@ module Pandarus
|
|
17233
16903
|
page_params_store(:put, path)
|
17234
16904
|
User.new(response)
|
17235
16905
|
end
|
17236
|
-
def
|
16906
|
+
def merge_user_into_another_user_accounts(id,destination_account_id,destination_user_id,opts={})
|
17237
16907
|
query_param_keys = [
|
17238
16908
|
|
17239
16909
|
]
|
@@ -17391,6 +17061,109 @@ module Pandarus
|
|
17391
17061
|
page_params_store(:get, path)
|
17392
17062
|
response.map {|response|PageView.new(response)}
|
17393
17063
|
end
|
17064
|
+
def store_custom_data(user_id,ns,data,opts={})
|
17065
|
+
query_param_keys = [
|
17066
|
+
|
17067
|
+
]
|
17068
|
+
|
17069
|
+
form_param_keys = [
|
17070
|
+
:ns,
|
17071
|
+
:data,
|
17072
|
+
|
17073
|
+
]
|
17074
|
+
|
17075
|
+
# verify existence of params
|
17076
|
+
raise "user_id is required" if user_id.nil?
|
17077
|
+
raise "ns is required" if ns.nil?
|
17078
|
+
raise "data is required" if data.nil?
|
17079
|
+
# set default values and merge with input
|
17080
|
+
options = underscored_merge_opts(opts,
|
17081
|
+
:user_id => user_id,
|
17082
|
+
:ns => ns,
|
17083
|
+
:data => data
|
17084
|
+
)
|
17085
|
+
|
17086
|
+
# resource path
|
17087
|
+
path = path_replace("/v1/users/{user_id}/custom_data",
|
17088
|
+
:user_id => user_id)
|
17089
|
+
headers = nil
|
17090
|
+
form_params = select_params(options, form_param_keys)
|
17091
|
+
query_params = select_params(options, query_param_keys)
|
17092
|
+
if opts[:next_page]
|
17093
|
+
pagination_params = page_params_load(:put, path)
|
17094
|
+
query_params.merge! pagination_params if pagination_params
|
17095
|
+
end
|
17096
|
+
response = mixed_request(:put, path, query_params, form_params, headers)
|
17097
|
+
page_params_store(:put, path)
|
17098
|
+
response
|
17099
|
+
|
17100
|
+
end
|
17101
|
+
def load_custom_data(user_id,ns,opts={})
|
17102
|
+
query_param_keys = [
|
17103
|
+
:ns
|
17104
|
+
]
|
17105
|
+
|
17106
|
+
form_param_keys = [
|
17107
|
+
|
17108
|
+
]
|
17109
|
+
|
17110
|
+
# verify existence of params
|
17111
|
+
raise "user_id is required" if user_id.nil?
|
17112
|
+
raise "ns is required" if ns.nil?
|
17113
|
+
# set default values and merge with input
|
17114
|
+
options = underscored_merge_opts(opts,
|
17115
|
+
:user_id => user_id,
|
17116
|
+
:ns => ns
|
17117
|
+
)
|
17118
|
+
|
17119
|
+
# resource path
|
17120
|
+
path = path_replace("/v1/users/{user_id}/custom_data",
|
17121
|
+
:user_id => user_id)
|
17122
|
+
headers = nil
|
17123
|
+
form_params = select_params(options, form_param_keys)
|
17124
|
+
query_params = select_params(options, query_param_keys)
|
17125
|
+
if opts[:next_page]
|
17126
|
+
pagination_params = page_params_load(:get, path)
|
17127
|
+
query_params.merge! pagination_params if pagination_params
|
17128
|
+
end
|
17129
|
+
response = mixed_request(:get, path, query_params, form_params, headers)
|
17130
|
+
page_params_store(:get, path)
|
17131
|
+
response
|
17132
|
+
|
17133
|
+
end
|
17134
|
+
def delete_custom_data(user_id,ns,opts={})
|
17135
|
+
query_param_keys = [
|
17136
|
+
:ns
|
17137
|
+
]
|
17138
|
+
|
17139
|
+
form_param_keys = [
|
17140
|
+
|
17141
|
+
]
|
17142
|
+
|
17143
|
+
# verify existence of params
|
17144
|
+
raise "user_id is required" if user_id.nil?
|
17145
|
+
raise "ns is required" if ns.nil?
|
17146
|
+
# set default values and merge with input
|
17147
|
+
options = underscored_merge_opts(opts,
|
17148
|
+
:user_id => user_id,
|
17149
|
+
:ns => ns
|
17150
|
+
)
|
17151
|
+
|
17152
|
+
# resource path
|
17153
|
+
path = path_replace("/v1/users/{user_id}/custom_data",
|
17154
|
+
:user_id => user_id)
|
17155
|
+
headers = nil
|
17156
|
+
form_params = select_params(options, form_param_keys)
|
17157
|
+
query_params = select_params(options, query_param_keys)
|
17158
|
+
if opts[:next_page]
|
17159
|
+
pagination_params = page_params_load(:delete, path)
|
17160
|
+
query_params.merge! pagination_params if pagination_params
|
17161
|
+
end
|
17162
|
+
response = mixed_request(:delete, path, query_params, form_params, headers)
|
17163
|
+
page_params_store(:delete, path)
|
17164
|
+
response
|
17165
|
+
|
17166
|
+
end
|
17394
17167
|
|
17395
17168
|
end
|
17396
17169
|
end
|