Completed
Pull Request — Laravel4 (#36)
by
unknown
10:35
created

Group::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Syntax\SteamApi\Steam;
2
3
use Syntax\SteamApi\Client;
4
use Syntax\SteamApi\Containers\Group as GroupContainer;
5
6
class Group extends Client {
7
8
	public function __construct()
9
	{
10
		parent::__construct();
11
	}
12
13
	public function GetGroupSummary($group)
14
	{
15
		// Set up the api details
16
		$this->method  = 'memberslistxml';
17
18
		if (is_numeric($group)) {
19
			$this->url = 'http://steamcommunity.com/gid/';
20
		} else {
21
			$this->url = 'http://steamcommunity.com/groups/';
22
		}
23
24
		$this->url = $this->url . $group;
25
26
		// Set up the arguments
27
		$arguments = [
28
			'xml' => 1
29
		];
30
31
		// Get the client
32
		$client = $this->setUpXml($arguments);
33
34
		// Clean up the games
35
		$group = new GroupContainer($client);
36
37
		return $group;
38
	}
39
40
}