Home Home > 2007 > 07 > 18 > Nice Trick to Use api.opensuse.org Native With KDE Apps
Sign up | Login

Nice Trick to Use api.opensuse.org Native With KDE Apps

July 18th, 2007 by

People who are using curl and some editor to download files from api.opensuse.org, edit them and upload them again via curl should have a look on the simple kwrite application.

Thanks to KDE infrastructure it is really easy and nice to handle with REST interfaces. The kio_http slave is full feature, so you have a 100% http support in all applications, also inside of simple ones like kwrite. What does this mean ? It means that you can simply use kwrite for example to edit files in your projects. For example # kwrite https://api.opensuse.org/source/YOUR_PROJECT/YOUR_PACKAGE/YOUR_FILE. It does load the file and when you save it, it gets uploaded to the server again.

This is especially important for additional files like the project xml meta data or the setup config, because you get all features of the build service directly independent if they are implemented in your client or not.

You can also use this to show the base distro configs, if you are interested why a certain packages gets installed or not. You can run # kwrite https://api.opensuse.org/source/openSUSE:Factory/_config to show the config from our Factory distribution for example.

You will be prompted for your login/password when you access this, but thanks to kwallet you will never disturbed again :)

You can basically use this for all PUT and GET requests listed on https://api.opensuse.org/apidocs.

Hope you have fun with this :)

Both comments and pings are currently closed.

One Response to “Nice Trick to Use api.opensuse.org Native With KDE Apps”

  1. Peter

    This can also be done conveniently with the commandline client osc now. I just added a “req” command to issue arbitrary requests.

    The above example would translate to:

    osc req source/openSUSE:Factory/_config > _config
    vi _config
    osc req -m PUT -f _config source/openSUSE:Factory/_config

    This can be handy to edit content for which there is no means in osc yet.
    See also osc help req