lokalise / node-lokalise-api

Lokalise API v2 Node.js client.

Home Page:https://lokalise.github.io/node-lokalise-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lokaliseApi.queuedProcesses.get

hzpeng57 opened this issue · comments

Describe the bug
This is my code

image

I get error "lokaliseApi.queuedProcesses.get is not a function"

If i change my code to process = await lokaliseApi.queuedProcesses().get(process.process_id, { project_id: projectId });

I will get

running upload success // should show: finish upload success?

in console

It looks like asynchronous functions don't work and the example on the official documentation has an error

https://lokalise.github.io/node-lokalise-api/api/files

To Reproduce
Steps to reproduce the behavior.

Expected behavior
A clear and concise description of what you expected to happen.

Your environment:

  • Node version

Additional context
Add any other context about the problem here.

Hello! I'm sorry you're having issues :( There's a typo in the docs, as we have to write queuedProcesses() with round brackets as shown here https://lokalise.github.io/node-lokalise-api/api/queued-processes I'll fix the docs asap, thank you for reporting this!

I've also prepared a tutorial on this topic, so you might find the following section useful https://lokalise.com/blog/lokalise-apiv2-in-practice/#In_TypeScript-3