This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.
Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.
Before posting questions here you might want to review the developer documentation.
Hi, i wrote an API to a web service, to interface with my first mojoportal module
In the first version, i hardcoded the connection parameters in the class i created (/Components/MyAPI.cs)
So, following the tutorial, i added the configuration.
I can access the configuration in the main program, but i have no idea how i can give the right setting hashtable while in the class.
Or i have to pass those values?
For example, if i want to post something use that api, i do this:
PostAPI(text-to-post);
i should do PostAPI(config.user,config.pass,text-to-post);
Hi, Joe's answer to me in this thread may be helpful to you.
Jamie
The problem is that i can only get the default (hardcoded in the config function) value of the module setting
(no wonder why, i call the ApiConfiguration.cs with
protected ApiConfiguration config = new ApiConfiguration(); , but i cannot specify the settings hashtable )
Hashtable moduleSettings = ModuleSettings.GetModuleSettings(moduleId); config = new ApiConfiguration(moduleSettings);
Hope it helps,
Joe
I need to call this from each method, or it's better to do a property?
(did I use the right terms?)