Class: CircleSo::Resources::CommunityMembers
- Defined in:
- lib/circle_so/resources/community_members.rb
Instance Method Summary collapse
-
#access_groups(id, **params) ⇒ Object
Access groups this member belongs to.
- #ban(id) ⇒ Object
-
#deactivate(id) ⇒ Object
Deactivate the member (removes community access, keeps the record).
-
#delete(id) ⇒ Object
Permanently delete the member.
-
#invite(email:, **attrs) ⇒ Object
(also: #create)
Create/invite a member by email.
- #list(**params) ⇒ Object
- #search(**params) ⇒ Object
- #show(id) ⇒ Object
-
#spaces(**params) ⇒ Object
Spaces a member belongs to.
- #update(id, **attrs) ⇒ Object
Methods inherited from Base
Constructor Details
This class inherits a constructor from CircleSo::Resources::Base
Instance Method Details
#access_groups(id, **params) ⇒ Object
Access groups this member belongs to.
25 |
# File 'lib/circle_so/resources/community_members.rb', line 25 def access_groups(id, **params) = client.get("/community_members/#{id}/access_groups", params) |
#ban(id) ⇒ Object
22 |
# File 'lib/circle_so/resources/community_members.rb', line 22 def ban(id) = client.put("/community_members/#{id}/ban_member") |
#deactivate(id) ⇒ Object
Deactivate the member (removes community access, keeps the record).
19 20 |
# File 'lib/circle_so/resources/community_members.rb', line 19 def deactivate(id) = client.delete("/community_members/#{id}") # Permanently delete the member. Note: Circle models this as a PUT. |
#delete(id) ⇒ Object
Permanently delete the member. Note: Circle models this as a PUT.
21 |
# File 'lib/circle_so/resources/community_members.rb', line 21 def delete(id) = client.put("/community_members/#{id}/delete_member") |
#invite(email:, **attrs) ⇒ Object Also known as: create
Create/invite a member by email. Idempotent: re-calling for an existing email returns the same member (no duplicate, no re-sent invitation email). The response "message" says "already a member" in that case. First creation triggers Circle's invitation email.
15 |
# File 'lib/circle_so/resources/community_members.rb', line 15 def invite(email:, **attrs) = client.post("/community_members", {email: email, **attrs}) |
#list(**params) ⇒ Object
6 |
# File 'lib/circle_so/resources/community_members.rb', line 6 def list(**params) = client.get("/community_members", params) |
#search(**params) ⇒ Object
7 |
# File 'lib/circle_so/resources/community_members.rb', line 7 def search(**params) = client.get("/community_members/search", params) |
#show(id) ⇒ Object
8 |
# File 'lib/circle_so/resources/community_members.rb', line 8 def show(id) = client.get("/community_members/#{id}") |
#spaces(**params) ⇒ Object
Spaces a member belongs to. Filter with community_member_id: or user_email: (query params).
29 |
# File 'lib/circle_so/resources/community_members.rb', line 29 def spaces(**params) = client.get("/community_member_spaces", params) |
#update(id, **attrs) ⇒ Object
9 |
# File 'lib/circle_so/resources/community_members.rb', line 9 def update(id, **attrs) = client.put("/community_members/#{id}", attrs) |