Module: GW2::Misc

Extended by:
GW2
Defined in:
lib/gw2/misc.rb,
lib/gw2/misc/build.rb,
lib/gw2/misc/files.rb,
lib/gw2/misc/colors.rb

Constant Summary

Constants included from GW2

BASE_URL

Class Method Summary collapse

Methods included from GW2

request

Class Method Details

.buildObject



3
4
5
6
7
8
9
10
11
# File 'lib/gw2/misc/build.rb', line 3

def self.build
  response = request(
    action: "Get",
    ssl: true,
    url: "#{BASE_URL}/build.json"
  )

  return JSON.parse(response.body)
end

.colorsObject



3
4
5
6
7
8
9
10
11
# File 'lib/gw2/misc/colors.rb', line 3

def self.colors
  response = request(
    action: "Get",
    ssl: true,
    url: "#{BASE_URL}/colors.json"
  )

  return JSON.parse(response.body)
end

.filesObject



3
4
5
6
7
8
9
10
11
# File 'lib/gw2/misc/files.rb', line 3

def self.files
  response = request(
    action: "Get",
    ssl: true,
    url: "#{BASE_URL}/files.json"
  )

  return JSON.parse(response.body)
end