Class: Upwork::Api::Routers::Metadata

Inherits:
Object
  • Object
show all
Defined in:
lib/upwork/api/routers/metadata.rb

Overview

Get Metadata

Constant Summary collapse

ENTRY_POINT =
'api'

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Metadata

Init

Arguments:

client: (Client)


25
26
27
28
# File 'lib/upwork/api/routers/metadata.rb', line 25

def initialize(client)
  @client = client
  @client.epoint = ENTRY_POINT 
end

Instance Method Details

#get_categories_v2Object

Get categories (v2)



31
32
33
34
# File 'lib/upwork/api/routers/metadata.rb', line 31

def get_categories_v2
  $LOG.i "running " + __method__.to_s
  @client.get '/profiles/v2/metadata/categories'
end

#get_reasons(params) ⇒ Object

Get reasons

Arguments:

params: (Hash)


70
71
72
73
# File 'lib/upwork/api/routers/metadata.rb', line 70

def get_reasons(params)
  $LOG.i "running " + __method__.to_s
  @client.get '/profiles/v1/metadata/reasons', params;
end

#get_regionsObject

Get regions



55
56
57
58
# File 'lib/upwork/api/routers/metadata.rb', line 55

def get_regions
  $LOG.i "running " + __method__.to_s
  @client.get '/profiles/v1/metadata/regions'
end

#get_skillsObject

Get skills



37
38
39
40
# File 'lib/upwork/api/routers/metadata.rb', line 37

def get_skills
  $LOG.i "running " + __method__.to_s
  @client.get '/profiles/v1/metadata/skills'
end

#get_skills_v2(params) ⇒ Object

Get skills V2



43
44
45
46
# File 'lib/upwork/api/routers/metadata.rb', line 43

def get_skills_v2(params)
  $LOG.i "running " + __method__.to_s
  @client.get '/profiles/v2/metadata/skills'
end

#get_specialtiesObject

Get specialties



49
50
51
52
# File 'lib/upwork/api/routers/metadata.rb', line 49

def get_specialties
  $LOG.i "running " + __method__.to_s
  @client.get '/profiles/v1/metadata/specialties'
end

#get_testsObject

Get tests



61
62
63
64
# File 'lib/upwork/api/routers/metadata.rb', line 61

def get_tests
  $LOG.i "running " + __method__.to_s
  @client.get '/profiles/v1/metadata/tests'
end