I’m packaging Question2Answer (Q2A) for ynh at GitHub - nils-van-zuijlen/question2answer_ynh: Question2Answer package for YunoHost and I have two questions about it:
- First, what should I put for the
license key in the manifest, the license for Q2A or for the package ?
- Second, Q2A is mainly configured via its admin interface, but that interface is protected via CSRF, how can I use
ynh_local_curl on it ?
The license of the upstream of Q2A
Ugh that’s a tricky question … There’s no magic trick, I guess ? Naively I think you would need to first do a GET request, parse the CSRF token somehow, then do your POST request where you also inject the CSRF token in an appropriate way …?
Ok, I was hoping that something would have been done to facilitate that, I’ll try to come up with some
curl to do the trick. There are no helpers for GET request, isn’t it?
Also, is it possible to get the email address for an
user question in the manifest ?
Ah, for this one there is :
ynh_user_get_info "$the_user" 'mail'
I don’t think so ? Or maybe
ynh_local_curl ? But maybe it only does POST request … (Im not super-familiar with helper detail, I don’t do “real packaging” so often) … I guess you can just call “curl” manually :s
Thank you for your help, I think I got it working.
Where can I announce this new app is ready?
You can create a topic into the app announcement category Apps - YunoHost Forum
You should also run the linter on your app, to see if there are some errors.