lib/ribose/connection.rb in ribose-0.3.2 vs lib/ribose/connection.rb in ribose-0.4.0

- old
+ new

@@ -1,8 +1,9 @@ module Ribose class Connection < Ribose::Base include Ribose::Actions::All + include Ribose::Actions::Delete # List Connections # # Note: Currently, There are some chaching in place for this endpoint # which requires us to pass the `s` query params otherwise we might @@ -22,9 +23,23 @@ # @return [Array <Sawyer::Resource>] # def self.suggestions(client: nil, **options) Request.get("people_finding", client: client, query: options). suggested_connection + end + + # Disconnect + # + # Disconnect connection / contact with the provided + # connection id. This will return nothing for successful + # request, but if disconnect fails then it will raise an + # Error for the client. + # + # @params resource_id [Integer] Connection Id + # @return nil + # + def self.disconnect(resource_id, options = {}) + delete(resource_id, options) end private def resource