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

id vs name #8

Closed
hatemhosny opened this issue Jun 20, 2024 · 4 comments · Fixed by #9
Closed

id vs name #8

hatemhosny opened this issue Jun 20, 2024 · 4 comments · Fixed by #9

Comments

@hatemhosny
Copy link

hatemhosny commented Jun 20, 2024

I'm not sure id and name behave as documented.

Example from API docs on README:

const store = new ObjectStore();
const file = store.createFile("file_id", { name: "foo.txt", content: "Foo", parentId: "folder_id" });

console.log(file);
/*
{
    id: "file_id",
    name: "foo.txt",
    type: "file",
    parent_id: "parent_id",
    created_at: "2022-10-20T12:00:00Z",
    modified_at: "2022-10-20T12:00:00Z",
}
*/

However, when running I get this:

{
  id: "1",
  name: "file_id",
  type: "file",
  parent_id: "0",
  created_at: "2024-06-20T10:43:33.455Z",
  modified_at: "2024-06-20T10:43:33.455Z",
  size: 3,
}

demo: https://livecodes.io/?x=id/dmxf2mysgqv

@nzakas nzakas closed this as completed in d1064e0 Jun 20, 2024
@nzakas
Copy link
Contributor

nzakas commented Jun 20, 2024

Just a documentation error. Too much copy-pasting.

@hatemhosny
Copy link
Author

Code samples now work very well.
Demo: https://livecodes.io/?x=id/8x8devpzvvs

Thank you for the nice project.

P.S. you may also want to add docs for getFolder and updateFolder

Thank you.

@nzakas
Copy link
Contributor

nzakas commented Jun 20, 2024

@hatemhosny documentation PRs gratefully accepted. 😄

@hatemhosny
Copy link
Author

I will 😊
Thank you.

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

Successfully merging a pull request may close this issue.

2 participants