| @@ 372-387 (lines=16) @@ | ||
| 369 | * |
|
| 370 | * @return Response The response |
|
| 371 | */ |
|
| 372 | public function followUser($username) |
|
| 373 | { |
|
| 374 | if (empty($username)) { |
|
| 375 | throw new InvalidArgumentException('Username is required.'); |
|
| 376 | } |
|
| 377 | ||
| 378 | $request = new Request( |
|
| 379 | 'POST', |
|
| 380 | 'me/following/users/', |
|
| 381 | array( |
|
| 382 | 'user' => (string) $username, |
|
| 383 | ) |
|
| 384 | ); |
|
| 385 | ||
| 386 | return $this->execute($request); |
|
| 387 | } |
|
| 388 | ||
| 389 | /** |
|
| 390 | * Create a board. |
|
| @@ 423-432 (lines=10) @@ | ||
| 420 | * |
|
| 421 | * @return Response The response |
|
| 422 | */ |
|
| 423 | public function deleteBoard($boardId) |
|
| 424 | { |
|
| 425 | if (empty($boardId)) { |
|
| 426 | throw new InvalidArgumentException('The board id should not be empty.'); |
|
| 427 | } |
|
| 428 | ||
| 429 | $request = new Request('DELETE', sprintf('boards/%d/', $boardId)); |
|
| 430 | ||
| 431 | return $this->execute($request); |
|
| 432 | } |
|
| 433 | ||
| 434 | /** |
|
| 435 | * Create a pin on a board. |
|
| @@ 483-492 (lines=10) @@ | ||
| 480 | * |
|
| 481 | * @return Response The response |
|
| 482 | */ |
|
| 483 | public function deletePin($pinId) |
|
| 484 | { |
|
| 485 | if (empty($pinId)) { |
|
| 486 | throw new InvalidArgumentException('The pin id should not be empty.'); |
|
| 487 | } |
|
| 488 | ||
| 489 | $request = new Request('DELETE', sprintf('pins/%d/', $pinId)); |
|
| 490 | ||
| 491 | return $this->execute($request); |
|
| 492 | } |
|
| 493 | ||
| 494 | /** |
|
| 495 | * Get the next items for a paged list. |
|