crawlee icon indicating copy to clipboard operation
crawlee copied to clipboard

KeyValueStore.getInput() is not correctly documented

Open mnmkng opened this issue 3 years ago • 3 comments

Which package is this bug report for? If unsure which one to select, leave blank

@crawlee/core

Issue description

CleanShot 2022-12-29 at 11 48 04@2x

Code sample

No response

Package version

all

Node.js version

all

Operating system

No response

Apify platform

  • [ ] Tick me if you encountered this issue on the Apify platform

I have tested this on the next release

checked next docs

Other context

No response

mnmkng avatar Dec 29 '22 12:12 mnmkng

That's because it is a static method, the ToC in right sidebar never prints static symbols. We could introduce instance level method with the same name to get around it.

B4nan avatar Dec 30 '22 10:12 B4nan

Maybe the question is, why is it the only function that does not have an instance counterpart?

mnmkng avatar Dec 30 '22 10:12 mnmkng

Because it is basically just a shortcut for reading the INPUT.json file from the project root, the instance method would do exactly the same.

It's indeed more confusing than it should be... Also looking at the SDK API docs, I do see the static methods listed in the ToC...

B4nan avatar Dec 30 '22 10:12 B4nan