home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
Featured Plugins
MP2Extended
Plugin: MP2Extended
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="FreakyJ" data-source="post: 1160253" data-attributes="member: 106003"><p>I was thinking the same, but thought there might be also some problems:</p><p>the name "sort" and "order" is case sensitive. So if one uses a different spelling in the second function or even different names, the Api is messed up. The only benefit is in getting the return type, because you can't really get the type of a dynamic function except you invoke the function which in turn needs acceptable parameters to prevent an exception.</p><p>I already added everything to every api call so adding the return type would result in less work than spelitting the functions and probably less human errors.</p><p></p><p></p><p>To use swagger would be nice, but I only found it for ASP.Net and I would like that the documentation grows with the src without running different tools etc. I hate if there is too much overhead...</p><p></p><p>My current approach is this:</p><p>I start at the MainRequestHandler, from there I get all Service hanlder (Mas, Tas, Wss, Das) than I go through every api function and get my information. I tried to get as much as possible from the Src, but sadly that is not possible for everything :/</p><p>I think so it is really easy to add new functions and it is obvious that you have to change something once you changed the code. But it doesn't protect completely against human errors, but I think it makes it a bit more obvious.</p><p>This is how it looks right now (not everything is exposed yet):</p><p>[ATTACH]171634[/ATTACH]</p></blockquote><p></p>
[QUOTE="FreakyJ, post: 1160253, member: 106003"] I was thinking the same, but thought there might be also some problems: the name "sort" and "order" is case sensitive. So if one uses a different spelling in the second function or even different names, the Api is messed up. The only benefit is in getting the return type, because you can't really get the type of a dynamic function except you invoke the function which in turn needs acceptable parameters to prevent an exception. I already added everything to every api call so adding the return type would result in less work than spelitting the functions and probably less human errors. To use swagger would be nice, but I only found it for ASP.Net and I would like that the documentation grows with the src without running different tools etc. I hate if there is too much overhead... My current approach is this: I start at the MainRequestHandler, from there I get all Service hanlder (Mas, Tas, Wss, Das) than I go through every api function and get my information. I tried to get as much as possible from the Src, but sadly that is not possible for everything :/ I think so it is really easy to add new functions and it is obvious that you have to change something once you changed the code. But it doesn't protect completely against human errors, but I think it makes it a bit more obvious. This is how it looks right now (not everything is exposed yet): [ATTACH]171634[/ATTACH] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Featured Plugins
MP2Extended
Plugin: MP2Extended
Contact us
RSS
Top
Bottom