cloudnode-pro / ts-client Goto Github PK
View Code? Open in Web Editor NEWA client library for the Cloudnode API, written in TypeScript.
Home Page: https://cloudnode.pro
License: GNU General Public License v3.0
A client library for the Cloudnode API, written in TypeScript.
Home Page: https://cloudnode.pro
License: GNU General Public License v3.0
Our dependencies currently are @types/node
, listr-inquirer
, listr2
, mustache
, node-fetch
.
I think we can move all of these except node-fetch
to dev dependencies.
When invalid credentials are provided, 422 INVALID_DATA
is thrown instead of 401 UNAUTHORIZED
.
401 requires WWW-Authenticate
but the login endpoint does not use Authorization
i.e. HTTP authentication schemes, hence 401 is inappropriate here. This was changed internally in the API as part of our process of deprecating basic authentication.
This inaccuracy somehow made it onto the main branch here ๐ฌ
Change is needed here:
Lines 594 to 597 in 99af42f
Allow importing using cjs require()
Define that Cloudnode.Error
is thrown by inheritance from .#sendRequest
in the new page methods such as .getPage
, .getNextPage
etc
When paginated data is returned, add methods to fetch next page as well as all possible pages
Add a template to generate a separate browser-friendly (non-Node JS) SDK. Or perhaps use some plugin to convert the existing .js to a browser-compatible version.
Add an option to automatically respect the rate limits by retrying and intentionally delaying requests.
My idea behind this is to avoid sending requests which the client already knows will be rate limited (based on data from recent requests) as to allow the request to still complete after the limit resets instead of failing immediately.
This is just an idea. Further discussion is encouraged
Note: sending an OPTIONS request allows you to check the current rate limit status without decreasing the remaining limit.
Use the JSDoc or the .d.ts
or the schema perhaps to generate documentation for the library in the project readme
Include data such as response headers and status in method return values.
Ideally this should be under a getter with a name that will never collide with the name of a property from a response object.
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.