def get(self, id):
        """**Get a specific EventType**

        **Example Request:**

        .. sourcecode:: http

            GET /api/v1/eventtypes/1/ HTTP/1.1
            Host: localhost

        **Example response:**

        .. sourcecode:: http

            HTTP/1.1 200 OK
            Content-Type: application/json

            {
                "status": "ok",
                "id": 1,
                "category": "system-reboot",
                "state": "required",
                "description": "This system requires a reboot",
                "events": [],
                "autoCreates": [],
                "autoCompletes": []
                "limit": 10,
                "offset": 0
            }

        :param id: id of the EventType to retrieve
        :type id: int

        :query string expand: (*optional*) supports events, fates
        :query int limit: (*optional*) Limit result of child resources.
        :query int offset: (*optional*) Skip the first N child resources.

        :statuscode 200: The request was successful.
        :statuscode 401: The request was made without being logged in.
        :statuscode 404: The EventType was not found.
        """
        offset, limit, expand = self.get_pagination_values()
        event_type = (
            self.session.query(EventType).filter_by(id=id).scalar()
        )
        if not event_type:
            raise exc.NotFound("No such EventType {} found".format(id))

        json = event_type.to_dict(self.href_prefix)
        json["limit"] = limit
        json["offset"] = offset

        # We will perform expansion of events here b/c we want to apply
        # limits and offsets
        events = []
        for event in (
                event_type.get_latest_events().limit(limit).offset(offset)
                .from_self().order_by(Event.timestamp).all()
        ):
            if "events" in expand:
                events.append(
                    event.to_dict(
                        base_uri=self.href_prefix, expand=set(expand)
                    )
                )
            else:
                events.append({
                    "id": event.id, "href": event.href(self.href_prefix)
                })
        json["events"] = events

        self.success(json)
dataset/ETHPy150Open dropbox/hermes/hermes/handlers/api.py/EventTypeHandler.get/original