board-game-gem 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ebd8445fb5ed987151609d9feea6f6dbcf782c4
4
- data.tar.gz: 24c421f883ff895cd8382806b991626f131d501f
3
+ metadata.gz: a68469b9de477db16f068080c1cdd0c87d96c3c6
4
+ data.tar.gz: 37e4dbace97f8107463d62ed79b7e91b4c8ddc3e
5
5
  SHA512:
6
- metadata.gz: de357cfb939cf61560098ab1cb74ca142563d4520779eb06f13b69605bc9785d6054dcacaeaf1016be3f1181aed432f3e784f25a0f13ad8e665ebe49522388c3
7
- data.tar.gz: bda736d6ce41f2b89857646405fc6b62d564dc5baaaa1c7930ab8d0df98d6104340ecffdde9338c75aedb2dc898939e1c645d45a1406798c32d99403f81b446b
6
+ metadata.gz: 55534770c0e6cc1d1779f1fd02413579330fafb86d65a768d3731457d0eab8b2eeca527d5cf58a0c0a0576272893d86f9d6b3f81606daf4c35eb95d823bc466e
7
+ data.tar.gz: 16d4b6d9f67331c832b980498d0bd5cf3f6ec9134cd288488eb48f484abfc82e9e2a8760105e07e7ed0deab178af5725ac1cba15bffa19568f92f708f87e433f
@@ -5,14 +5,15 @@ module BoardGameGem
5
5
  API_ROOT = "https://www.boardgamegeek.com/xmlapi2"
6
6
  MAX_ATTEMPTS = 10
7
7
 
8
- def BoardGameGem.get_item(id, statistics = false, options = {})
8
+ module_function
9
+ def get_item(id, statistics = false, options = {})
9
10
  options[:id] = id
10
11
  options[:stats] = statistics ? 1 : 0
11
12
  item = BGGItem.new(BoardGameGem.request_xml("thing", options))
12
13
  return item.id == 0 ? nil : item
13
14
  end
14
15
 
15
- def BoardGameGem.get_items(ids, statistics = false, options = {})
16
+ def get_items(ids, statistics = false, options = {})
16
17
  options[:id] = ids.join(",")
17
18
  options[:stats] = statistics ? 1 : 0
18
19
  item_xml = BoardGameGem.request_xml("thing", options)
@@ -24,19 +25,19 @@ module BoardGameGem
24
25
  item_list
25
26
  end
26
27
 
27
- def BoardGameGem.get_family(id, options = {})
28
+ def get_family(id, options = {})
28
29
  options[:id] = id
29
30
  family = BGGFamily.new(BoardGameGem.request_xml("family", options))
30
31
  return family.id == 0 ? nil : family
31
32
  end
32
33
 
33
- def BoardGameGem.get_user(username, options = {})
34
+ def get_user(username, options = {})
34
35
  options[:name] = username
35
36
  user = BGGUser.new(BoardGameGem.request_xml("user", options))
36
37
  return user.id == 0 ? nil : user
37
38
  end
38
39
 
39
- def BoardGameGem.get_collection(username, options = {})
40
+ def get_collection(username, options = {})
40
41
  options[:username] = username
41
42
  collection_xml = BoardGameGem.request_xml("collection", options)
42
43
  if collection_xml.css("error").length > 0
@@ -46,7 +47,7 @@ module BoardGameGem
46
47
  end
47
48
  end
48
49
 
49
- def BoardGameGem.search(query, options = {})
50
+ def search(query, options = {})
50
51
  options[:query] = query
51
52
  xml = BoardGameGem.request_xml("search", options)
52
53
  return {
@@ -1,3 +1,3 @@
1
1
  module BoardGameGem
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: board-game-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Roussel