1 | <?php |
||
5 | class PinHelper extends RequestHelper |
||
6 | { |
||
7 | /** |
||
8 | * Create Pinterest API request form commenting pin |
||
9 | * |
||
10 | * @param int $pinId |
||
11 | * @param string $text |
||
12 | * @return array |
||
13 | */ |
||
14 | public static function createCommentRequest($pinId, $text) |
||
21 | |||
22 | /** |
||
23 | * Create Pinterest API request form commenting pin |
||
24 | * |
||
25 | * @param int $pinId |
||
26 | * @param int $commentId |
||
27 | * @return array |
||
28 | */ |
||
29 | public static function createCommentDeleteRequest($pinId, $commentId) |
||
36 | |||
37 | /** |
||
38 | * Creates Pinterest API request for Pin creation |
||
39 | * |
||
40 | * @param string $description |
||
41 | * @param string $imageUrl |
||
42 | * @param int $boardId |
||
43 | * @return array |
||
44 | */ |
||
45 | public static function createPinCreationRequest($imageUrl, $boardId, $description = "") |
||
60 | |||
61 | |||
62 | /** |
||
63 | * Creates Pinterest API request for Pin repin |
||
64 | * |
||
65 | * @param string $description |
||
66 | * @param int $repinId |
||
67 | * @param int $boardId |
||
68 | * @return array |
||
69 | */ |
||
70 | public static function createRepinRequest($repinId, $boardId, $description) |
||
85 | |||
86 | |||
87 | /** |
||
88 | * Creates Pinterest API request to get Pin info |
||
89 | * |
||
90 | * @param int $pinId |
||
91 | * @return array |
||
92 | */ |
||
93 | public static function createInfoRequest($pinId) |
||
108 | |||
109 | /** |
||
110 | * Creates common pin request data by PinId |
||
111 | * |
||
112 | * @param int $pinId |
||
113 | * @param string $template |
||
114 | * @return array |
||
115 | */ |
||
116 | public static function createPinRequest($pinId, $template = 'id') |
||
125 | |||
126 | /** |
||
127 | * Creates simple Pin request by PinId (used by delete and like requests) |
||
128 | * |
||
129 | * @param $pinId |
||
130 | * @return array |
||
131 | */ |
||
132 | public static function createSimplePinRequest($pinId) |
||
137 | |||
138 | /** |
||
139 | * @param string|null $sourceUrl |
||
140 | * @param array $data |
||
141 | * @return array |
||
142 | */ |
||
143 | public static function createPinRequestData($data, $sourceUrl = null) |
||
152 | } |
||
153 |