summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/SevereCloud/vksdk/v2/api/photos.go
blob: d52cbeedbf58812bfa571fa2ee42fe02da5a64c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
package api // import "github.com/SevereCloud/vksdk/v2/api"

import (
	"github.com/SevereCloud/vksdk/v2/object"
)

// PhotosConfirmTag confirms a tag on a photo.
//
// https://vk.com/dev/photos.confirmTag
func (vk *VK) PhotosConfirmTag(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.confirmTag", &response, params)
	return
}

// PhotosCopy allows to copy a photo to the "Saved photos" album.
//
// https://vk.com/dev/photos.copy
func (vk *VK) PhotosCopy(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.copy", &response, params)
	return
}

// PhotosCreateAlbumResponse struct.
type PhotosCreateAlbumResponse object.PhotosPhotoAlbumFull

// PhotosCreateAlbum creates an empty photo album.
//
// https://vk.com/dev/photos.createAlbum
func (vk *VK) PhotosCreateAlbum(params Params) (response PhotosCreateAlbumResponse, err error) {
	err = vk.RequestUnmarshal("photos.createAlbum", &response, params)
	return
}

// PhotosCreateComment adds a new comment on the photo.
//
// https://vk.com/dev/photos.createComment
func (vk *VK) PhotosCreateComment(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.createComment", &response, params)
	return
}

// PhotosDelete deletes a photo.
//
// https://vk.com/dev/photos.delete
func (vk *VK) PhotosDelete(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.delete", &response, params)
	return
}

// PhotosDeleteAlbum deletes a photo album belonging to the current user.
//
// https://vk.com/dev/photos.deleteAlbum
func (vk *VK) PhotosDeleteAlbum(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.deleteAlbum", &response, params)
	return
}

// PhotosDeleteComment deletes a comment on the photo.
//
// https://vk.com/dev/photos.deleteComment
func (vk *VK) PhotosDeleteComment(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.deleteComment", &response, params)
	return
}

// PhotosEdit edits the caption of a photo.
//
// https://vk.com/dev/photos.edit
func (vk *VK) PhotosEdit(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.edit", &response, params)
	return
}

// PhotosEditAlbum edits information about a photo album.
//
// https://vk.com/dev/photos.editAlbum
func (vk *VK) PhotosEditAlbum(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.editAlbum", &response, params)
	return
}

// PhotosEditComment edits a comment on a photo.
//
// https://vk.com/dev/photos.editComment
func (vk *VK) PhotosEditComment(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.editComment", &response, params)
	return
}

// PhotosGetResponse struct.
type PhotosGetResponse struct {
	Count int                  `json:"count"` // Total number
	Items []object.PhotosPhoto `json:"items"`
}

// PhotosGet returns a list of a user's or community's photos.
//
// 	extended=0
//
// https://vk.com/dev/photos.get
func (vk *VK) PhotosGet(params Params) (response PhotosGetResponse, err error) {
	err = vk.RequestUnmarshal("photos.get", &response, params, Params{"extended": false})

	return
}

// PhotosGetExtendedResponse struct.
type PhotosGetExtendedResponse struct {
	Count int                      `json:"count"` // Total number
	Items []object.PhotosPhotoFull `json:"items"`
}

// PhotosGetExtended returns a list of a user's or community's photos.
//
// 	extended=1
//
// https://vk.com/dev/photos.get
func (vk *VK) PhotosGetExtended(params Params) (response PhotosGetExtendedResponse, err error) {
	err = vk.RequestUnmarshal("photos.get", &response, params, Params{"extended": true})

	return
}

// PhotosGetAlbumsResponse struct.
type PhotosGetAlbumsResponse struct {
	Count int                           `json:"count"` // Total number
	Items []object.PhotosPhotoAlbumFull `json:"items"`
}

// PhotosGetAlbums returns a list of a user's or community's photo albums.
//
// https://vk.com/dev/photos.getAlbums
func (vk *VK) PhotosGetAlbums(params Params) (response PhotosGetAlbumsResponse, err error) {
	err = vk.RequestUnmarshal("photos.getAlbums", &response, params)
	return
}

// PhotosGetAlbumsCount returns the number of photo albums belonging to a user or community.
//
// https://vk.com/dev/photos.getAlbumsCount
func (vk *VK) PhotosGetAlbumsCount(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.getAlbumsCount", &response, params)
	return
}

// PhotosGetAllResponse struct.
type PhotosGetAllResponse struct {
	Count int                               `json:"count"` // Total number
	Items []object.PhotosPhotoXtrRealOffset `json:"items"`
	More  object.BaseBoolInt                `json:"more"` // Information whether next page is presented
}

// PhotosGetAll returns a list of photos belonging to a user or community, in reverse chronological order.
//
// 	extended=0
//
// https://vk.com/dev/photos.getAll
func (vk *VK) PhotosGetAll(params Params) (response PhotosGetAllResponse, err error) {
	err = vk.RequestUnmarshal("photos.getAll", &response, params, Params{"extended": false})

	return
}

// PhotosGetAllExtendedResponse struct.
type PhotosGetAllExtendedResponse struct {
	Count int                                   `json:"count"` // Total number
	Items []object.PhotosPhotoFullXtrRealOffset `json:"items"`
	More  object.BaseBoolInt                    `json:"more"` // Information whether next page is presented
}

// PhotosGetAllExtended returns a list of photos belonging to a user or community, in reverse chronological order.
//
// 	extended=1
//
// https://vk.com/dev/photos.getAll
func (vk *VK) PhotosGetAllExtended(params Params) (response PhotosGetAllExtendedResponse, err error) {
	err = vk.RequestUnmarshal("photos.getAll", &response, params, Params{"extended": true})

	return
}

// PhotosGetAllCommentsResponse struct.
type PhotosGetAllCommentsResponse struct {
	Count int                          `json:"count"` // Total number
	Items []object.PhotosCommentXtrPid `json:"items"`
}

// PhotosGetAllComments returns a list of comments on a specific
// photo album or all albums of the user sorted in reverse chronological order.
//
// https://vk.com/dev/photos.getAllComments
func (vk *VK) PhotosGetAllComments(params Params) (response PhotosGetAllCommentsResponse, err error) {
	err = vk.RequestUnmarshal("photos.getAllComments", &response, params)
	return
}

// PhotosGetByIDResponse struct.
type PhotosGetByIDResponse []object.PhotosPhoto

// PhotosGetByID returns information about photos by their IDs.
//
// 	extended=0
//
// https://vk.com/dev/photos.getById
func (vk *VK) PhotosGetByID(params Params) (response PhotosGetByIDResponse, err error) {
	err = vk.RequestUnmarshal("photos.getById", &response, params, Params{"extended": false})

	return
}

// PhotosGetByIDExtendedResponse struct.
type PhotosGetByIDExtendedResponse []object.PhotosPhotoFull

// PhotosGetByIDExtended returns information about photos by their IDs.
//
// 	extended=1
//
// https://vk.com/dev/photos.getById
func (vk *VK) PhotosGetByIDExtended(params Params) (response PhotosGetByIDExtendedResponse, err error) {
	err = vk.RequestUnmarshal("photos.getById", &response, params, Params{"extended": true})

	return
}

// PhotosGetChatUploadServerResponse struct.
type PhotosGetChatUploadServerResponse struct {
	UploadURL string `json:"upload_url"`
}

// PhotosGetChatUploadServer returns an upload link for chat cover pictures.
//
// https://vk.com/dev/photos.getChatUploadServer
func (vk *VK) PhotosGetChatUploadServer(params Params) (response PhotosGetChatUploadServerResponse, err error) {
	err = vk.RequestUnmarshal("photos.getChatUploadServer", &response, params)
	return
}

// PhotosGetCommentsResponse struct.
type PhotosGetCommentsResponse struct {
	Count      int                      `json:"count"`       // Total number
	RealOffset int                      `json:"real_offset"` // Real offset of the comments
	Items      []object.WallWallComment `json:"items"`
}

// PhotosGetComments returns a list of comments on a photo.
//
// 	extended=0
//
// https://vk.com/dev/photos.getComments
func (vk *VK) PhotosGetComments(params Params) (response PhotosGetCommentsResponse, err error) {
	err = vk.RequestUnmarshal("photos.getComments", &response, params, Params{"extended": false})

	return
}

// PhotosGetCommentsExtendedResponse struct.
type PhotosGetCommentsExtendedResponse struct {
	Count      int                      `json:"count"`       // Total number
	RealOffset int                      `json:"real_offset"` // Real offset of the comments
	Items      []object.WallWallComment `json:"items"`
	Profiles   []object.UsersUser       `json:"profiles"`
	Groups     []object.GroupsGroup     `json:"groups"`
}

// PhotosGetCommentsExtended returns a list of comments on a photo.
//
// 	extended=1
//
// https://vk.com/dev/photos.getComments
func (vk *VK) PhotosGetCommentsExtended(params Params) (response PhotosGetCommentsExtendedResponse, err error) {
	err = vk.RequestUnmarshal("photos.getComments", &response, params, Params{"extended": true})

	return
}

// PhotosGetMarketAlbumUploadServerResponse struct.
type PhotosGetMarketAlbumUploadServerResponse struct {
	UploadURL string `json:"upload_url"`
}

// PhotosGetMarketAlbumUploadServer returns the server address for market album photo upload.
//
// https://vk.com/dev/photos.getMarketAlbumUploadServer
func (vk *VK) PhotosGetMarketAlbumUploadServer(params Params) (
	response PhotosGetMarketAlbumUploadServerResponse,
	err error,
) {
	err = vk.RequestUnmarshal("photos.getMarketAlbumUploadServer", &response, params)
	return
}

// PhotosGetMarketUploadServerResponse struct.
type PhotosGetMarketUploadServerResponse struct {
	UploadURL string `json:"upload_url"`
}

// PhotosGetMarketUploadServer returns the server address for market photo upload.
//
// https://vk.com/dev/photos.getMarketUploadServer
func (vk *VK) PhotosGetMarketUploadServer(params Params) (response PhotosGetMarketUploadServerResponse, err error) {
	err = vk.RequestUnmarshal("photos.getMarketUploadServer", &response, params)
	return
}

// PhotosGetMessagesUploadServerResponse struct.
type PhotosGetMessagesUploadServerResponse struct {
	AlbumID   int    `json:"album_id"`
	UploadURL string `json:"upload_url"`
	UserID    int    `json:"user_id,omitempty"`
	GroupID   int    `json:"group_id,omitempty"`
}

// PhotosGetMessagesUploadServer returns the server address for photo upload onto a messages.
//
// https://vk.com/dev/photos.getMessagesUploadServer
func (vk *VK) PhotosGetMessagesUploadServer(params Params) (response PhotosGetMessagesUploadServerResponse, err error) {
	err = vk.RequestUnmarshal("photos.getMessagesUploadServer", &response, params)
	return
}

// PhotosGetNewTagsResponse struct.
type PhotosGetNewTagsResponse struct {
	Count int                            `json:"count"` // Total number
	Items []object.PhotosPhotoXtrTagInfo `json:"items"`
}

// PhotosGetNewTags returns a list of photos with tags that have not been viewed.
//
// https://vk.com/dev/photos.getNewTags
func (vk *VK) PhotosGetNewTags(params Params) (response PhotosGetNewTagsResponse, err error) {
	err = vk.RequestUnmarshal("photos.getNewTags", &response, params)
	return
}

// PhotosGetOwnerCoverPhotoUploadServerResponse struct.
type PhotosGetOwnerCoverPhotoUploadServerResponse struct {
	UploadURL string `json:"upload_url"`
}

// PhotosGetOwnerCoverPhotoUploadServer receives server address for uploading community cover.
//
// https://vk.com/dev/photos.getOwnerCoverPhotoUploadServer
func (vk *VK) PhotosGetOwnerCoverPhotoUploadServer(params Params) (
	response PhotosGetOwnerCoverPhotoUploadServerResponse,
	err error,
) {
	err = vk.RequestUnmarshal("photos.getOwnerCoverPhotoUploadServer", &response, params)
	return
}

// PhotosGetOwnerPhotoUploadServerResponse struct.
type PhotosGetOwnerPhotoUploadServerResponse struct {
	UploadURL string `json:"upload_url"`
}

// PhotosGetOwnerPhotoUploadServer returns an upload server address for a
// profile or community photo.
//
// https://vk.com/dev/photos.getOwnerPhotoUploadServer
func (vk *VK) PhotosGetOwnerPhotoUploadServer(params Params) (
	response PhotosGetOwnerPhotoUploadServerResponse,
	err error,
) {
	err = vk.RequestUnmarshal("photos.getOwnerPhotoUploadServer", &response, params)
	return
}

// PhotosGetTagsResponse struct.
type PhotosGetTagsResponse []object.PhotosPhotoTag

// PhotosGetTags returns a list of tags on a photo.
//
// https://vk.com/dev/photos.getTags
func (vk *VK) PhotosGetTags(params Params) (response PhotosGetTagsResponse, err error) {
	err = vk.RequestUnmarshal("photos.getTags", &response, params)
	return
}

// PhotosGetUploadServerResponse struct.
type PhotosGetUploadServerResponse object.PhotosPhotoUpload

// PhotosGetUploadServer returns the server address for photo upload.
//
// https://vk.com/dev/photos.getUploadServer
func (vk *VK) PhotosGetUploadServer(params Params) (response PhotosGetUploadServerResponse, err error) {
	err = vk.RequestUnmarshal("photos.getUploadServer", &response, params)
	return
}

// PhotosGetUserPhotosResponse struct.
type PhotosGetUserPhotosResponse struct {
	Count int                  `json:"count"` // Total number
	Items []object.PhotosPhoto `json:"items"`
}

// PhotosGetUserPhotos returns a list of photos in which a user is tagged.
//
// 	extended=0
//
// https://vk.com/dev/photos.getUserPhotos
func (vk *VK) PhotosGetUserPhotos(params Params) (response PhotosGetUserPhotosResponse, err error) {
	err = vk.RequestUnmarshal("photos.getUserPhotos", &response, params, Params{"extended": false})

	return
}

// PhotosGetUserPhotosExtendedResponse struct.
type PhotosGetUserPhotosExtendedResponse struct {
	Count int                      `json:"count"` // Total number
	Items []object.PhotosPhotoFull `json:"items"`
}

// PhotosGetUserPhotosExtended returns a list of photos in which a user is tagged.
//
// 	extended=1
//
// https://vk.com/dev/photos.getUserPhotos
func (vk *VK) PhotosGetUserPhotosExtended(params Params) (response PhotosGetUserPhotosExtendedResponse, err error) {
	err = vk.RequestUnmarshal("photos.getUserPhotos", &response, params, Params{"extended": true})

	return
}

// PhotosGetWallUploadServerResponse struct.
type PhotosGetWallUploadServerResponse object.PhotosPhotoUpload

// PhotosGetWallUploadServer returns the server address for photo upload onto a user's wall.
//
// https://vk.com/dev/photos.getWallUploadServer
func (vk *VK) PhotosGetWallUploadServer(params Params) (response PhotosGetWallUploadServerResponse, err error) {
	err = vk.RequestUnmarshal("photos.getWallUploadServer", &response, params)
	return
}

// PhotosMakeCover makes a photo into an album cover.
//
// https://vk.com/dev/photos.makeCover
func (vk *VK) PhotosMakeCover(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.makeCover", &response, params)
	return
}

// PhotosMove a photo from one album to another.
//
// https://vk.com/dev/photos.moveMoves
func (vk *VK) PhotosMove(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.move", &response, params)
	return
}

// PhotosPutTag adds a tag on the photo.
//
// https://vk.com/dev/photos.putTag
func (vk *VK) PhotosPutTag(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.putTag", &response, params)
	return
}

// PhotosRemoveTag removes a tag from a photo.
//
// https://vk.com/dev/photos.removeTag
func (vk *VK) PhotosRemoveTag(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.removeTag", &response, params)
	return
}

// PhotosReorderAlbums reorders the album in the list of user albums.
//
// https://vk.com/dev/photos.reorderAlbums
func (vk *VK) PhotosReorderAlbums(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.reorderAlbums", &response, params)
	return
}

// PhotosReorderPhotos reorders the photo in the list of photos of the user album.
//
// https://vk.com/dev/photos.reorderPhotos
func (vk *VK) PhotosReorderPhotos(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.reorderPhotos", &response, params)
	return
}

// PhotosReport reports (submits a complaint about) a photo.
//
// https://vk.com/dev/photos.report
func (vk *VK) PhotosReport(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.report", &response, params)
	return
}

// PhotosReportComment reports (submits a complaint about) a comment on a photo.
//
// https://vk.com/dev/photos.reportComment
func (vk *VK) PhotosReportComment(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.reportComment", &response, params)
	return
}

// PhotosRestore restores a deleted photo.
//
// https://vk.com/dev/photos.restore
func (vk *VK) PhotosRestore(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.restore", &response, params)
	return
}

// PhotosRestoreComment restores a deleted comment on a photo.
//
// https://vk.com/dev/photos.restoreComment
func (vk *VK) PhotosRestoreComment(params Params) (response int, err error) {
	err = vk.RequestUnmarshal("photos.restoreComment", &response, params)
	return
}

// PhotosSaveResponse struct.
type PhotosSaveResponse []object.PhotosPhoto

// PhotosSave saves photos after successful uploading.
//
// https://vk.com/dev/photos.save
func (vk *VK) PhotosSave(params Params) (response PhotosSaveResponse, err error) {
	err = vk.RequestUnmarshal("photos.save", &response, params)
	return
}

// PhotosSaveMarketAlbumPhotoResponse struct.
type PhotosSaveMarketAlbumPhotoResponse []object.PhotosPhoto

// PhotosSaveMarketAlbumPhoto photo Saves market album photos after successful uploading.
//
// https://vk.com/dev/photos.saveMarketAlbumPhoto
func (vk *VK) PhotosSaveMarketAlbumPhoto(params Params) (response PhotosSaveMarketAlbumPhotoResponse, err error) {
	err = vk.RequestUnmarshal("photos.saveMarketAlbumPhoto", &response, params)
	return
}

// PhotosSaveMarketPhotoResponse struct.
type PhotosSaveMarketPhotoResponse []object.PhotosPhoto

// PhotosSaveMarketPhoto saves market photos after successful uploading.
//
// https://vk.com/dev/photos.saveMarketPhoto
func (vk *VK) PhotosSaveMarketPhoto(params Params) (response PhotosSaveMarketPhotoResponse, err error) {
	err = vk.RequestUnmarshal("photos.saveMarketPhoto", &response, params)
	return
}

// PhotosSaveMessagesPhotoResponse struct.
type PhotosSaveMessagesPhotoResponse []object.PhotosPhoto

// PhotosSaveMessagesPhoto saves a photo after being successfully.
//
// https://vk.com/dev/photos.saveMessagesPhoto
func (vk *VK) PhotosSaveMessagesPhoto(params Params) (response PhotosSaveMessagesPhotoResponse, err error) {
	err = vk.RequestUnmarshal("photos.saveMessagesPhoto", &response, params)
	return
}

// PhotosSaveOwnerCoverPhotoResponse struct.
type PhotosSaveOwnerCoverPhotoResponse struct {
	Images []object.PhotosImage `json:"images"`
}

// PhotosSaveOwnerCoverPhoto saves cover photo after successful uploading.
//
// https://vk.com/dev/photos.saveOwnerCoverPhoto
func (vk *VK) PhotosSaveOwnerCoverPhoto(params Params) (response PhotosSaveOwnerCoverPhotoResponse, err error) {
	err = vk.RequestUnmarshal("photos.saveOwnerCoverPhoto", &response, params)
	return
}

// PhotosSaveOwnerPhotoResponse struct.
type PhotosSaveOwnerPhotoResponse struct {
	PhotoHash string `json:"photo_hash"`
	// BUG(VK): returns false
	// PhotoSrc      string `json:"photo_src"`
	// PhotoSrcBig   string `json:"photo_src_big"`
	// PhotoSrcSmall string `json:"photo_src_small"`
	Saved  int `json:"saved"`
	PostID int `json:"post_id"`
}

// PhotosSaveOwnerPhoto saves a profile or community photo.
//
// https://vk.com/dev/photos.saveOwnerPhoto
func (vk *VK) PhotosSaveOwnerPhoto(params Params) (response PhotosSaveOwnerPhotoResponse, err error) {
	err = vk.RequestUnmarshal("photos.saveOwnerPhoto", &response, params)
	return
}

// PhotosSaveWallPhotoResponse struct.
type PhotosSaveWallPhotoResponse []object.PhotosPhoto

// PhotosSaveWallPhoto saves a photo to a user's or community's wall after being uploaded.
//
// https://vk.com/dev/photos.saveWallPhoto
func (vk *VK) PhotosSaveWallPhoto(params Params) (response PhotosSaveWallPhotoResponse, err error) {
	err = vk.RequestUnmarshal("photos.saveWallPhoto", &response, params)
	return
}

// PhotosSearchResponse struct.
type PhotosSearchResponse struct {
	Count int                      `json:"count"` // Total number
	Items []object.PhotosPhotoFull `json:"items"`
}

// PhotosSearch returns a list of photos.
//
// https://vk.com/dev/photos.search
func (vk *VK) PhotosSearch(params Params) (response PhotosSearchResponse, err error) {
	err = vk.RequestUnmarshal("photos.search", &response, params)
	return
}