bearcat 1.3.23 → 1.3.24

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: caf7aa9152ef1f7a136539438327eb8fc718f24b
4
- data.tar.gz: d6ab062ddd16f068b8f49a3bba320b966983a6da
3
+ metadata.gz: b634e2f27fbf216c539d6c64988974e81ae7bfa3
4
+ data.tar.gz: a0609e9f5ef3cbe006d14576f9b4390e4a90c43b
5
5
  SHA512:
6
- metadata.gz: bb7dd18c5acc8f7917fe07da220414c1e88dab38fe50badefb958eccc3ef058cb7ebe5af32e62f3b25194b90c41790e5818fee9d9c2c4a1e86a7d492280fc22d
7
- data.tar.gz: 1f3d7c2ec9c7d06343a4ba0a5dabd7fbde1cb0032d2208cba7b3d1d62561f2912cd5cd3d83bf7485cb25694d383d0771fe56c3fad29c7be212f766fc31693db4
6
+ metadata.gz: 0379d419f8af980d0052521cd547050394c80785e8449449b64757de4587728da9156994c6bf8de1c722bb12edf6e9332006b8676ac308c94f884a97898b9a59
7
+ data.tar.gz: 01f67197290fc47e82b3503abe76f8674c2c73d9a1d5e0c3d0741cd49c3364bbfa12d1ffe10892ca02b1985d621187b17996a56738ceae5b92e693e402acf12b
@@ -18,6 +18,10 @@ module Bearcat
18
18
  get("/api/v1/courses/#{course_id}/discussion_topics", params)
19
19
  end
20
20
 
21
+ def course_discussion(course_id, discussion_topic_id, params = {})
22
+ get("/api/v1/courses/#{course_id}/discussion_topics/#{discussion_topic_id}", params)
23
+ end
24
+
21
25
  def group_discussion_entries(group_id, discussion_id, params = {})
22
26
  get("/api/v1/groups/#{group_id}/discussion_topics/#{discussion_id}/entries", params)
23
27
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.3.23' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.3.24' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -74,4 +74,9 @@ describe Bearcat::Client::Discussions do
74
74
  discussions[0]['id'].should == 3
75
75
  end
76
76
 
77
+ it 'returns a single group discussion' do
78
+ stub_get(@client, "/api/v1/courses/1/discussion_topics/1").to_return(json_response("discussion_topic.json"))
79
+ discussion = @client.course_discussion('1', '1')
80
+ expect(discussion['id']).to eq(1)
81
+ end
77
82
  end
@@ -0,0 +1,49 @@
1
+ {
2
+ "id": 1,
3
+ "title": "Lets talk about the integrity policy",
4
+ "last_reply_at": "2016-08-22T18:41:53Z",
5
+ "delayed_post_at": null,
6
+ "posted_at": "2016-08-22T18:26:42Z",
7
+ "assignment_id": null,
8
+ "root_topic_id": null,
9
+ "position": null,
10
+ "podcast_has_student_posts": false,
11
+ "discussion_type": "side_comment",
12
+ "lock_at": null,
13
+ "allow_rating": false,
14
+ "only_graders_can_rate": false,
15
+ "sort_by_rating": false,
16
+ "user_name": "Mark Valentine",
17
+ "discussion_subentry_count": 1,
18
+ "permissions": {
19
+ "attach": true,
20
+ "update": true,
21
+ "reply": true,
22
+ "delete": true
23
+ },
24
+ "require_initial_post": null,
25
+ "user_can_see_posts": true,
26
+ "podcast_url": null,
27
+ "read_state": "read",
28
+ "unread_count": 0,
29
+ "subscribed": true,
30
+ "topic_children": [],
31
+ "attachments": [],
32
+ "published": true,
33
+ "can_unpublish": true,
34
+ "locked": false,
35
+ "can_lock": true,
36
+ "author": {
37
+ "id": 170000004597713,
38
+ "display_name": "Mark Valentine",
39
+ "avatar_image_url": "https://secure.gravatar.com/avatar/ef7cb412b0b68576d39a7014919e6e92?s=50&d=https%3A%2F%2Fmvalentine.instructure.com%2Fimages%2Fmessages%2Favatar-50.png",
40
+ "html_url": "https://mvalentine.instructure.com/courses/1/users/17~4597713"
41
+ },
42
+ "html_url": "https://mvalentine.instructure.com/courses/1/discussion_topics/1",
43
+ "url": "https://mvalentine.instructure.com/courses/1/discussion_topics/1",
44
+ "pinned": false,
45
+ "group_category_id": null,
46
+ "can_group": true,
47
+ "locked_for_user": false,
48
+ "message": "<p>I have this policy.</p>\r\n<p><a class=\"\" title=\"http://ola.aacc.edu/policies/IntegrityPolicy.pdf\" href=\"https://mvalentine.instructure.com/courses/1/files/3/download?verifier=gAUYA5q4jdW9k7R3A4Tw2TQ0KKmP5g4ubOelhFOU&amp;wrap=1\" target=\"\" data-api-endpoint=\"https://mvalentine.instructure.com/api/v1/courses/1/files/3\" data-api-returntype=\"File\">http://ola.aacc.edu/policies/IntegrityPolicy.pdf</a></p>\r\n<p> </p>"
49
+ }
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.3.23
4
+ version: 1.3.24
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: 2018-06-01 00:00:00.000000000 Z
11
+ date: 2018-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -247,6 +247,7 @@ files:
247
247
  - spec/fixtures/department_level_statistics.json
248
248
  - spec/fixtures/discussion_entries.json
249
249
  - spec/fixtures/discussion_entry_replies.json
250
+ - spec/fixtures/discussion_topic.json
250
251
  - spec/fixtures/discussion_topics.json
251
252
  - spec/fixtures/edited_group.json
252
253
  - spec/fixtures/edited_group_category.json
@@ -434,6 +435,7 @@ test_files:
434
435
  - spec/fixtures/department_level_statistics.json
435
436
  - spec/fixtures/discussion_entries.json
436
437
  - spec/fixtures/discussion_entry_replies.json
438
+ - spec/fixtures/discussion_topic.json
437
439
  - spec/fixtures/discussion_topics.json
438
440
  - spec/fixtures/edited_group.json
439
441
  - spec/fixtures/edited_group_category.json