Class: Myjson::Bin

Inherits:
Client show all
Defined in:
lib/myjson/bin.rb

Overview

This class defines Myjson bins/ endpoint interactions

Constant Summary collapse

PATH =
'bins'.freeze

Constants inherited from Client

Client::BASE_URL

Instance Method Summary collapse

Instance Method Details

#create(data) ⇒ Object



11
12
13
# File 'lib/myjson/bin.rb', line 11

def create(data)
  post(PATH, data)
end

#show(id) ⇒ Object



7
8
9
# File 'lib/myjson/bin.rb', line 7

def show(id)
  get(PATH, id: id)
end

#update(id, data) ⇒ Object



15
16
17
# File 'lib/myjson/bin.rb', line 15

def update(id, data)
  put(PATH, id, data)
end