Class: Proz::Client
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #freelancer(uuid) ⇒ Object
- #freelancer_matches(language_pair, options) ⇒ Object
-
#initialize(key:) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(key:) ⇒ Client
10 11 12 |
# File 'lib/proz/client.rb', line 10 def initialize(key:) @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
9 10 11 |
# File 'lib/proz/client.rb', line 9 def key @key end |
Instance Method Details
#freelancer(uuid) ⇒ Object
14 15 16 |
# File 'lib/proz/client.rb', line 14 def freelancer(uuid) self.class.get("/freelancer/#{uuid}", headers: { 'X-Proz-API-Key' => key})['data'] end |
#freelancer_matches(language_pair, options) ⇒ Object
18 19 20 21 |
# File 'lib/proz/client.rb', line 18 def freelancer_matches(language_pair, ) = language_pair.merge!() self.class.get("/freelancer-matches", query: , headers: { 'X-Proz-API-Key' => key})['data'] end |