Sha256: 756509a6d53d3bd6d5b7f16caf148e90ef21bff55e527faa15abc1827884640c

Contents?: true

Size: 499 Bytes

Versions: 8

Compression:

Stored size: 499 Bytes

Contents

module HackerOne
  module Client
    class User
      include ResourceHelper

      delegate :username, :signal, :impact, :reputation, to: :attributes

      def self.find(username_we_want)
        user_json = make_get_request("users/#{username_we_want}")
        new(user_json)
      end

      def initialize(user)
        @user = user
      end

      def id
        @user[:id]
      end

      private

      def attributes
        OpenStruct.new(@user[:attributes])
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hackerone-client-0.15.0 lib/hackerone/client/user.rb
hackerone-client-0.14.2 lib/hackerone/client/user.rb
hackerone-client-0.14.1 lib/hackerone/client/user.rb
hackerone-client-0.14.0 lib/hackerone/client/user.rb
hackerone-client-0.13.0 lib/hackerone/client/user.rb
hackerone-client-0.12.0 lib/hackerone/client/user.rb
hackerone-client-0.11.0 lib/hackerone/client/user.rb
hackerone-client-0.10.0 lib/hackerone/client/user.rb