class Thumbtack::User

Wraps API calls related to users

Public Class Methods

new(client) click to toggle source

Initialize a User

@param [Client] client

client to communicate with the Pinboard API

@api private

# File lib/thumbtack/user.rb, line 12
def initialize(client)
  @client = client
end

Public Instance Methods

api_token() click to toggle source

Fetch the API token for making calls without a password

@example

api_token = user.api_token

@return [String]

@api public

@see pinboard.in/api/#user_api_token

# File lib/thumbtack/user.rb, line 40
def api_token
  @client.get('/user/api_token').fetch('result')
end
secret() click to toggle source

Fetch the secret RSS key for viewing private feeds

@example

rss_key = user.secret

@return [String]

@api public

@see pinboard.in/api/#user_secret

# File lib/thumbtack/user.rb, line 26
def secret
  @client.get('/user/secret').fetch('result')
end