bloomy 0.9.0 → 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c974efd56ac66961c3bd6bbc23cbb9132f4de67faeb6fcfb30f91c86600bda1
4
- data.tar.gz: '083bd19e9f8a1186f4b9eb593357743fe5bb58245cf6a01ebad54333d0374996'
3
+ metadata.gz: c37c4101db5cde3d7ccb8d650abeea58416383c131eb35b71a74878aec1c6e69
4
+ data.tar.gz: '04397e91d4acaf30dddf615d01464c234c87e940b22d00eb2678da63f82fdcba'
5
5
  SHA512:
6
- metadata.gz: 43efae27d859f9d1f4e4e693d4ce4f9b47f085b74e6afe9a87b9869dd59fc90d26b4aee2a4f1d3b9714566a74a7687bcd40c29c24c599f9fb5b2c34f0e433e87
7
- data.tar.gz: 7f501d471e49608f68cf748083640926c336a7fb1b005cddc4a57eac2d7277be10375e95d8a7d4641bcc4386c9f067d4a3b957d36eb1563d14466fc64f708a57
6
+ metadata.gz: c2e00f5ce8c4435083d1809b3663d810a5a2b296be289e873c82a44180cc324eb0b297607b9c6314f925adb9ba7e17aaea5dcfbcca20df07b10b06d5f0f8cef3
7
+ data.tar.gz: 47be893750490311029c294edc904468bc147e902dabc6dbb16634c5c76bfe5b005c0cf9386b57cb4012ff412f578979ef3d3fa28c259b663202b27a4b2958eb
@@ -78,4 +78,27 @@ class User
78
78
  }
79
79
  end
80
80
  end
81
+
82
+ # Retrieves all users in the system
83
+ #
84
+ # @param include_placeholders [Boolean] whether to include users
85
+ # @return [Array<Hash>] an array of hashes containing user details
86
+ # @example
87
+ # user.all
88
+ # #=> [{id: 1, name: "John Doe", email: "john@example.com", ...}, ...]
89
+ def all(include_placeholders: false)
90
+ users = @conn.get("search/all", term: "%").body
91
+ users
92
+ .select { |user| user["ResultType"] == "User" }
93
+ .reject { |user| !include_placeholders && user["ImageUrl"] == "/i/userplaceholder" }
94
+ .map do |user|
95
+ {
96
+ id: user["Id"],
97
+ name: user["Name"],
98
+ email: user["Email"],
99
+ position: user["Description"],
100
+ image_url: user["ImageUrl"]
101
+ }
102
+ end
103
+ end
81
104
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bloomy
4
- VERSION = "0.9.0"
4
+ VERSION = "0.10.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloomy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franccesco Orozco