Comments (3)
I would recommend to use TypeScript.
npm init -y
npx tsc --init
npm install wikifolio
mkdir example.ts
import { Api } from 'wikifolio';
async function fetchPrice() {
const api = new Api({email: '', password: ''});
const wikifolio = api.wikifolio('')
const price = await wikifolio.price();
console.log(price);
}
fetchPrice();
npx ts-node example.ts
from wikifolio.
Thank you very much for your fast and working answer, but when I use instead of .price()
the .details()
method, I get another error :(
import { Api } from 'wikifolio';
async function main() {
const api = new Api({email: 'email', password: 'password'});
const wikifolio = api.wikifolio('wikifolioID')
//const price = await wikifolio.price();
//console.log(price);
const details = await wikifolio.details();
console.log(details);
}
main();
/Users/henryhaustein/Downloads/wikifolio/node_modules/wikifolio/src/models/Wikifolio.ts:411
throw new Error('Wikifolio JSON not found. This is probably a bug, please report it.')
^
Error: Wikifolio JSON not found. This is probably a bug, please report it.
at Wikifolio.<anonymous> (/Users/henryhaustein/Downloads/wikifolio/node_modules/wikifolio/src/models/Wikifolio.ts:411:13)
at step (/Users/henryhaustein/Downloads/wikifolio/node_modules/wikifolio/dist/models/Wikifolio.js:44:23)
at Object.next (/Users/henryhaustein/Downloads/wikifolio/node_modules/wikifolio/dist/models/Wikifolio.js:25:53)
at fulfilled (/Users/henryhaustein/Downloads/wikifolio/node_modules/wikifolio/dist/models/Wikifolio.js:16:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
from wikifolio.
Thank you very much for your fast and working answer, but when I use instead of
.price()
the.details()
method, I get another error :(
throw new Error('Wikifolio JSON not found. This is probably a bug, please report it.')
See #15. Wikifolio recently released a new version, that's why some features are currently broken. I hope to find some time to fix it soon.
from wikifolio.
Related Issues (12)
- general questions, totally new to typescript and trying to get this to run HOT 2
- Buy with orderType Quote causes Missing UnderlyingQuote Error HOT 2
- Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. HOT 2
- 2FA for creating trades on wikifolio HOT 7
- ⚠️ It will (probably) break soon. HOT 8
- Bug: res.body has changed for some accounts
- Feature Request: Download 'Kontoauszug' from 'Analyse'-Tab HOT 1
- Does you API work? HOT 1
- Error: Login failed, Cookie not found
- Error: Cannot find module 'request' HOT 6
- Order cannot be placed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wikifolio.