It would be nice to be able to add/remote/modify things like RSS and categories from the API. I realize it's not a common request, but it would make automation possible. (I've been working on a multi-user frontend which really cannot go any further.)
edit: and if it's in but not documented, apologies =)
Complete Configuration API (rss, categories)
Complete Configuration API (rss, categories)
Last edited by pmow on December 30th, 2010, 8:52 pm, edited 1 time in total.
Re: Complete Configuration API (rss, categories)
It's all in the API: http://wiki.sabnzbd.org/api
The documentation is not great, you may need to check out the source too (api.py).
The documentation is not great, you may need to check out the source too (api.py).
Re: Complete Configuration API (rss, categories)
Would it be the "new" api_del_config and api_set_config functions added in 2009?
I'd love to help with the documentation (I think I owe inpheaux a section on addfile for api) once I get all the keywords.
I'd love to help with the documentation (I think I owe inpheaux a section on addfile for api) once I get all the keywords.
Re: Complete Configuration API (rss, categories)
Register an account at WikiDot.com and I can add you to the editors.
Re: Complete Configuration API (rss, categories)
Thanks, my username is 'pmow'. If the answer to my question is yes, and those functions can set/clear any configuration keywords including RSS and categories, is there a complete list anywhere of those keywords? (I didn't hear back on it)
Re: Complete Configuration API (rss, categories)
HI,
I sent you the editor invitation.
With "the complete" list, I assume you mean the set of sections and keywords for configuration.
These are the sections and keywords that you see in the sabnzbd.ini file.
So when you see
[misc]
complete_dir = bla
The corresponding API call is
api?mode=set_config§ion=misc&keyword=complete_dir&value=bla&apikey=secret
I sent you the editor invitation.
With "the complete" list, I assume you mean the set of sections and keywords for configuration.
These are the sections and keywords that you see in the sabnzbd.ini file.
So when you see
[misc]
complete_dir = bla
The corresponding API call is
api?mode=set_config§ion=misc&keyword=complete_dir&value=bla&apikey=secret
Re: Complete Configuration API (rss, categories)
These emoticons cannot properly express my level of affection for you right now. <3
Re: Complete Configuration API (rss, categories)
I've looked up other threads that reference set_config, and I have two questions:
1. How would I go about creating a new entry? (I have tried set_config to add a feed, and have gotten "doesn't exist".) Tried a few other things too but no dice.
2. Part of the RSS entry consists of a rule ACL, which is returned by get_config as an array. How would one go about setting that?
1. How would I go about creating a new entry? (I have tried set_config to add a feed, and have gotten "doesn't exist".) Tried a few other things too but no dice.
2. Part of the RSS entry consists of a rule ACL, which is returned by get_config as an array. How would one go about setting that?
Re: Complete Configuration API (rss, categories)
1. Not sure if it has been tested to that level. I'll check.
2. That would be a comma-separated list, with elements that contain spaces embedded in quotes.
Remember to do proper URL quoting too (Like replacing = with %3D).
2. That would be a comma-separated list, with elements that contain spaces embedded in quotes.
Remember to do proper URL quoting too (Like replacing = with %3D).
Re: Complete Configuration API (rss, categories)
1.
This was an oversight in the implementation.
Adding entries is done properly for servers (which needed special treatment any way).
It wasn't handled for rss and categories.
I have added the required code to the 0.6.0 code base, but I won't add it to 0.5.x.
This was an oversight in the implementation.
Adding entries is done properly for servers (which needed special treatment any way).
It wasn't handled for rss and categories.
I have added the required code to the 0.6.0 code base, but I won't add it to 0.5.x.
Re: Complete Configuration API (rss, categories)
Thanks. If you commit to a version I can test with, I will add to the other changes I've started making in the wiki with version info.shypike wrote: 1.
This was an oversight in the implementation.
Adding entries is done properly for servers (which needed special treatment any way).
It wasn't handled for rss and categories.
I have added the required code to the 0.6.0 code base, but I won't add it to 0.5.x.
Re: Complete Configuration API (rss, categories)
We'll soon do Beta1.
If not, I can pass you an extra build.
If not, I can pass you an extra build.
Re: Complete Configuration API (rss, categories)
I noticed revision 2598 and your notes. Since all this is optional, unlike many [misc] keywords, can you include delete support as well? From the source I couldn't tell so I thought I'd postshypike wrote: We'll soon do Beta1.
If not, I can pass you an extra build.
Re: Complete Configuration API (rss, categories)
Deleting is rather useless, the field will come back with the next start.
You're probably asking for a possibility to go back to default values.
You're probably asking for a possibility to go back to default values.
Re: Complete Configuration API (rss, categories)
To be clear, I'm asking to delete an entire key; AKA, a server, a category, or a feed. Just remove the entire thing, just like adding it.