Class: Button::Links

Inherits:
Resource show all
Defined in:
lib/button/resources/links.rb

Overview

Constant Summary

Constants inherited from Resource

Resource::USER_AGENT

Instance Attribute Summary

Attributes inherited from Resource

#config

Instance Method Summary collapse

Methods inherited from Resource

#api_delete, #api_get, #api_post, #initialize, #timeout

Constructor Details

This class inherits a constructor from Button::Resource

Instance Method Details

#create(link) ⇒ Button::Response

Create a Link

Parameters:

  • link (Hash)

    the link to create

Returns:



16
17
18
# File 'lib/button/resources/links.rb', line 16

def create(link)
  api_post(path, link)
end

#get_info(link) ⇒ Button::Response

Get information for Link

Parameters:

  • link (Hash)

    the link to get information on

Returns:



25
26
27
# File 'lib/button/resources/links.rb', line 25

def get_info(link)
  api_post(path + '/info', link)
end

#pathObject



7
8
9
# File 'lib/button/resources/links.rb', line 7

def path
  '/v1/links'
end