Class: DevRuby::Resources::ProfileImagesResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- DevRuby::Resources::ProfileImagesResource
- Defined in:
- lib/dev_ruby/resources/profile_images_resource.rb
Instance Attribute Summary
Attributes inherited from BaseResource
Instance Method Summary collapse
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from DevRuby::Resources::BaseResource
Instance Method Details
#find_by_username(username) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/dev_ruby/resources/profile_images_resource.rb', line 6 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 |