Single Match API Endpoint

So you don't have to query for all of an event's matches just to get one.
There may be more in the future

On Sun, Sep 14, 2014 at 4:00 PM, Greg Marra <notifications@github.com>
wrote:

> In controllers/api/api_match_controller.py:
>
> > +    def __init__(self, *args, **kw):
> > +        super(ApiMatchControllerBase, self).__init__(*args, **kw)
> > +        self.match_key = self.request.route_kwargs["match_key"]
> > +
> > +    @property
> > +    def _validators(self):
> > +        return [("match_id_validator", self.match_key)]
> > +
> > +    def _set_match(self, match_key):
> > +        self.match = Match.get_by_id(match_key)
> > +        if self.match is None:
> > +            self._errors = json.dumps({"404": "%s match not found" % self.match_key})
> > +            self.abort(404)
> > +
> > +
> > +class ApiMatchController(ApiMatchControllerBase):
>
> Why have this base class that's only used once?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/the-blue-alliance/the-blue-alliance/pull/1080/files#r17522081>
> .
>