Class: TRMNL::API::Endpoints::Category
- Inherits:
-
Object
- Object
- TRMNL::API::Endpoints::Category
- Includes:
- Pipeable
- Defined in:
- lib/trmnl/api/endpoints/category.rb
Overview
Handles API request/response.
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/trmnl/api/endpoints/category.rb', line 16 def call pipe( requester.get("categories"), try(:parse, catch: JSON::ParserError), validate(schema, as: :to_h), as(:fetch, :data) ) end |