zbentley / classeur-downloader Goto Github PK
View Code? Open in Web Editor NEWTool to download files and folders from http://classeur.io/
License: MIT License
Tool to download files and folders from http://classeur.io/
License: MIT License
Hi,
Excited to use your package! I've installed, which seemed to go fine, but getting this error:
/usr/local/lib/node_modules/classeur-downloader/bin/cldownload.js:4
const parseArgs = require('../lib/argument-parser'),
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
The v1
API has partially stopped working; file content can no longer be saved by this script.
zbentley/classeur-api-client#3 will add compatible support for the new API. Once that is done, fixing this issue should be as simple as updating the module version dependency for this package.
I am actively working on the addition of V2 API support in that issue.
Would you be able to fix the content type:
Not sure why it point to option arg parser, but it sucesfully goes to downloader to store files:
if (error) throw error;
^
Error: Server error (400): unexpected_request_content_type
at ServerError (/home/pmichalec/hg2g/apps/npm/lib/node_modules/classeur-downloader/node_modules/classeur-api-client/lib/errors.js:27:3)
at Request.<anonymous> (/home/pmichalec/hg2g/apps/npm/lib/node_modules/classeur-downloader/node_modules/classeur-api-client/classeur-api-client.js:212:27)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.mixin._fireSuccess (/home/pmichalec/hg2g/apps/npm/lib/node_modules/classeur-downloader/node_modules/restler/lib/restler.js:223:12)
at /home/pmichalec/hg2g/apps/npm/lib/node_modules/classeur-downloader/node_modules/restler/lib/restler.js:161:20
at IncomingMessage.parsers.json (/home/pmichalec/hg2g/apps/npm/lib/node_modules/classeur-downloader/node_modules/restler/lib/restler.js:415:9)
at Request.mixin._encode (/home/pmichalec/hg2g/apps/npm/lib/node_modules/classeur-downloader/node_modules/restler/lib/restler.js:198:29)
at /home/pmichalec/hg2g/apps/npm/lib/node_modules/classeur-downloader/node_modules/restler/lib/restler.js:157:16
at Request.mixin._decode (/home/pmichalec/hg2g/apps/npm/lib/node_modules/classeur-downloader/node_modules/restler/lib/restler.js:173:7)
part of the options:
headers:
{ Accept: '*/*',
'User-Agent': 'Restler for node.js',
Host: 'app.classeur.io',
'Accept-Encoding': 'gzip, deflate',
'x-agent-info': 'github.com/zbentley/classeur-api-client',
Authorization: 'Basic bEpEOX..........xxxxxx..........5dVo=',
'Content-Length': 0 },
request:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedHeader: [Object],
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'GET /api/v1/folders/Salt HTTP/1.1\r\nAccept: */*\r\nUser-Agent: Restler for node.js\r\nHost: app.classeur.io\r\nAccept-Encoding: gzip, deflate\r\nx-agent-info: github.com/zbentley/classeur-api-client\r\nAuthorization: Basic bEpEOXVwZ..............xxxxxxx.............M0lSQUU5dVo=\r\nContent-Length: 0\r\nConnection: close\r\n\r\n',
_headers: [Object],
_headerNames: [Object],
_onPendingData: null,
agent: [Object],
socketPath: undefined,
method: 'GET',
path: '/api/v1/folders/Salt',
_ended: true,
parser: null,
res: [Object] } },
data:
{ status: 400,
error: 'bad_request',
reason: 'unexpected_request_content_type' },
status: 400,
reason: 'unexpected_request_content_type',
shortReason: 'bad_request' }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.