Sha256: b73d6479c87d2101c290d98744da7dd7213ef24867245464511cd11ddedab837
Contents?: true
Size: 683 Bytes
Versions: 12
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true require "transactable" module Ghub module Endpoints module Users module Actions # Handles a user index action. class Index include Users::Import[:client, response: "responses.index", model: "models.index"] include Transactable def call **parameters pipe( client.get("users", **parameters), try(:parse, catch: JSON::ParserError), fmap { |body| {body:} }, validate(response), as(:fetch, :body), map { |item| model.new item.to_h } ) end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems