packages feed

gogol-drive 0.1.0 → 0.1.1

raw patch · 8 files changed

+123/−37 lines, 8 filesdep ~gogol-corePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: gogol-core

API changes (from Hackage documentation)

+ Network.Google.Drive: pExpirationTime :: Lens' Permission (Maybe UTCTime)
+ Network.Google.Drive: rllNextPageToken :: Lens' RevisionList (Maybe Text)
+ Network.Google.Drive.Types: pExpirationTime :: Lens' Permission (Maybe UTCTime)
+ Network.Google.Drive.Types: rllNextPageToken :: Lens' RevisionList (Maybe Text)
+ Network.Google.Resource.Drive.Permissions.Update: puRemoveExpiration :: Lens' PermissionsUpdate Bool
+ Network.Google.Resource.Drive.Revisions.List: rllPageSize :: Lens' RevisionsList (Maybe Int32)
+ Network.Google.Resource.Drive.Revisions.List: rllPageToken :: Lens' RevisionsList (Maybe Text)
- Network.Google.Resource.Drive.Permissions.Update: type PermissionsUpdateResource = "drive" :> ("v3" :> ("files" :> (Capture "fileId" Text :> ("permissions" :> (Capture "permissionId" Text :> (QueryParam "transferOwnership" Bool :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Permission :> Patch '[JSON] Permission))))))))
+ Network.Google.Resource.Drive.Permissions.Update: type PermissionsUpdateResource = "drive" :> ("v3" :> ("files" :> (Capture "fileId" Text :> ("permissions" :> (Capture "permissionId" Text :> (QueryParam "removeExpiration" Bool :> (QueryParam "transferOwnership" Bool :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Permission :> Patch '[JSON] Permission)))))))))
- Network.Google.Resource.Drive.Revisions.List: type RevisionsListResource = "drive" :> ("v3" :> ("files" :> (Capture "fileId" Text :> ("revisions" :> (QueryParam "alt" AltJSON :> Get '[JSON] RevisionList)))))
+ Network.Google.Resource.Drive.Revisions.List: type RevisionsListResource = "drive" :> ("v3" :> ("files" :> (Capture "fileId" Text :> ("revisions" :> (QueryParam "pageToken" Text :> (QueryParam "pageSize" (Textual Int32) :> (QueryParam "alt" AltJSON :> Get '[JSON] RevisionList)))))))

Files

README.md view
@@ -8,7 +8,7 @@  ## Version -`0.1.0`+`0.1.1`   ## Description
gen/Network/Google/Drive.hs view
@@ -379,6 +379,7 @@     , pDisplayName     , pId     , pType+    , pExpirationTime      -- ** File     , File@@ -445,6 +446,7 @@     -- ** RevisionList     , RevisionList     , revisionList+    , rllNextPageToken     , rllKind     , rllRevisions 
gen/Network/Google/Drive/Types.hs view
@@ -267,6 +267,7 @@     , pDisplayName     , pId     , pType+    , pExpirationTime      -- * File     , File@@ -333,6 +334,7 @@     -- * RevisionList     , RevisionList     , revisionList+    , rllNextPageToken     , rllKind     , rllRevisions 
gen/Network/Google/Drive/Types/Product.hs view
@@ -54,7 +54,8 @@   = lens _flNextPageToken       (\ s a -> s{_flNextPageToken = a}) --- | This is always drive#fileList.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#fileList\". flKind :: Lens' FileList Text flKind = lens _flKind (\ s a -> s{_flKind = a}) @@ -276,7 +277,8 @@   = lens _rCreatedTime (\ s a -> s{_rCreatedTime = a})       . mapping _DateTime --- | This is always drive#reply.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#reply\". rKind :: Lens' Reply Text rKind = lens _rKind (\ s a -> s{_rKind = a}) @@ -479,7 +481,8 @@   = lens _rlNextPageToken       (\ s a -> s{_rlNextPageToken = a}) --- | This is always drive#replyList.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#replyList\". rlKind :: Lens' ReplyList Text rlKind = lens _rlKind (\ s a -> s{_rlKind = a}) @@ -833,7 +836,8 @@   = lens _chaTime (\ s a -> s{_chaTime = a}) .       mapping _DateTime --- | This is always drive#change.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#change\". chaKind :: Lens' Change Text chaKind = lens _chaKind (\ s a -> s{_chaKind = a}) @@ -946,7 +950,8 @@ uMe :: Lens' User (Maybe Bool) uMe = lens _uMe (\ s a -> s{_uMe = a}) --- | This is always drive#user.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#user\". uKind :: Lens' User Text uKind = lens _uKind (\ s a -> s{_uKind = a}) @@ -1042,7 +1047,8 @@       _Default       . _Coerce --- | This is always drive#changeList.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#changeList\". clKind :: Lens' ChangeList Text clKind = lens _clKind (\ s a -> s{_clKind = a}) @@ -1287,7 +1293,8 @@   = lens _aImportFormats       (\ s a -> s{_aImportFormats = a}) --- | This is always drive#about.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#about\". aKind :: Lens' About Text aKind = lens _aKind (\ s a -> s{_aKind = a}) @@ -1438,7 +1445,8 @@     , _sptStartPageToken = Nothing     } --- | This is always drive#startPageToken.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#startPageToken\". sptKind :: Lens' StartPageToken Text sptKind = lens _sptKind (\ s a -> s{_sptKind = a}) @@ -1825,7 +1833,8 @@       (\ s a -> s{_comCreatedTime = a})       . mapping _DateTime --- | This is always drive#comment.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#comment\". comKind :: Lens' Comment Text comKind = lens _comKind (\ s a -> s{_comKind = a}) @@ -1993,7 +2002,8 @@   = lens _revOriginalFilename       (\ s a -> s{_revOriginalFilename = a}) --- | This is always drive#revision.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#revision\". revKind :: Lens' Revision Text revKind = lens _revKind (\ s a -> s{_revKind = a}) @@ -2098,6 +2108,7 @@     , _pDisplayName        :: !(Maybe Text)     , _pId                 :: !(Maybe Text)     , _pType               :: !(Maybe Text)+    , _pExpirationTime     :: !(Maybe DateTime')     } deriving (Eq,Show,Data,Typeable,Generic)  -- | Creates a value of 'Permission' with the minimum fields required to make a request.@@ -2121,6 +2132,8 @@ -- * 'pId' -- -- * 'pType'+--+-- * 'pExpirationTime' permission     :: Permission permission =@@ -2134,6 +2147,7 @@     , _pDisplayName = Nothing     , _pId = Nothing     , _pType = Nothing+    , _pExpirationTime = Nothing     }  -- | A link to the user\'s profile photo, if available.@@ -2141,7 +2155,8 @@ pPhotoLink   = lens _pPhotoLink (\ s a -> s{_pPhotoLink = a}) --- | This is always drive#permission.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#permission\". pKind :: Lens' Permission Text pKind = lens _pKind (\ s a -> s{_pKind = a}) @@ -2182,6 +2197,13 @@ pType :: Lens' Permission (Maybe Text) pType = lens _pType (\ s a -> s{_pType = a}) +-- | The time at which this permission will expire (RFC 3339 date-time).+pExpirationTime :: Lens' Permission (Maybe UTCTime)+pExpirationTime+  = lens _pExpirationTime+      (\ s a -> s{_pExpirationTime = a})+      . mapping _DateTime+ instance FromJSON Permission where         parseJSON           = withObject "Permission"@@ -2195,7 +2217,8 @@                      <*> (o .:? "allowFileDiscovery")                      <*> (o .:? "displayName")                      <*> (o .:? "id")-                     <*> (o .:? "type"))+                     <*> (o .:? "type")+                     <*> (o .:? "expirationTime"))  instance ToJSON Permission where         toJSON Permission'{..}@@ -2207,7 +2230,8 @@                   ("emailAddress" .=) <$> _pEmailAddress,                   ("allowFileDiscovery" .=) <$> _pAllowFileDiscovery,                   ("displayName" .=) <$> _pDisplayName,-                  ("id" .=) <$> _pId, ("type" .=) <$> _pType])+                  ("id" .=) <$> _pId, ("type" .=) <$> _pType,+                  ("expirationTime" .=) <$> _pExpirationTime])  -- | The metadata for a file. --@@ -2497,7 +2521,8 @@   = lens _fOriginalFilename       (\ s a -> s{_fOriginalFilename = a}) --- | This is always drive#file.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#file\". fKind :: Lens' File Text fKind = lens _fKind (\ s a -> s{_fKind = a}) @@ -2821,7 +2846,8 @@ giSpace :: Lens' GeneratedIds (Maybe Text) giSpace = lens _giSpace (\ s a -> s{_giSpace = a}) --- | This is always drive#generatedIds+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#generatedIds\". giKind :: Lens' GeneratedIds Text giKind = lens _giKind (\ s a -> s{_giKind = a}) @@ -2881,7 +2907,8 @@   = lens _cllNextPageToken       (\ s a -> s{_cllNextPageToken = a}) --- | This is always drive#commentList.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#commentList\". cllKind :: Lens' CommentList Text cllKind = lens _cllKind (\ s a -> s{_cllKind = a}) @@ -2913,14 +2940,17 @@ -- -- /See:/ 'revisionList' smart constructor. data RevisionList = RevisionList'-    { _rllKind      :: !Text-    , _rllRevisions :: !(Maybe [Revision])+    { _rllNextPageToken :: !(Maybe Text)+    , _rllKind          :: !Text+    , _rllRevisions     :: !(Maybe [Revision])     } deriving (Eq,Show,Data,Typeable,Generic)  -- | Creates a value of 'RevisionList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: --+-- * 'rllNextPageToken'+-- -- * 'rllKind' -- -- * 'rllRevisions'@@ -2928,11 +2958,20 @@     :: RevisionList revisionList =     RevisionList'-    { _rllKind = "drive#revisionList"+    { _rllNextPageToken = Nothing+    , _rllKind = "drive#revisionList"     , _rllRevisions = Nothing     } --- | This is always drive#revisionList.+-- | The page token for the next page of revisions. This will be absent if+-- the end of the revisions list has been reached.+rllNextPageToken :: Lens' RevisionList (Maybe Text)+rllNextPageToken+  = lens _rllNextPageToken+      (\ s a -> s{_rllNextPageToken = a})++-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#revisionList\". rllKind :: Lens' RevisionList Text rllKind = lens _rllKind (\ s a -> s{_rllKind = a}) @@ -2948,14 +2987,16 @@           = withObject "RevisionList"               (\ o ->                  RevisionList' <$>-                   (o .:? "kind" .!= "drive#revisionList") <*>-                     (o .:? "revisions" .!= mempty))+                   (o .:? "nextPageToken") <*>+                     (o .:? "kind" .!= "drive#revisionList")+                     <*> (o .:? "revisions" .!= mempty))  instance ToJSON RevisionList where         toJSON RevisionList'{..}           = object               (catMaybes-                 [Just ("kind" .= _rllKind),+                 [("nextPageToken" .=) <$> _rllNextPageToken,+                  Just ("kind" .= _rllKind),                   ("revisions" .=) <$> _rllRevisions])  -- | A list of permissions for a file.@@ -2981,7 +3022,8 @@     , _plPermissions = Nothing     } --- | This is always drive#permissionList.+-- | Identifies what kind of resource this is. Value: the fixed string+-- \"drive#permissionList\". plKind :: Lens' PermissionList Text plKind = lens _plKind (\ s a -> s{_plKind = a}) 
gen/Network/Google/Resource/Drive/Permissions/Update.hs view
@@ -34,6 +34,7 @@      -- * Request Lenses     , puPayload+    , puRemoveExpiration     , puTransferOwnership     , puFileId     , puPermissionId@@ -51,16 +52,18 @@            Capture "fileId" Text :>              "permissions" :>                Capture "permissionId" Text :>-                 QueryParam "transferOwnership" Bool :>-                   QueryParam "alt" AltJSON :>-                     ReqBody '[JSON] Permission :>-                       Patch '[JSON] Permission+                 QueryParam "removeExpiration" Bool :>+                   QueryParam "transferOwnership" Bool :>+                     QueryParam "alt" AltJSON :>+                       ReqBody '[JSON] Permission :>+                         Patch '[JSON] Permission  -- | Updates a permission with patch semantics. -- -- /See:/ 'permissionsUpdate' smart constructor. data PermissionsUpdate = PermissionsUpdate'     { _puPayload           :: !Permission+    , _puRemoveExpiration  :: !Bool     , _puTransferOwnership :: !Bool     , _puFileId            :: !Text     , _puPermissionId      :: !Text@@ -72,6 +75,8 @@ -- -- * 'puPayload' --+-- * 'puRemoveExpiration'+-- -- * 'puTransferOwnership' -- -- * 'puFileId'@@ -85,6 +90,7 @@ permissionsUpdate pPuPayload_ pPuFileId_ pPuPermissionId_ =     PermissionsUpdate'     { _puPayload = pPuPayload_+    , _puRemoveExpiration = False     , _puTransferOwnership = False     , _puFileId = pPuFileId_     , _puPermissionId = pPuPermissionId_@@ -95,6 +101,12 @@ puPayload   = lens _puPayload (\ s a -> s{_puPayload = a}) +-- | Whether to remove the expiration date.+puRemoveExpiration :: Lens' PermissionsUpdate Bool+puRemoveExpiration+  = lens _puRemoveExpiration+      (\ s a -> s{_puRemoveExpiration = a})+ -- | Whether to transfer ownership to the specified user and downgrade the -- current owner to a writer. This parameter is required as an -- acknowledgement of the side effect.@@ -120,6 +132,7 @@                "https://www.googleapis.com/auth/drive.file"]         requestClient PermissionsUpdate'{..}           = go _puFileId _puPermissionId+              (Just _puRemoveExpiration)               (Just _puTransferOwnership)               (Just AltJSON)               _puPayload
gen/Network/Google/Resource/Drive/Revisions/List.hs view
@@ -33,7 +33,9 @@     , RevisionsList      -- * Request Lenses+    , rllPageToken     , rllFileId+    , rllPageSize     ) where  import           Network.Google.Drive.Types@@ -47,33 +49,56 @@          "files" :>            Capture "fileId" Text :>              "revisions" :>-               QueryParam "alt" AltJSON :> Get '[JSON] RevisionList+               QueryParam "pageToken" Text :>+                 QueryParam "pageSize" (Textual Int32) :>+                   QueryParam "alt" AltJSON :> Get '[JSON] RevisionList  -- | Lists a file\'s revisions. -- -- /See:/ 'revisionsList' smart constructor.-newtype RevisionsList = RevisionsList'-    { _rllFileId :: Text+data RevisionsList = RevisionsList'+    { _rllPageToken :: !(Maybe Text)+    , _rllFileId    :: !Text+    , _rllPageSize  :: !(Maybe (Textual Int32))     } deriving (Eq,Show,Data,Typeable,Generic)  -- | Creates a value of 'RevisionsList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: --+-- * 'rllPageToken'+-- -- * 'rllFileId'+--+-- * 'rllPageSize' revisionsList     :: Text -- ^ 'rllFileId'     -> RevisionsList revisionsList pRllFileId_ =     RevisionsList'-    { _rllFileId = pRllFileId_+    { _rllPageToken = Nothing+    , _rllFileId = pRllFileId_+    , _rllPageSize = Nothing     } +-- | The token for continuing a previous list request on the next page. This+-- should be set to the value of \'nextPageToken\' from the previous+-- response.+rllPageToken :: Lens' RevisionsList (Maybe Text)+rllPageToken+  = lens _rllPageToken (\ s a -> s{_rllPageToken = a})+ -- | The ID of the file. rllFileId :: Lens' RevisionsList Text rllFileId   = lens _rllFileId (\ s a -> s{_rllFileId = a}) +-- | The maximum number of revisions to return per page.+rllPageSize :: Lens' RevisionsList (Maybe Int32)+rllPageSize+  = lens _rllPageSize (\ s a -> s{_rllPageSize = a}) .+      mapping _Coerce+ instance GoogleRequest RevisionsList where         type Rs RevisionsList = RevisionList         type Scopes RevisionsList =@@ -85,7 +110,9 @@                "https://www.googleapis.com/auth/drive.photos.readonly",                "https://www.googleapis.com/auth/drive.readonly"]         requestClient RevisionsList'{..}-          = go _rllFileId (Just AltJSON) driveService+          = go _rllFileId _rllPageToken _rllPageSize+              (Just AltJSON)+              driveService           where go                   = buildClient (Proxy :: Proxy RevisionsListResource)                       mempty
gogol-drive.cabal view
@@ -1,5 +1,5 @@ name:                  gogol-drive-version:               0.1.0+version:               0.1.1 synopsis:              Google Drive SDK. homepage:              https://github.com/brendanhay/gogol bug-reports:           https://github.com/brendanhay/gogol/issues@@ -11,7 +11,7 @@ category:              Network, Google, Cloud build-type:            Simple cabal-version:         >= 1.10-extra-source-files:    README.md+extra-source-files:    README.md src/.gitkeep  description:     Manages files in Drive including uploading, downloading, searching,@@ -76,5 +76,5 @@         , Network.Google.Drive.Types.Sum      build-depends:-          gogol-core == 0.1.0.*+          gogol-core == 0.1.1.*         , base       >= 4.7 && < 5
+ src/.gitkeep view