forked from virre/bggapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.pl
More file actions
37 lines (28 loc) · 694 Bytes
/
example.pl
File metadata and controls
37 lines (28 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl
use strict;
use warnings;
use BoardGameGeek;
use Data::Dumper;
#Intiate Boardgames support.
my $game = Boardgame->new();
#init empty holder
my $data;
my $return_ref;
#Get data based on IDs
$return_ref = $game->gameData("1,2");
print Dumper(\$return_ref);
# Search for a game.
$data = $game->search('Twilight Struggle');
print Dumper(\$data);
my $data2;
#Create user connection
my $bgg_user = BggUser->new();
# Show users full collection. This might take a while.
$data2 = BggUser->getCollection('virre');
print Dumper($data2);
my $data3;
# Create GeekList.
my $geeklist = BggList->new();
# Get Geeklist
$data3 = $geeklist->getBggList(49088);
print Dumper (\$data3);