Module CameraRoll-BsReactNative
type cursor
;type node
= Js.t({. _type : string, group_name : string, image : Js.t({. filename : string, height : int, isStored : bool, playableDuration : int, uri : string, width : int, }), location : Js.t({. altitude : float, heading : float, latitude : float, longitude : float, speed : float, }), timestamp : float, })
;type assets
= Js.t({. edges : array(Js.t({. node : node, })), page_info : Js.t({. end_cursor : cursor, has_next_page : bool, start_cursor : cursor, }), })
;type fileType
=
;type groupType
=
| All |
| Album |
| Event |
| Faces |
| Library |
| PhotoStream |
| SavedPhotos |
;type assetType
=
;
let saveToCameraRoll : uri:string => ?type_:fileType => unit => Js.Promise.t(Belt.Result.t(string, Js.Promise.error));
let getPhotos : first:int => ?after:cursor => ?groupTypes:groupType => ?groupName:string => ?assetType:assetType => ?mimeTypes:string => unit => Js.Promise.t(assets);