Sha256: 282a200a54e4356a9c4e987511ab3db42bf1bbe9ab68d2b7eafbdfd05fc3a8d3

Contents?: true

Size: 474 Bytes

Versions: 19

Compression:

Stored size: 474 Bytes

Contents

module Totter
  class Client
    # Client methods for working with slugs.
    module Slugs
      # Get a slug.
      #
      # @param id [String] the slug id
      # @param unique_id [String] an optional tracking string
      # @return [Hashie::Mash]
      # @example
      #   Totter.slug('d/3I0n0g')
      def slug(id, unique_id = nil)
        path =  "slugs/#{id}"
        path += "?unique_id=#{unique_id}" if unique_id
        get(path).body
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
totter-0.4.8 lib/totter/client/slugs.rb
totter-0.4.7 lib/totter/client/slugs.rb
totter-0.4.6 lib/totter/client/slugs.rb
totter-0.4.5 lib/totter/client/slugs.rb
totter-0.4.4 lib/totter/client/slugs.rb
totter-0.4.3 lib/totter/client/slugs.rb
totter-0.4.2 lib/totter/client/slugs.rb
totter-0.4.1 lib/totter/client/slugs.rb
totter-0.4.0 lib/totter/client/slugs.rb
totter-0.3.9 lib/totter/client/slugs.rb
totter-0.3.8 lib/totter/client/slugs.rb
totter-0.3.7 lib/totter/client/slugs.rb
totter-0.3.6 lib/totter/client/slugs.rb
totter-0.3.5 lib/totter/client/slugs.rb
totter-0.3.4 lib/totter/client/slugs.rb
totter-0.3.3 lib/totter/client/slugs.rb
totter-0.3.2 lib/totter/client/slugs.rb
totter-0.3.1 lib/totter/client/slugs.rb
totter-0.3.0 lib/totter/client/slugs.rb