1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace StarCitizen\Accounts; |
4
|
|
|
|
5
|
|
|
use StarCitizen\Models\Profile; |
6
|
|
|
use StarCitizen\Models\Store; |
7
|
|
|
use StarCitizen\StarCitizens; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Class Accounts |
11
|
|
|
* |
12
|
|
|
* @package StarCitizen\Accounts; |
13
|
|
|
*/ |
14
|
|
|
class Accounts |
15
|
|
|
{ |
16
|
|
|
/** |
17
|
|
|
* Constants Profile Types |
18
|
|
|
*/ |
19
|
|
|
const FULL = "full_profile"; |
20
|
|
|
const THREADS = "threads"; |
21
|
|
|
const POSTS = "posts"; |
22
|
|
|
const BASEPROFILE = Accounts::FULL; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @param $id |
26
|
|
|
* @param bool $cache |
27
|
|
|
* @param bool $raw |
28
|
|
|
* |
29
|
|
|
* @return bool|Profile|string |
30
|
|
|
*/ |
31
|
4 |
|
public static function findProfile($id, $cache = false, $raw = false) |
32
|
|
|
{ |
33
|
4 |
|
$starCitizens = new StarCitizens(); |
34
|
4 |
|
return $starCitizens->accounts($id, self::BASEPROFILE, $cache, $raw); |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @param $id |
39
|
|
|
* @param bool $cache |
40
|
|
|
* @param bool $raw |
41
|
|
|
* |
42
|
|
|
* @return bool|Store|string |
43
|
|
|
*/ |
44
|
3 |
|
public static function findThreads($id, $cache = false, $raw = false) |
45
|
|
|
{ |
46
|
3 |
|
$starCitizens = new StarCitizens(); |
47
|
3 |
|
return $starCitizens->accounts($id, Accounts::THREADS, $cache, $raw); |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @param $id |
52
|
|
|
* @param bool $cache |
53
|
|
|
* @param bool $raw |
54
|
|
|
* |
55
|
|
|
* @return bool|Store|string |
56
|
|
|
*/ |
57
|
10 |
|
public static function findPosts($id, $cache = false, $raw = false) |
58
|
|
|
{ |
59
|
10 |
|
$starCitizens = new StarCitizens(); |
60
|
10 |
|
return $starCitizens->accounts($id, Accounts::POSTS, $cache, $raw); |
61
|
|
|
} |
62
|
|
|
} |