Sha256: bb6a094344f3ea5d62c4fc1a5e81e505c0c135f0031e61b47d3bda56fb6e00c1
Contents?: true
Size: 1.21 KB
Versions: 5
Compression:
Stored size: 1.21 KB
Contents
# frozen_string_literal: true require "freefeed/utils" module Freefeed module V1 module Posts include Freefeed::Utils def create_post(post) authenticated_request(:post, "/v1/posts", json: post) end def update_post(id, post) authenticated_request(:put, "/v1/posts/#{id}", json: post) end def delete_post(id) authenticated_request(:delete, "/v1/posts/#{id}") end def like(id) authenticated_request(:post, "/v1/posts/#{id}/like") end def unlike(id) authenticated_request(:post, "/v1/posts/#{id}/unlike") end def hide(id) authenticated_request(:post, "/v1/posts/#{id}/hide") end def unhide(id) authenticated_request(:post, "/v1/posts/#{id}/unhide") end def save(id) authenticated_request(:post, "/v1/posts/#{id}/save") end def unsave(id) authenticated_request(:delete, "/v1/posts/#{id}/save") end def disable_comments(id) authenticated_request(:post, "/v1/posts/#{id}/disableComments") end def enable_comments(id) authenticated_request(:post, "/v1/posts/#{id}/enableComments") end end end end
Version data entries
5 entries across 5 versions & 1 rubygems