module WeebSh::API::Shimakaze
Constants
- BASE
Public Instance Methods
decrease(interface, bot, user, amount)
click to toggle source
# File lib/weeb/api/shimakaze.rb, line 65 def decrease(interface, bot, user, amount) WeebSh::API.request( :post, "#{interface.api_url}#{BASE}/#{bot}/#{user}/decrease", { decrease: amount }.to_json, { Authorization: interface.auth, 'User-Agent': interface.user_agent } ) end
get(interface, bot, user)
click to toggle source
# File lib/weeb/api/shimakaze.rb, line 12 def get(interface, bot, user) WeebSh::API.request( :get, "#{interface.api_url}#{BASE}/#{bot}/#{user}", { Authorization: interface.auth, 'User-Agent': interface.user_agent } ) end
get_settings(interface)
click to toggle source
# File lib/weeb/api/shimakaze.rb, line 79 def get_settings(interface) WeebSh::API.request( :get, "#{interface.api_url}#{BASE}/settings", { Authorization: interface.auth, 'User-Agent': interface.user_agent } ) end
give(interface, bot, from, to)
click to toggle source
# File lib/weeb/api/shimakaze.rb, line 23 def give(interface, bot, from, to) WeebSh::API.request( :post, "#{interface.api_url}#{BASE}/#{bot}/#{to}", { source_user: from }.to_json, { Authorization: interface.auth, 'User-Agent': interface.user_agent } ) end
increase(interface, bot, user, amount)
click to toggle source
# File lib/weeb/api/shimakaze.rb, line 51 def increase(interface, bot, user, amount) WeebSh::API.request( :post, "#{interface.api_url}#{BASE}/#{bot}/#{user}/increase", { increase: amount }.to_json, { Authorization: interface.auth, 'User-Agent': interface.user_agent } ) end
reset(interface, bot, user, reset_cooldown = true)
click to toggle source
# File lib/weeb/api/shimakaze.rb, line 37 def reset(interface, bot, user, reset_cooldown = true) WeebSh::API.request( :post, "#{interface.api_url}#{BASE}/#{bot}/#{user}/reset", { cooldown: reset_cooldown }.to_json, { Authorization: interface.auth, 'User-Agent': interface.user_agent } ) end
set_settings(interface, settings)
click to toggle source
# File lib/weeb/api/shimakaze.rb, line 90 def set_settings(interface, settings) WeebSh::API.request( :post, settings.to_json, "#{interface.api_url}#{BASE}/settings", { Authorization: interface.auth, 'User-Agent': interface.user_agent } ) end