eduwireapps / kdecole-api-dart Goto Github PK
View Code? Open in Web Editor NEWAn unofficial wrapper for the kdecole api
License: MIT License
An unofficial wrapper for the kdecole api
License: MIT License
I inspected the code of the Client
and it looks like the invokeApi
uses an url parameter. This parameter is always provided as url + something
so this url
that is a class attribute could be used directly within invokeApi
.
Also it should be a private method I think.
I find the name Urls
for the enum is not adapted.
I think it should be renamed to casUrl
.
Also, the Client would be different:
class Client {
final casUrl _url;
late String token;
Map<String, String> header = {};
late UserInfo info;
String get url => _enumToUrl(_url);
Client(this._url, username, password) {
login(username, password);
}
///Create this object if you already have a token
Client.fromToken(this.token, this._url) {
header.addAll({'X-Kdecole-Auth': token, 'X-Kdecole-Vers': '3.7.14'});
}
...
What do you think about it @Freezman31?
For example at
, it would be better to use named parameters like:Email({required this._title, required this._body, required this._sender, required this._receivers, required this._id, required this._messages});
Also, what is the interest of using private attributes along getters there @Freezman31?
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.