bearcat 1.2.14 → 1.2.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c22f978d3c9f3f779452fa52734b972d90fc624a
4
- data.tar.gz: 70792969c2e7da477446ce6c769b0a8f9330e03a
3
+ metadata.gz: 5426a0f6f733add9d7be309f72ffd7185b77b263
4
+ data.tar.gz: 02487a5957a1b4f0877efb9056426cbbc0fedd9c
5
5
  SHA512:
6
- metadata.gz: 7b47e7b61259c19521dbb74c220bea5c825600754325ceaf5ecfa6bb7776dae22e3c974b5230210aa3c8a7680f51268de166f4c2c9893ed099d588f131e624a8
7
- data.tar.gz: ec0d6d28382f111ca084362029c40f2a71aaca6d4662546663659b6af2c0d944c9f4ffb3d14e6a5c8ff24b20bf6fa30993a4736d434dd4eeb14e5cfca084298d
6
+ metadata.gz: c2c5fb84ca83da6d3fa30708cdbefbb20150f37a03614578633bbafae5d63662f24334217f161f71a2c003fc7435992c87025bd39e4e0b30c4eb669aced315e3
7
+ data.tar.gz: 4a2605d4015376c5b8eeff77a87c3ddc68bf65cdcc2017c39b2e5d199104ce6d68dbca037c1df71f3707bbab4d8adb7ec18f6dc21a9006d62882ba856bbda2b5
@@ -26,6 +26,14 @@ module Bearcat
26
26
  get("/api/v1/courses/#{course_id}/discussion_topics/#{discussion_id}/entries", params)
27
27
  end
28
28
 
29
+ def group_discussion_entry_replies(group_id, discussion_id, entry_id, params = {})
30
+ get("/api/v1/groups/#{group_id}/discussion_topics/#{discussion_id}/entries/#{entry_id}/replies", params)
31
+ end
32
+
33
+ def course_discussion_entry_replies(course_id, discussion_id, entry_id, params= {})
34
+ get("/api/v1/courses/#{course_id}/discussion_topics/#{discussion_id}/entries/#{entry_id}/replies", params)
35
+ end
36
+
29
37
  end
30
38
  end
31
39
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.2.14' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.2.15' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -56,4 +56,22 @@ describe Bearcat::Client::Discussions do
56
56
  discussions[0]['id'].should == 1
57
57
  end
58
58
 
59
+ it 'returns course discussion entry replies' do
60
+ stub_get(@client, "/api/v1/courses/1/discussion_topics/1/entries/1/replies").to_return(json_response("discussion_entry_replies.json"))
61
+ discussions = @client.course_discussion_entry_replies('1', '1', '1')
62
+ discussions.class.should eq(Bearcat::ApiArray)
63
+ discussions.count.should == 1
64
+ discussions[0].class.should eq(Hash)
65
+ discussions[0]['id'].should == 3
66
+ end
67
+
68
+ it 'returns group discussion entry replies' do
69
+ stub_get(@client, "/api/v1/groups/1/discussion_topics/1/entries/1/replies").to_return(json_response("discussion_entry_replies.json"))
70
+ discussions = @client.group_discussion_entry_replies('1', '1', '1')
71
+ discussions.class.should eq(Bearcat::ApiArray)
72
+ discussions.count.should == 1
73
+ discussions[0].class.should eq(Hash)
74
+ discussions[0]['id'].should == 3
75
+ end
76
+
59
77
  end
@@ -0,0 +1,21 @@
1
+ [
2
+ {
3
+ "id": 3,
4
+ "user_id": 170000004597713,
5
+ "parent_id": 1,
6
+ "created_at": "2016-08-25T16:46:59Z",
7
+ "updated_at": "2016-08-25T16:46:59Z",
8
+ "rating_count": null,
9
+ "rating_sum": null,
10
+ "user_name": "Mark Valentine",
11
+ "message": "<p>i am not in favor of that.</p>",
12
+ "user": {
13
+ "id": 170000004597713,
14
+ "display_name": "Mark Valentine",
15
+ "avatar_image_url": "https://secure.gravatar.com/avatar/ef7cb412b0b68576d39a7014919e6e92?s=50&d=https%3A%2F%2Fmvalentine.instructure.com%2Fimages%2Fmessages%2Favatar-50.png",
16
+ "html_url": "https://mvalentine.instructure.com/courses/1/users/17~4597713"
17
+ },
18
+ "read_state": "read",
19
+ "forced_read_state": false
20
+ }
21
+ ]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.14
4
+ version: 1.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills, Jake Sorce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-23 00:00:00.000000000 Z
11
+ date: 2016-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -226,6 +226,7 @@ files:
226
226
  - spec/fixtures/department_level_participation.json
227
227
  - spec/fixtures/department_level_statistics.json
228
228
  - spec/fixtures/discussion_entries.json
229
+ - spec/fixtures/discussion_entry_replies.json
229
230
  - spec/fixtures/discussion_topics.json
230
231
  - spec/fixtures/edited_group.json
231
232
  - spec/fixtures/enroll_student.json
@@ -386,6 +387,7 @@ test_files:
386
387
  - spec/fixtures/department_level_participation.json
387
388
  - spec/fixtures/department_level_statistics.json
388
389
  - spec/fixtures/discussion_entries.json
390
+ - spec/fixtures/discussion_entry_replies.json
389
391
  - spec/fixtures/discussion_topics.json
390
392
  - spec/fixtures/edited_group.json
391
393
  - spec/fixtures/enroll_student.json
@@ -434,4 +436,3 @@ test_files:
434
436
  - spec/fixtures/user_page_views.json
435
437
  - spec/fixtures/user_profile.json
436
438
  - spec/helper.rb
437
- has_rdoc: