Class: Naver::Shorturl

Inherits:
Client
  • Object
show all
Defined in:
lib/naver/shorturl.rb

Overview

Naver Shorturl API

Class Method Summary collapse

Methods inherited from Client

#connection, connection, connection=, parse

Class Method Details

.shorten(url:) ⇒ ObjectifiedHash

단축URL


8
9
10
11
# File 'lib/naver/shorturl.rb', line 8

def shorten(url:)
  params = { url: url }
  parse(JSON.parse(connection.post("/v1/util/shorturl", params).body)["result"])
end