1 | <?php |
||
7 | class PinHelper |
||
8 | { |
||
9 | /** |
||
10 | * Create Pinterest API request form commenting/deleting comment pin |
||
11 | * |
||
12 | * @param int $pinId |
||
13 | * @param array $data |
||
14 | * @return array |
||
15 | */ |
||
16 | public static function createCommentRequest($pinId, $data) |
||
22 | |||
23 | /** |
||
24 | * Creates Pinterest API request for Pin creation |
||
25 | * |
||
26 | * @param string $description |
||
27 | * @param string $imageUrl |
||
28 | * @param int $boardId |
||
29 | * @return array |
||
30 | */ |
||
31 | public static function createPinCreationRequest($imageUrl, $boardId, $description = "") |
||
45 | |||
46 | /** |
||
47 | * Creates Pinterest API request for Pin repin |
||
48 | * |
||
49 | * @param string $description |
||
50 | * @param int $repinId |
||
51 | * @param int $boardId |
||
52 | * @return array |
||
53 | */ |
||
54 | public static function createRepinRequest($repinId, $boardId, $description) |
||
69 | |||
70 | /** |
||
71 | * Creates Pinterest API request to get Pin info |
||
72 | * |
||
73 | * @param int $pinId |
||
74 | * @return array |
||
75 | */ |
||
76 | public static function createInfoRequest($pinId) |
||
89 | |||
90 | /** |
||
91 | * Creates common pin request data by PinId |
||
92 | * |
||
93 | * @param int $pinId |
||
94 | * @param string $template |
||
95 | * @param array $options |
||
96 | * @return array |
||
97 | */ |
||
98 | public static function createPinRequest($pinId, $template = 'id', $options = array()) |
||
111 | |||
112 | /** |
||
113 | * Creates simple Pin request by PinId (used by delete and like requests) |
||
114 | * |
||
115 | * @param int $pinId |
||
116 | * @return array |
||
117 | */ |
||
118 | public static function createSimplePinRequest($pinId) |
||
124 | |||
125 | /** |
||
126 | * @param string|null $sourceUrl |
||
127 | * @param array $data |
||
128 | * @return array |
||
129 | */ |
||
130 | public static function createPinRequestData($data, $sourceUrl = null) |
||
139 | |||
140 | /** |
||
141 | * @param $pinId |
||
142 | * @param array $options |
||
143 | * @return array |
||
144 | */ |
||
145 | public static function createPinIdRequest($pinId, $options = array()) |
||
149 | } |
||
150 |