FedoraProjectPackageDB

Instant answer for idea [List system packages from Fedora/RHEL database (yum)](https://duck.co/ideas/idea/4277/list-system-packages-from-fedora-rhel-database-yu).

**What does your Instant Answer do?**
Shows system packages for RedHat OS family, according to search criteria. "*" wildcard can be used anywhere in search query.

**What problem does your Instant Answer solve (Why is it better than organic links)?**
Better, because shows all matched packages info with useful description in compact, handy view.

**What is the data source for your Instant Answer? (Provide a link if possible)**
https://admin.fedoraproject.org/pkgdb/

**Why did you choose this data source?**
This data source give access to JSON API.

**Are there any other alternative (better) data sources?**
Seems, no alternatives exists, at least I can't find.

**What are some example queries that trigger this Instant Answer?**
yum perl*
centos htop
fedora mc*
redhat perl

**Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)**
linux users, system administrators, programmers, that use linux environment

**Is this Instant Answer connected to a DuckDuckHack [Instant Answer idea](https://duck.co/ideas)?**
Yes, see [List system packages from Fedora/RHEL database (yum)](https://duck.co/ideas/idea/4277/list-system-packages-from-fedora-rhel-database-yu)

**Which existing Instant Answers will this one supersede/overlap with?**
I don't know. Seems, this instant answer is unique.

**Are you having any problems? Do you need our help with anything?**
No.

**What are the terms of use for the API? Will DuckDuckGo need specific authorization (e.g. an API key)? Are there any costs associated with API usage?**
API is completely free, no authorization / API key is needed.

**What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)**
![screenshot 2014-12-05 01 54 49](https://cloud.githubusercontent.com/assets/1025608/5308655/0b8fbd64-7c22-11e4-9214-b0177449726c.png)

![screenshot 2014-12-05 01 55 04](https://cloud.githubusercontent.com/assets/1025608/5308658/16053cba-7c22-11e4-95d6-7891d0dd0825.png)

## Checklist
```
[x] Added metadata and attribution information
[x] Wrote test file and added to t/ directory
[x] Verified that instant answer adheres to design guidelines (https://duck.co/duckduckhack/design_styleguide)
[x] Verified that instant answer adheres to code styleguide (https://duck.co/duckduckhack/code_styleguide)
[x] Tested cross-browser compatibility

    Please let us know which browsers/devices you've tested on:
    - Windows 8
        [x] Google Chrome
        [x] Firefox
        [] Opera
        [x] IE 10

    - Windows 7
        [] Google Chrome
        [] Firefox
        [] Opera
        [] IE 8
        [] IE 9
        [] IE 10

    - Windows XP
        [] IE 7
        [] IE 8

    - Mac OSX
        [] Google Chrome
        [] Firefox
        [] Opera
        [] Safari

    - iOS (iPhone)
        [] Safari Mobile
        [] Google Chrome
        [] Opera

    - iOS (iPad)
        [] Safari Mobile
        [] Google Chrome
        [] Opera

    - Android
        [] Firefox
        [] Native Browser
        [] Google Chrome
        [] Opera
```
Thanks, now it's clear for me.
Please, review my latest commit and tell me if something still wrong.

On 05.12.2014 10:38, Chris Wilson wrote:
>
> In lib/DDG/Spice/FedoraProjectPackageDB.pm:
>
> > +category 'software';
> > +topics 'sysadmin';
> > +code_url 'https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/FedoraProjectPackageDB.pm';
> > +attribution
> > +  github  => [ 'https://github.com/zdm', 'zdm' ],
> > +  twitter => q{};
> > +
> > +# Triggers
> > +triggers start => qw(yum redhat fedora centos);
> > +
> > +spice is_cached           => 1;
> > +spice to                  => 'https://admin.fedoraproject.org/pkgdb/api/packages/?pattern=$1';    ## no critic qw(ValuesAndExpressions::RequireInterpolationOfMetachars)
> > +spice wrap_jsonp_callback => 1;
> > +
> > +# Handle statement
> > +handle remainder => sub {
>
> It still lists the |query formats| |query| is essentially the same as
> |remainder| except using |remainder| returns the query without the
> triggers (the remainder).
>
> So if you can use |handle query_lc| you can use |handle remainder_lc|
>
> The documentation can always be improved!
> <https://github.com/duckduckgo/duckduckgo-documentation>
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/duckduckgo/zeroclickinfo-spice/pull/1322/files#r21360555>.
>