1 | <?php |
||||
2 | |||||
3 | namespace Freyo\MtaH5\Device; |
||||
4 | |||||
5 | use Freyo\MtaH5\Kernel\BaseClient; |
||||
6 | |||||
7 | class Client extends BaseClient |
||||
8 | { |
||||
9 | /** |
||||
10 | * 按天查询对应属性的终端信息数据. |
||||
11 | * |
||||
12 | * @see https://mta.qq.com/docs/h5_api.html#%E7%BB%88%E7%AB%AF%E5%B1%9E%E6%80%A7%E5%88%97%E8%A1%A8 |
||||
13 | * |
||||
14 | * @param string $startDate 开始时间(Y-m-d) |
||||
15 | * @param string $endDate 结束时间(Y-m-d) |
||||
16 | * @param int $typeId 可选值详见附录(终端属性) |
||||
17 | * @param array|string $typeContents 可选值为终端属性列表返回的client值 |
||||
18 | * |
||||
19 | * @throws \Freyo\MtaH5\Kernel\Exceptions\InvalidConfigException |
||||
20 | * |
||||
21 | * @return array|\Freyo\MtaH5\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
||||
22 | */ |
||||
23 | public function query($startDate, $endDate, $typeId, $typeContents = []) |
||||
24 | { |
||||
25 | $params = [ |
||||
26 | 'start_date' => $startDate, |
||||
27 | 'end_date' => $endDate, |
||||
28 | 'type_id' => $typeId, |
||||
29 | 'idx' => 'pv,uv,vv,iv', |
||||
30 | ]; |
||||
31 | |||||
32 | if ($typeContents) { |
||||
33 | return $this->httpGet('ctr_client/get_by_content', array_merge($params, [ |
||||
34 | 'type_contents' => implode((array) $typeContents, ','), |
||||
0 ignored issues
–
show
|
|||||
35 | ])); |
||||
36 | } |
||||
37 | |||||
38 | return $this->httpGet('ctr_client/get_by_para', $params); |
||||
39 | } |
||||
40 | |||||
41 | /** |
||||
42 | * 按天查询运营商的pv\uv\vv\iv量. |
||||
43 | * |
||||
44 | * @see https://mta.qq.com/docs/h5_api.html#%E8%BF%90%E8%90%A5%E5%95%86 |
||||
45 | * |
||||
46 | * @param string $startDate 开始时间(Y-m-d) |
||||
47 | * @param string $endDate 结束时间(Y-m-d) |
||||
48 | * @param array|string $typeIds 可选值详见附录(运营商) |
||||
49 | * |
||||
50 | * @throws \Freyo\MtaH5\Kernel\Exceptions\InvalidConfigException |
||||
51 | * |
||||
52 | * @return array|\Freyo\MtaH5\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
||||
53 | */ |
||||
54 | public function operator($startDate, $endDate, $typeIds) |
||||
55 | { |
||||
56 | $params = [ |
||||
57 | 'start_date' => $startDate, |
||||
58 | 'end_date' => $endDate, |
||||
59 | 'type_ids' => implode((array) $typeIds, ','), |
||||
0 ignored issues
–
show
The call to
implode() has too many arguments starting with ',' .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. ![]() |
|||||
60 | 'idx' => 'pv,uv,vv,iv', |
||||
61 | ]; |
||||
62 | |||||
63 | return $this->httpGet('ctr_operator', $params); |
||||
64 | } |
||||
65 | |||||
66 | /** |
||||
67 | * 按天查询地区的pv\uv\vv\iv量. |
||||
68 | * |
||||
69 | * @see https://mta.qq.com/docs/h5_api.html#%E5%9C%B0%E5%8C%BA%E6%95%B0%E6%8D%AE |
||||
70 | * |
||||
71 | * @param string $startDate 开始时间(Y-m-d) |
||||
72 | * @param string $endDate 结束时间(Y-m-d) |
||||
73 | * @param array|string $typeIds 可选值详见附录(省市字典,市字典) |
||||
74 | * |
||||
75 | * @throws \Freyo\MtaH5\Kernel\Exceptions\InvalidConfigException |
||||
76 | * |
||||
77 | * @return array|\Freyo\MtaH5\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
||||
78 | */ |
||||
79 | public function area($startDate, $endDate, $typeIds) |
||||
80 | { |
||||
81 | $params = [ |
||||
82 | 'start_date' => $startDate, |
||||
83 | 'end_date' => $endDate, |
||||
84 | 'type_ids' => implode((array) $typeIds, ','), |
||||
0 ignored issues
–
show
The call to
implode() has too many arguments starting with ',' .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. ![]() |
|||||
85 | 'idx' => 'pv,uv,vv,iv', |
||||
86 | ]; |
||||
87 | |||||
88 | return $this->httpGet('ctr_area/get_by_area', $params); |
||||
89 | } |
||||
90 | |||||
91 | /** |
||||
92 | * 按天查询省市下有流量的城市的pv\uv\vv\iv量. |
||||
93 | * |
||||
94 | * @see https://mta.qq.com/docs/h5_api.html#%E7%9C%81%E5%B8%82%E6%95%B0%E6%8D%AE |
||||
95 | * |
||||
96 | * @param string $startDate 开始时间(Y-m-d) |
||||
97 | * @param string $endDate 结束时间(Y-m-d) |
||||
98 | * @param array|string $typeIds 可选值详见附录(省字典,市字典) |
||||
99 | * |
||||
100 | * @throws \Freyo\MtaH5\Kernel\Exceptions\InvalidConfigException |
||||
101 | * |
||||
102 | * @return array|\Freyo\MtaH5\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
||||
103 | */ |
||||
104 | public function province($startDate, $endDate, $typeIds) |
||||
105 | { |
||||
106 | $params = [ |
||||
107 | 'start_date' => $startDate, |
||||
108 | 'end_date' => $endDate, |
||||
109 | 'type_ids' => implode((array) $typeIds, ','), |
||||
0 ignored issues
–
show
The call to
implode() has too many arguments starting with ',' .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. ![]() |
|||||
110 | 'idx' => 'pv,uv,vv,iv', |
||||
111 | ]; |
||||
112 | |||||
113 | return $this->httpGet('ctr_area/get_by_province', $params); |
||||
114 | } |
||||
115 | } |
||||
116 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.