Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to import the API classes (noob) #22

Closed
costa opened this issue Mar 14, 2024 · 5 comments
Closed

How to import the API classes (noob) #22

costa opened this issue Mar 14, 2024 · 5 comments
Assignees

Comments

@costa
Copy link

costa commented Mar 14, 2024

This is probably a noob's question (I've been forced into TS just recently): if I'd like to operate on objects provided by the API, e.g. getPhotos() returning Array<iCloudPhotoAsset> — and I seem to fail to import { iCloudPhotoAsset } from ... anywhere... I really have no idea if it's something I'm missing with TS, or the package might be missing something — the latter seems crazy to me, coming from all the other languages, but I'll appreciate an advice.

@foxt foxt self-assigned this Mar 14, 2024
@foxt
Copy link
Owner

foxt commented Mar 14, 2024

Thanks for catching this, seems like those types arent exported.

@foxt
Copy link
Owner

foxt commented Mar 14, 2024

fixed in 4dc4ea1 / 1.5.1

@foxt foxt closed this as completed Mar 14, 2024
@costa
Copy link
Author

costa commented Mar 16, 2024

Thanks, so, how do I import, say, iCloudPhotoAsset?

@costa
Copy link
Author

costa commented Mar 20, 2024

Thanks, so, how do I import, say, iCloudPhotoAsset?

@foxt ?

@foxt
Copy link
Owner

foxt commented Mar 20, 2024

@costa:

import { iCloudPhotoAsset } from "icloudjs/build/services/photos.js";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants