discourse_api 0.5.1 → 0.6.0

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: b3e45b18cbf82ce28f992ec3728875d6cf3107c1
4
- data.tar.gz: e95d166d1d0edcf08ff4c1463eb236503fa2c4ee
3
+ metadata.gz: 5f1bad4fde60c9d97cce5ee385bba64205d60f69
4
+ data.tar.gz: c6aa9bac658b00247f9f3519674ef02bc133c2e5
5
5
  SHA512:
6
- metadata.gz: 7807ddbc638a6a709aba10cf1c54cee7bae25ab3c80fa367128da859a808d4ed7e26b6ee541f8a03689d3aba1ae182d7081f47ffcc970366954bebcb5ab8e3e9
7
- data.tar.gz: 34e3c039afdad51498abcbd78d8e1cab6e8f83958dde55e3959aa1206194ff1e07a7eeaaeb2f02fd626282614f3952ea7c079337b724c05789f721391baf80f5
6
+ metadata.gz: 6dfb7d8a2e5e4cb7e744a66f4c041b9cac3789101c8231a6891ceab319c7b61db506ec4883803af9da8c61dfdd62189f4e78e8e204b112cfccc86fffcd23b8f5
7
+ data.tar.gz: 1d595c6b8f138b8f517294cc8f28f22b127373968dc6d8d16348ff5f15dcbfd756c66b25c8c52fbabc5f451782d88c99ba95fd30bd412a09136e40608cd93d3b
data/CHANGELOG.md CHANGED
@@ -1,19 +1,28 @@
1
- # CHANGELOG
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+ This project adheres to [Semantic Versioning](http://semver.org/).
2
4
 
3
- ## master
5
+ ## [0.6.0] - 2015-11-27
6
+ ### Added
7
+ - get posts in topic by an array of id's
4
8
 
5
- - Added `client.category_latest_posts("category-slug")` endpoint
6
-
7
- ## 0.1.2
8
-
9
- - Release
10
-
11
- ## 0.3.5
9
+ ## [0.5.1] - 2015-11-21
10
+ ### Fixed
11
+ - remove puts statement
12
12
 
13
- - Can now get a list of users by type: active, new, staff, etc.
13
+ ## [0.5.0] - 2015-11-21
14
+ ### Added
15
+ - get latest category topics by page
14
16
 
15
- ## 0.3.6
17
+ ## [0.4.0] - 2015-01-15
18
+ ### Added
19
+ - generate an api key for a user
20
+ - revoke an api key for a user
21
+ - update user trust level
22
+ - grant user badge
16
23
 
24
+ ## [0.3.6] - 2015-01-11
25
+ ### Added
17
26
  - list badges
18
27
  - view email settings
19
28
  - list emails sent
@@ -22,17 +31,16 @@
22
31
  - list api keys generated
23
32
  - list backups created
24
33
 
25
- ## 0.4.0
34
+ ## [0.3.5] - 2015-01-06
35
+ ### Added
36
+ - Can now get a list of users by type: active, new, staff, etc.
37
+ - `client.category_latest_posts("category-slug")` endpoint
38
+
39
+ ## [0.1.2] - 2014-05-11
40
+
41
+ - Release
26
42
 
27
- - [FEATURE] generate an api key for a user
28
- - [FEATURE] revoke an api key for a user
29
- - [FEATURE] update user trust level
30
- - [FEATURE] grant user badge
31
43
 
32
- ## 0.5.0
33
44
 
34
- - [FEATURE] get latest category topics by page
35
45
 
36
- ## 0.5.1
37
46
 
38
- - remove puts statement
@@ -42,6 +42,18 @@ module DiscourseApi
42
42
  def delete_topic(id)
43
43
  delete("/t/#{id}.json")
44
44
  end
45
+
46
+ def topic_posts(topic_id, post_ids=[])
47
+ url = "/t/#{topic_id}/posts.json"
48
+ if posts_ids.count > 0
49
+ url << '?'
50
+ post_ids.each do |id|
51
+ url << "post_ids[]=#{id}&"
52
+ end
53
+ end
54
+ response = get(url)
55
+ response[:body]
56
+ end
45
57
  end
46
58
  end
47
59
  end
@@ -1,3 +1,3 @@
1
1
  module DiscourseApi
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discourse_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-21 00:00:00.000000000 Z
13
+ date: 2015-11-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday