This repository has been archived by the owner on Aug 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Photos.hs
62 lines (49 loc) · 1.83 KB
/
Photos.hs
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
module Web.Zenfolio.Photos (
deletePhoto,
getPopularPhotos,
getRecentPhotos,
loadPhoto,
movePhoto,
replacePhoto,
rotatePhoto,
searchPhotoByCategory,
searchPhotoByText,
updatePhoto,
updatePhotoAccess,
newUpdater
) where
import Web.Zenfolio.Auth (updatePhotoAccess)
import Web.Zenfolio.Monad (ZM)
import Web.Zenfolio.RPC (zfRemote)
import Web.Zenfolio.Types (Void, Photo, PhotoID, PhotoRotation, PhotoUpdater(..),
PhotoSetID, GroupIndex, SortOrder, CategoryID,
SearchID, PhotoResult)
deletePhoto :: PhotoID -> ZM Void
deletePhoto = zfRemote "DeletePhoto"
getPopularPhotos :: Int -> Int -> ZM [Photo]
getPopularPhotos = zfRemote "GetPopularPhotos"
getRecentPhotos :: Int -> Int -> ZM [Photo]
getRecentPhotos = zfRemote "GetRecentPhotos"
loadPhoto :: PhotoID -> ZM Photo
loadPhoto = zfRemote "LoadPhoto"
movePhoto :: PhotoSetID -> PhotoID -> PhotoSetID -> GroupIndex -> ZM Void
movePhoto = zfRemote "MovePhoto"
replacePhoto :: PhotoID -> PhotoID -> ZM Void
replacePhoto = zfRemote "ReplacePhoto"
rotatePhoto :: PhotoID -> PhotoRotation -> ZM Photo
rotatePhoto = zfRemote "RotatePhoto"
searchPhotoByCategory :: SearchID -> SortOrder -> CategoryID -> Int -> Int -> ZM PhotoResult
searchPhotoByCategory = zfRemote "SearchPhotoByCategory"
searchPhotoByText :: SearchID -> SortOrder -> String -> Int -> Int -> ZM PhotoResult
searchPhotoByText = zfRemote "SearchPhotoByText"
updatePhoto :: PhotoID -> PhotoUpdater -> ZM Photo
updatePhoto = zfRemote "UpdatePhoto"
newUpdater :: PhotoUpdater
newUpdater = PhotoUpdater {
puTitle = Nothing,
puCaption = Nothing,
puKeywords = Nothing,
puCategories = Nothing,
puCopyright = Nothing,
puFileName = Nothing
}