Class: CircleSo::Resources::Posts
- Inherits:
-
Base
- Object
- Base
- CircleSo::Resources::Posts
show all
- Defined in:
- lib/circle_so/resources/posts.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#create(**attrs) ⇒ Object
7
|
# File 'lib/circle_so/resources/posts.rb', line 7
def create(**attrs) = client.post("/posts", attrs)
|
#delete(id) ⇒ Object
10
|
# File 'lib/circle_so/resources/posts.rb', line 10
def delete(id) = client.delete("/posts/#{id}")
|
#list(**params) ⇒ Object
6
|
# File 'lib/circle_so/resources/posts.rb', line 6
def list(**params) = client.get("/posts", params)
|
#show(id) ⇒ Object
8
|
# File 'lib/circle_so/resources/posts.rb', line 8
def show(id) = client.get("/posts/#{id}")
|
#summary(post_id) ⇒ Object
11
|
# File 'lib/circle_so/resources/posts.rb', line 11
def summary(post_id) = client.get("/posts/#{post_id}/summary")
|
#unfollow(post_id, community_member_id:) ⇒ Object
12
|
# File 'lib/circle_so/resources/posts.rb', line 12
def unfollow(post_id, community_member_id:) = client.delete("/posts/#{post_id}/post_followers", nil, {community_member_id: })
|
#update(id, **attrs) ⇒ Object
9
|
# File 'lib/circle_so/resources/posts.rb', line 9
def update(id, **attrs) = client.put("/posts/#{id}", attrs)
|