Sha256: d8ebbba4c2eaa0358e452bd8c3a6436f63ef969c4e061535688634a6f46ef3e6

Contents?: true

Size: 952 Bytes

Versions: 39

Compression:

Stored size: 952 Bytes

Contents

module Nearmiss
  class Client

    # Methods for the Bookmarks API
    #
    module Bookmarks

      # List bookmarks
      #
      # @return [Array<Sawyer::Resource>] List of bookmarks
      def bookmarks(options = {})
        paginate "bookmarks", options
      end
      alias :list_bookmarks :bookmarks

      # Get a single bookmark
      #
      # @param bookmark [String] ID of bookmark to fetch
      # @return [Sawyer::Resource] Bookmark information
      #
      def bookmark(bookmark, options={})
        get "bookmarks/#{bookmark}", options
      end

      # Delete a bookmark
      #
      # @param bookmark_id [String] Id of the bookmark.
      # @return [Boolean] True if bookmark deleted, false otherwise.
      # @example
      #   @client.delete_bookmark('208sdaz3')
      #
      def delete_bookmark(bookmark_id, options={})
        boolean_from_response(:delete, "bookmarks/#{bookmark_id}", options)

      end

    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
toolhound-ruby-1.0.37 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.36 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.35 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.34 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.33 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.32 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.31 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.30 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.29 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.28 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.27 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.26 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.25 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.24 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.23 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.22 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.21 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.20 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.19 lib/toolhound-ruby/client/bookmarks.rb
toolhound-ruby-1.0.18 lib/toolhound-ruby/client/bookmarks.rb