Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Make active releases return JSON objects instead of HTML strings. #24

Open
relrod opened this issue Jun 5, 2013 · 4 comments
Open

Make active releases return JSON objects instead of HTML strings. #24

relrod opened this issue Jun 5, 2013 · 4 comments

Comments

@relrod
Copy link
Member

relrod commented Jun 5, 2013

Right now query_active_releases returns a bunch of HTML strings with information about releases, including the karma + karma icon for releases in testing.

This makes using the API to get just the versions of packages really hard.

@relrod
Copy link
Member Author

relrod commented Sep 28, 2013

Just a note that this also affects the pkgwat CLI and Python lib:

$ pkgwat releases firefox
Starting new HTTPS connection (1): apps.fedoraproject.org
+---------------+----------------+---------------------+
| release       | stable_version | testing_version     |
+---------------+----------------+---------------------+
| Rawhide       | 24.0-1.fc21    | None                |
| Fedora 20     | 24.0-1.fc20    | 24.0-1.fc20 3 karma |  <--------
| Fedora 19     | 24.0-1.fc19    | None                |
| Fedora 18     | 24.0-1.fc18    | None                |
| Fedora EPEL 6 | None           | None                |
| Fedora EPEL 5 | None           | None                |
+---------------+----------------+---------------------+

As well as Fedora Mobile, and the pkgwat Scala port of the Python lib.

@relrod
Copy link
Member Author

relrod commented Jan 30, 2014

This is also in other fields, not just just the releases.

λ> import Fedora.Packages.Lens
λ> head rows ^. name
"<span class=\"match\">firefox</span>"

Ideally the API should never return HTML, or only if given a special flag that tells it to.

@ralphbean
Copy link
Contributor

Ideally the API should never return HTML, or only if given a special flag that tells it to.

Agreed. pkgwat.api has a strip_tags function to try and workaround this: https://github.com/fedora-infra/pkgwat.api/blob/develop/pkgwat/api/utils.py

@relrod
Copy link
Member Author

relrod commented Jan 31, 2014

Well it helps somewhat, but unless it has changed recently, it still has the issue in this comment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants