board-game-gem 0.3.1 → 0.3.2

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: a68469b9de477db16f068080c1cdd0c87d96c3c6
4
- data.tar.gz: 37e4dbace97f8107463d62ed79b7e91b4c8ddc3e
3
+ metadata.gz: 3bac40072c12ed03715482d0da9fb1cccf8985f4
4
+ data.tar.gz: 62fe6d81dc76c25613afa756d629b788ecf825f7
5
5
  SHA512:
6
- metadata.gz: 55534770c0e6cc1d1779f1fd02413579330fafb86d65a768d3731457d0eab8b2eeca527d5cf58a0c0a0576272893d86f9d6b3f81606daf4c35eb95d823bc466e
7
- data.tar.gz: 16d4b6d9f67331c832b980498d0bd5cf3f6ec9134cd288488eb48f484abfc82e9e2a8760105e07e7ed0deab178af5725ac1cba15bffa19568f92f708f87e433f
6
+ metadata.gz: 2e81c46c8d05188b8fc7f594f2147afb9c4237ac5f22f7d5fb6178ea50aadd9ad409023f281a3e30406cd168bc9eaaf2a3791846bd898a9bd1e8f783b01f3751
7
+ data.tar.gz: f20b4f858a09307d4b54053027c641e9a00b4f7b9c7434674421575908814239938ed23a5dcddb0df45552efb4f8d6852ee70f30b8d7a62cf4e9435318394849
@@ -5,15 +5,15 @@ module BoardGameGem
5
5
  API_ROOT = "https://www.boardgamegeek.com/xmlapi2"
6
6
  MAX_ATTEMPTS = 10
7
7
 
8
- module_function
9
- def get_item(id, statistics = false, options = {})
8
+ module_function :get_items
9
+ def BoardGameGem.get_item(id, statistics = false, options = {})
10
10
  options[:id] = id
11
11
  options[:stats] = statistics ? 1 : 0
12
12
  item = BGGItem.new(BoardGameGem.request_xml("thing", options))
13
13
  return item.id == 0 ? nil : item
14
14
  end
15
15
 
16
- def get_items(ids, statistics = false, options = {})
16
+ def BoardGameGem.get_items(ids, statistics = false, options = {})
17
17
  options[:id] = ids.join(",")
18
18
  options[:stats] = statistics ? 1 : 0
19
19
  item_xml = BoardGameGem.request_xml("thing", options)
@@ -25,19 +25,19 @@ module BoardGameGem
25
25
  item_list
26
26
  end
27
27
 
28
- def get_family(id, options = {})
28
+ def BoardGameGem.get_family(id, options = {})
29
29
  options[:id] = id
30
30
  family = BGGFamily.new(BoardGameGem.request_xml("family", options))
31
31
  return family.id == 0 ? nil : family
32
32
  end
33
33
 
34
- def get_user(username, options = {})
34
+ def BoardGameGem.get_user(username, options = {})
35
35
  options[:name] = username
36
36
  user = BGGUser.new(BoardGameGem.request_xml("user", options))
37
37
  return user.id == 0 ? nil : user
38
38
  end
39
39
 
40
- def get_collection(username, options = {})
40
+ def BoardGameGem.get_collection(username, options = {})
41
41
  options[:username] = username
42
42
  collection_xml = BoardGameGem.request_xml("collection", options)
43
43
  if collection_xml.css("error").length > 0
@@ -47,7 +47,7 @@ module BoardGameGem
47
47
  end
48
48
  end
49
49
 
50
- def search(query, options = {})
50
+ def BoardGameGem.search(query, options = {})
51
51
  options[:query] = query
52
52
  xml = BoardGameGem.request_xml("search", options)
53
53
  return {
@@ -1,3 +1,3 @@
1
1
  module BoardGameGem
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
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.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Roussel