module DouyinSdk
Constants
- END_POINT
- VERSION
Public Class Methods
endpoint_uri(url)
click to toggle source
# File lib/douyin_sdk.rb, line 24 def endpoint_uri(url) URI.parse(endpoint_url(url)) end
endpoint_url(url)
click to toggle source
# File lib/douyin_sdk.rb, line 28 def endpoint_url(url) END_POINT + url end
http_get(url)
click to toggle source
# File lib/douyin_sdk.rb, line 20 def http_get(url) JSON.parse(Net::HTTP.get(endpoint_uri(url))) end
http_post(url, params)
click to toggle source
# File lib/douyin_sdk.rb, line 11 def http_post(url, params) res = Net::HTTP.post( endpoint_uri(url), params, {'Content-Type': 'application/json'} ) JSON.parse(res.body) end