Module: Totter::Client::Stickers

Included in:
Totter::Client
Defined in:
lib/totter/client/stickers.rb

Overview

Client methods for working with stickers.

Instance Method Summary collapse

Instance Method Details

#follow_sticker(sticker) ⇒ Boolean

Follow all users with a specific sticker

Requires authenticated client.

Examples:

client.follow_sticker('featured')

Parameters:

  • sticker (String)

    sticker to follow

Returns:

  • (Boolean)

    True if follow was successful, false otherwise



23
24
25
# File 'lib/totter/client/stickers.rb', line 23

def follow_sticker(sticker)
  boolean_from_response(:post, "stickers/#{sticker}/follow")
end

#sticker(sticker_name) ⇒ Array

Get all of the users with a given sticker.

Examples:

Totter.sticker('staff')

Parameters:

  • sticker_name (String)

    the sticker to get users for

Returns:

  • (Array)

    an array of ‘Hashie::Mash` objects representing users



11
12
13
# File 'lib/totter/client/stickers.rb', line 11

def sticker(sticker_name)
  get("stickers/#{sticker_name}").body
end