discourse_api 0.23.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/discourse_api/client.rb +7 -2
- data/lib/discourse_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9485215938d611f4385eeff6d7beaeb1a28c50eb
|
4
|
+
data.tar.gz: 7aacb63d8ca833acbbacc0b1a1f68db67a32cc94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5f8b124460687e19f024c207c48c587a1b1fdbf591678ecb7e0f8070e73afc984909ac048b40b7b6746655e74888e37765da81590699c3c46ec1fb76c4c9fb4
|
7
|
+
data.tar.gz: 9be117e3d8c81a374f0207d8408f9f2aa040cef020ae7215104a32cc13f189e4e8f5ac8983c6997fbe8dc76429e51e6785c5080418749ac4aabb130cf6076d65
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [0.23.1] - 2018-05-24
|
6
|
+
### Fixed
|
7
|
+
- Can now change `api_username` without creating a new client
|
8
|
+
|
5
9
|
## [0.23.0] - 2018-05-24
|
6
10
|
### Added
|
7
11
|
- Added `delete_user` method
|
data/lib/discourse_api/client.rb
CHANGED
@@ -23,8 +23,8 @@ require 'discourse_api/api/uploads'
|
|
23
23
|
|
24
24
|
module DiscourseApi
|
25
25
|
class Client
|
26
|
-
attr_accessor :api_key
|
27
|
-
attr_reader :host
|
26
|
+
attr_accessor :api_key
|
27
|
+
attr_reader :host, :api_username
|
28
28
|
|
29
29
|
include DiscourseApi::API::Categories
|
30
30
|
include DiscourseApi::API::Search
|
@@ -52,6 +52,11 @@ module DiscourseApi
|
|
52
52
|
@use_relative = check_subdirectory(host)
|
53
53
|
end
|
54
54
|
|
55
|
+
def api_username=(api_username)
|
56
|
+
@api_username = api_username
|
57
|
+
@connection.params['api_username'] = api_username unless @connection.nil?
|
58
|
+
end
|
59
|
+
|
55
60
|
def connection_options
|
56
61
|
@connection_options ||= {
|
57
62
|
url: @host,
|