| @@ 327-338 (lines=12) @@ | ||
| 324 | * @return JsonResponse |
|
| 325 | * @codeCoverageIgnore |
|
| 326 | */ |
|
| 327 | public function pairDataApiAction(Request $request, $key) |
|
| 328 | { |
|
| 329 | $ret = $this->setUpEditCounter($request, $key); |
|
| 330 | if ($ret instanceof RedirectResponse) { |
|
| 331 | return $ret; |
|
| 332 | } |
|
| 333 | ||
| 334 | return new JsonResponse( |
|
| 335 | $this->editCounter->getPairData(), |
|
| 336 | Response::HTTP_OK |
|
| 337 | ); |
|
| 338 | } |
|
| 339 | ||
| 340 | /** |
|
| 341 | * Get various log counts for the user as JSON. |
|
| @@ 348-359 (lines=12) @@ | ||
| 345 | * @return JsonResponse |
|
| 346 | * @codeCoverageIgnore |
|
| 347 | */ |
|
| 348 | public function logCountsApiAction(Request $request, $key) |
|
| 349 | { |
|
| 350 | $ret = $this->setUpEditCounter($request, $key); |
|
| 351 | if ($ret instanceof RedirectResponse) { |
|
| 352 | return $ret; |
|
| 353 | } |
|
| 354 | ||
| 355 | return new JsonResponse( |
|
| 356 | $this->editCounter->getLogCounts(), |
|
| 357 | Response::HTTP_OK |
|
| 358 | ); |
|
| 359 | } |
|
| 360 | ||
| 361 | /** |
|
| 362 | * Get edit sizes for the user as JSON. |
|
| @@ 369-380 (lines=12) @@ | ||
| 366 | * @return JsonResponse |
|
| 367 | * @codeCoverageIgnore |
|
| 368 | */ |
|
| 369 | public function editSizesApiAction(Request $request, $key) |
|
| 370 | { |
|
| 371 | $ret = $this->setUpEditCounter($request, $key); |
|
| 372 | if ($ret instanceof RedirectResponse) { |
|
| 373 | return $ret; |
|
| 374 | } |
|
| 375 | ||
| 376 | return new JsonResponse( |
|
| 377 | $this->editCounter->getEditSizeData(), |
|
| 378 | Response::HTTP_OK |
|
| 379 | ); |
|
| 380 | } |
|
| 381 | ||
| 382 | /** |
|
| 383 | * Get the namespace totals for the user as JSON. |
|
| @@ 390-401 (lines=12) @@ | ||
| 387 | * @return Response |
|
| 388 | * @codeCoverageIgnore |
|
| 389 | */ |
|
| 390 | public function namespaceTotalsApiAction(Request $request, $key) |
|
| 391 | { |
|
| 392 | $ret = $this->setUpEditCounter($request, $key); |
|
| 393 | if ($ret instanceof RedirectResponse) { |
|
| 394 | return $ret; |
|
| 395 | } |
|
| 396 | ||
| 397 | return new JsonResponse( |
|
| 398 | $this->editCounter->namespaceTotals(), |
|
| 399 | Response::HTTP_OK |
|
| 400 | ); |
|
| 401 | } |
|
| 402 | ||
| 403 | /** |
|
| 404 | * Display or fetch the month counts for the user. |
|
| @@ 411-422 (lines=12) @@ | ||
| 408 | * @return Response |
|
| 409 | * @codeCoverageIgnore |
|
| 410 | */ |
|
| 411 | public function monthcountsApiAction(Request $request, $key) |
|
| 412 | { |
|
| 413 | $ret = $this->setUpEditCounter($request, $key); |
|
| 414 | if ($ret instanceof RedirectResponse) { |
|
| 415 | return $ret; |
|
| 416 | } |
|
| 417 | ||
| 418 | return new JsonResponse( |
|
| 419 | $this->editCounter->monthCounts(), |
|
| 420 | Response::HTTP_OK |
|
| 421 | ); |
|
| 422 | } |
|
| 423 | } |
|
| 424 | ||