You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest version on npm and when I attempt to run the example in the readme, it dies from a Not Found error. Was there a change in the Lemmy API recently or am I missing something?
PS E:\lemmy_image_downloader_ts\build> node .\test.js
Running script
E:\lemmy_image_downloader_ts\node_modules\.pnpm\[email protected]\node_modules\lemmy-js-client\dist\http.js:1158
throw new Error(response.statusText);
^
Error: Not Found
at LemmyHttp.<anonymous> (E:\lemmy_image_downloader_ts\node_modules\.pnpm\[email protected]\node_modules\lemmy-js-client\dist\http.js:1158:19)
at Generator.throw (<anonymous>)
at rejected (E:\lemmy_image_downloader_ts\node_modules\.pnpm\[email protected]\node_modules\lemmy-js-client\dist\http.js:6:65)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.12.2
PS E:\lemmy_image_downloader_ts\build>
Compiled TS follows
import{LemmyHttp,Login}from"lemmy-js-client";console.log("Running script");// Build the clientconstbaseUrl="https://lemmy.ml";constclient: LemmyHttp=newLemmyHttp(baseUrl);// Build the login formconstloginForm: Login={username_or_email: "<EMPTY>",password: "<EMPTY>",};// Login and set the client headers with your jwtconst{ jwt }=awaitclient.login(loginForm);client.setHeaders({Authorization: `Bearer ${jwt}`});console.log(jwt);// Fetch top posts for the day// Commented out as GetPosts doesn't exist here/* const getPostsForm: GetPosts = { sort: "TopDay", type_: "Local",};const posts = await client.getPosts(getPostsForm); */
The text was updated successfully, but these errors were encountered:
That's an experimental unreleased lemmy-js-client, are you working on developing something? Because you shouldn't be using unreleased versions otherwise.
Using the latest version on npm and when I attempt to run the example in the readme, it dies from a Not Found error. Was there a change in the Lemmy API recently or am I missing something?
Compiled TS follows
The text was updated successfully, but these errors were encountered: