lib/nexus/invision/client.rb in nexus-invision-1.5.0 vs lib/nexus/invision/client.rb in nexus-invision-1.6.0

- old
+ new

@@ -70,9 +70,27 @@ http_method: HTTPMethod::DELETE, endpoint: URI("forums/posts/#{post_id}"), ) end + sig { params(topic_id: Integer).void } + def delete_topic(topic_id) + request( + http_method: HTTPMethod::DELETE, + endpoint: URI("forums/topics/#{topic_id}"), + ) + end + + sig { params(post_id: Integer).returns(Resources::Post) } + def get_post(post_id) + response = request( + http_method: HTTPMethod::GET, + endpoint: URI("forums/posts/#{post_id}"), + ) + + Resources::Post.from_hash(response.body) + end + sig { params(request: Requests::ListForumTopics).returns(Resources::Page[Resources::Topic]) } def list_forum_topics(request) response = request( http_method: HTTPMethod::GET, endpoint: URI("forums/topics"),