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
/
PhotoSets.hs
71 lines (56 loc) · 2.31 KB
/
PhotoSets.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
63
64
65
66
67
68
69
70
71
module Web.Zenfolio.PhotoSets (
createPhotoSet,
deletePhotoSet,
getPopularSets,
getRecentSets,
loadPhotoSet,
movePhotoSet,
reorderPhotoSet,
searchSetByCategory,
searchSetByText,
setPhotoSetTitlePhoto,
setPhotoSetFeaturedIndex,
updatePhotoSet,
updatePhotoSetAccess,
newUpdater
) where
import Web.Zenfolio.Auth (updatePhotoSetAccess)
import Web.Zenfolio.Monad (ZM)
import Web.Zenfolio.RPC (zfRemote)
import Web.Zenfolio.Types (Void, GroupID, GroupIndex, PhotoSet, PhotoSetID,
PhotoSetType, PhotoSetUpdater(..), PhotoID,
ShiftOrder, SearchID, PhotoSetResult, SortOrder, CategoryID)
createPhotoSet :: GroupID -> PhotoSetType -> PhotoSetUpdater -> ZM PhotoSet
createPhotoSet = zfRemote "CreatePhotoSet"
deletePhotoSet :: PhotoSetID -> ZM Void
deletePhotoSet = zfRemote "DeletePhotoSet"
getPopularSets :: PhotoSetType -> Int -> Int -> ZM [PhotoSet]
getPopularSets = zfRemote "GetPopularSets"
getRecentSets :: PhotoSetType -> Int -> Int -> ZM [PhotoSet]
getRecentSets = zfRemote "GetRecentSets"
loadPhotoSet :: PhotoSetID -> ZM PhotoSet
loadPhotoSet = zfRemote "LoadPhotoSet"
movePhotoSet :: PhotoSetID -> GroupID -> GroupIndex -> ZM Void
movePhotoSet = zfRemote "MovePhotoSet"
reorderPhotoSet :: PhotoSetID -> ShiftOrder -> ZM Void
reorderPhotoSet = zfRemote "ReorderPhotoSet"
searchSetByCategory :: SearchID -> PhotoSetType -> SortOrder -> CategoryID
-> Int -> Int -> ZM PhotoSetResult
searchSetByCategory = zfRemote "SearchSetByCategory"
searchSetByText :: SearchID -> PhotoSetType -> SortOrder -> String
-> Int -> Int -> ZM PhotoSetResult
searchSetByText = zfRemote "SearchSetByText"
setPhotoSetFeaturedIndex :: PhotoSetID -> GroupIndex -> ZM Void
setPhotoSetFeaturedIndex = zfRemote "SetPhotoSetFeaturedIndex"
setPhotoSetTitlePhoto :: PhotoSetID -> PhotoID -> ZM Void
setPhotoSetTitlePhoto = zfRemote "SetPhotoSetTitlePhoto"
updatePhotoSet :: PhotoSetID -> PhotoSetUpdater -> ZM PhotoSet
updatePhotoSet = zfRemote "UpdatePhotoSet"
newUpdater :: PhotoSetUpdater
newUpdater = PhotoSetUpdater {
psuTitle = Nothing,
psuCaption = Nothing,
psuKeywords = Nothing,
psuCategories = Nothing,
psuCustomReference = Nothing
}