Sha256: ae7ceeeb6f458a33a853e0f51c7249a04b5761ea7682c7275e22d9377cca50d4

Contents?: true

Size: 469 Bytes

Versions: 2

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

module DevRuby
  module Resources
    class ProfileImagesResource < BaseResource
      def find_by_username(username)
        response = get_request("profile_images/#{username}")

        if Helpers.expected_response?(response, 200)
          profile_image = DevRuby::Objects::ProfileImage.new(response.body)

          Success(profile_image)
        else
          Failure(error_parser(response))
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dev_ruby-1.0.0 lib/dev_ruby/resources/profile_images_resource.rb
dev_ruby-0.2.0 lib/dev_ruby/resources/profile_images_resource.rb