Commit Graph

15 Commits

Author SHA1 Message Date
Harry Yu ec33d328af
feat: Added imageSize and playableDuration to `include` param, deletes isStored (#187)
BREAKING CHANGE: imageSize and playableDuration are no longer included by default to improve performance
2020-06-23 08:45:20 +03:00
Bartol Karuza 4da8310892
feat: Added `include` parameter to getPhotos to let users tradeoff performance by omitting metadata (#178) (#200)
BREAKING CHANGE: meta data is no longer added as default. This applies to `fileName`, `fileSize` and `location`. If you need this metadata use the new `include` parameter. Adding this metadata will slow down the `getPhotos` function, so consider only retrieving this meta data for smaller sets of images as needed, instead of for all images.

* Created getPhotosFast function, fixed inconsistent getPhotos toDate logic

* Fixed wrong param name, added better typechecking

* Added example, renamed allowEmptyFilenames to skipGettingFilenames

* Removed `after` from getPhotosFast docs

* Redid implementation based on a new `include` param

* Updated API to use include parameter

* Fixed flow checking by converting index.ts to Typescript

* Unformatted README.md

* Unformatted README.md

* Unformatted README.md

* Added .prettierignore and ignored README.md for now

* Made example/index.js not checked by Flow

* Updated README.md to include notes in the outputs too

* Made inclusion of fields consistent, addressed other feedback

* Renamed GetPhotosFastParams back to GetPhotosParams

* Updated documentation to reflect nullable types

* Updated typings and documentation for fromTime, toTime

* Updated to fix `hasNextPage` being incorrectly false in some cases

Co-authored-by: Harry Yu <hy.harry.yu@gmail.com>
2020-06-16 13:20:51 +03:00
Bartol Karuza e65e1f208b
fix: Revert "feat: Added `include` parameter to getPhotos to let users tradeoff performance by omitting metadata (#178)" (#199) 2020-06-16 13:05:12 +03:00
Harry Yu e54a6afa8b
feat: Added `include` parameter to getPhotos to let users tradeoff performance by omitting metadata (#178)
* Created getPhotosFast function, fixed inconsistent getPhotos toDate logic

* Fixed wrong param name, added better typechecking

* Added example, renamed allowEmptyFilenames to skipGettingFilenames

* Removed `after` from getPhotosFast docs

* Redid implementation based on a new `include` param

* Updated API to use include parameter

* Fixed flow checking by converting index.ts to Typescript

* Unformatted README.md

* Unformatted README.md

* Unformatted README.md

* Added .prettierignore and ignored README.md for now

* Made example/index.js not checked by Flow

* Updated README.md to include notes in the outputs too

* Made inclusion of fields consistent, addressed other feedback

* Renamed GetPhotosFastParams back to GetPhotosParams

* Updated documentation to reflect nullable types

* Updated typings and documentation for fromTime, toTime

* Updated to fix `hasNextPage` being incorrectly false in some cases
2020-06-16 12:07:25 +03:00
Antonio Gallo e7cf8665d4
feat: Added fileSize for getPhotos API (#180)
Co-authored-by: Antonio Gallo <antgallo@amazon.com>
2020-05-20 20:35:59 +03:00
Tuan Luong fc1855e001
feat: get album list (#139) 2020-02-08 11:17:56 +08:00
Kevin Brown b49dc8e631
fix: Making Promise return types consistent across iOS and Android, updating types to match. (#137) 2020-02-05 17:21:59 +08:00
Tuan Luong 75b4208474
feat: Support filter media items between dates (#140)
* Update RNCCameraRollManager.m

* Update CameraRollModule.java

* Update README.md

* Update RNCCameraRollManager.m

* Update CameraRoll.d.ts

* Update RNCCameraRollManager.h

* Update CameraRollModule.java

* Update RNCCameraRollManager.m

* update code
2020-02-05 17:20:54 +08:00
Kevin Brown 7850dd538f feat(lib): Moved deletePhotos to use new PHAsset API and added an implementation for Android (#69)
* deletePhotos works in iOS

* Deletion works on Android.

* Removing unnecessary commented out code.

* Updated typescript typings.

* Made readme more accurate based on being able to retrieve failure from the iOS API.

* Let formatter run, also now rejecting the promise when there's any error on deletion on Android.
2019-11-07 14:13:24 +01:00
SimonErm dc00a4f115 feat(lib): save photos or videos to an album
* add option to specify album in saveToCameraRoll and move the optional type param to options

* check platform before setting default value for group types to prevent exception

* adjust typings

* update invariant message

* format code

* extract new implementation to function to avoid breaking change

* format code

* add missing spaces

* fix(lib): add accidentally removed savedphotos back to the enum to prevent crash

* chore(lib): formatting

* chore(lib): add doc for the new save method
2019-08-14 21:00:20 +02:00
tomtargosz 7d04a4e1f6 Fix TypeScript error TS1046 2019-08-14 19:14:14 +02:00
Oleg Repin f1a9ed4603 fix typo in ts declarations 2019-04-05 12:25:31 +03:00
Oleg Repin 2b52d760c1 fix typescript declarations 2019-04-03 14:20:54 +03:00
Bartol Karuza 0d1059ef75 fix(js) provide default value for optional ‘assetType’ 2019-03-03 20:46:47 +08:00
Bartol Karuza 0c453b6118 general cleanup
Added typescript binding
Fixed flow type issues
renamed NativeModule to RNCCameraRoll
Added basic jest tests
prettier/lint issues fixed
2019-03-03 14:39:57 +08:00