ruby-upwork-oauth2 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +1 -1
  3. data/README.md +1 -15
  4. data/lib/upwork/api/routers/activities/engagement.rb +3 -3
  5. data/lib/upwork/api/routers/activities/team.rb +5 -5
  6. data/lib/upwork/api/routers/auth.rb +2 -2
  7. data/lib/upwork/api/routers/freelancers/profile.rb +2 -2
  8. data/lib/upwork/api/routers/freelancers/search.rb +2 -2
  9. data/lib/upwork/api/routers/hr/clients/applications.rb +2 -2
  10. data/lib/upwork/api/routers/hr/clients/offers.rb +3 -3
  11. data/lib/upwork/api/routers/hr/contracts.rb +3 -3
  12. data/lib/upwork/api/routers/hr/engagements.rb +3 -3
  13. data/lib/upwork/api/routers/hr/freelancers/applications.rb +2 -2
  14. data/lib/upwork/api/routers/hr/freelancers/offers.rb +3 -3
  15. data/lib/upwork/api/routers/hr/interviews.rb +2 -2
  16. data/lib/upwork/api/routers/hr/jobs.rb +6 -6
  17. data/lib/upwork/api/routers/hr/milestones.rb +7 -7
  18. data/lib/upwork/api/routers/hr/roles.rb +3 -3
  19. data/lib/upwork/api/routers/hr/submissions.rb +3 -3
  20. data/lib/upwork/api/routers/jobs/profile.rb +2 -2
  21. data/lib/upwork/api/routers/jobs/search.rb +2 -2
  22. data/lib/upwork/api/routers/messages.rb +11 -11
  23. data/lib/upwork/api/routers/metadata.rb +7 -7
  24. data/lib/upwork/api/routers/organization/companies.rb +5 -5
  25. data/lib/upwork/api/routers/organization/teams.rb +3 -3
  26. data/lib/upwork/api/routers/organization/users.rb +2 -2
  27. data/lib/upwork/api/routers/payments.rb +1 -1
  28. data/lib/upwork/api/routers/reports/finance/accounts.rb +3 -3
  29. data/lib/upwork/api/routers/reports/finance/billings.rb +6 -6
  30. data/lib/upwork/api/routers/reports/finance/earnings.rb +6 -6
  31. data/lib/upwork/api/routers/reports/time.rb +3 -3
  32. data/lib/upwork/api/routers/snapshot.rb +3 -3
  33. data/lib/upwork/api/routers/workdays.rb +2 -2
  34. data/lib/upwork/api/routers/workdiary.rb +2 -2
  35. data/lib/upwork/api/version.rb +1 -1
  36. data/ruby-upwork-oauth2.gemspec +1 -1
  37. data/test/test_activities_engagement.rb +6 -6
  38. data/test/test_activities_team.rb +14 -14
  39. data/test/test_auth.rb +3 -3
  40. data/test/test_freelancers_profile.rb +4 -4
  41. data/test/test_freelancers_search.rb +3 -3
  42. data/test/test_hr_clients_applications.rb +5 -5
  43. data/test/test_hr_clients_offers.rb +6 -6
  44. data/test/test_hr_contracts.rb +6 -6
  45. data/test/test_hr_engagements.rb +5 -5
  46. data/test/test_hr_freelancers_applications.rb +5 -5
  47. data/test/test_hr_freelancers_offers.rb +6 -6
  48. data/test/test_hr_interviews.rb +3 -3
  49. data/test/test_hr_jobs.rb +11 -11
  50. data/test/test_hr_milestones.rb +14 -14
  51. data/test/test_hr_roles.rb +5 -5
  52. data/test/test_hr_submissions.rb +6 -6
  53. data/test/test_jobs_profile.rb +3 -3
  54. data/test/test_jobs_search.rb +3 -3
  55. data/test/test_messages.rb +22 -22
  56. data/test/test_metadata.rb +14 -14
  57. data/test/test_organization_companies.rb +9 -9
  58. data/test/test_organization_teams.rb +5 -5
  59. data/test/test_organization_users.rb +4 -4
  60. data/test/test_payments.rb +2 -2
  61. data/test/test_reports_finance_accounts.rb +5 -5
  62. data/test/test_reports_finance_billings.rb +11 -11
  63. data/test/test_reports_finance_earnings.rb +11 -11
  64. data/test/test_reports_time.rb +13 -13
  65. data/test/test_snapshot.rb +6 -6
  66. data/test/test_workdays.rb +4 -4
  67. data/test/test_workdiary.rb +2 -2
  68. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c2b73f43493b0b28b2e57c5a6f0f585e6fdb5dae551c7727a08aebee090472c
4
- data.tar.gz: 7bc58ddae0c69c0623af09ab601da75ebc90998d2d28ef8a8e9007cf1c64729d
3
+ metadata.gz: 714d57824d8e7e99ce8abfb0292feb999658487dc796645583ef0f37fbb79e4b
4
+ data.tar.gz: f6d723f4d3b7f46b5c389cc1db185f5064e648e1c2bc44ec62895942c7b62fa2
5
5
  SHA512:
6
- metadata.gz: 79f1166d56aab80b453ba1903f76eac2bece055edee57e3d21e43f698f56dba973339d0256e08bf5639030a2ac5ee81f85b741ec152ed7cfc08be2cd38c9f6e5
7
- data.tar.gz: 6892be3d8566e75fc102fb2a2269f90d90a6e8089897e513b8b464ccd31f68635ed886412ccafa96802dd58930f26819e68ad4c6c0d78dd4f9966a2712c97ab0
6
+ metadata.gz: 8edcd97947d2ccdcf59043db46f2e41a640a60bc4b091a801052841c978b6e17eb7896ff19045286e5518abed259c184570c0d14b72d67c50a5a9112da8b4a32
7
+ data.tar.gz: 7518ea1a6642682ded9da4fe7cc27cceb2e163b74f0d6a70bac74333e7a88b712d9bb0c3a0504875f524b88a35ab91ab8b52710a6339493986a8523ee50e23d9
@@ -16,7 +16,7 @@ jobs:
16
16
  fail-fast: false
17
17
  matrix:
18
18
  os: [ubuntu-latest, macos-latest]
19
- ruby: [ '2.7.3', '2.6.7', '3.0.1' ]
19
+ ruby: [ '3.0.1' ]
20
20
 
21
21
  name: Ruby ${{ matrix.ruby }}
22
22
  steps:
data/README.md CHANGED
@@ -12,21 +12,7 @@ This project provides a set of resources of Upwork API from http://developers.up
12
12
  based on OAuth 2.0.
13
13
 
14
14
  # Features
15
- These are the supported API resources:
16
-
17
- * My Info
18
- * Custom Payments
19
- * Hiring
20
- * Job and Freelancer Profile
21
- * Search Jobs and Freelancers
22
- * Organization
23
- * Messages
24
- * Time and Financial Reporting
25
- * Metadata
26
- * Snapshot
27
- * Team
28
- * Workd Diary
29
- * Activities
15
+ The library supports all GraphQL calls, which are publicly shared at Upwork
30
16
 
31
17
  # License
32
18
 
@@ -33,7 +33,7 @@ module Upwork
33
33
  # Arguments:
34
34
  # engagement_ref: (String)
35
35
  def get_specific(engagement_ref)
36
- @client.get '/tasks/v2/tasks/contracts/' + engagement_ref
36
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
37
37
  end
38
38
 
39
39
  # Assign engagements to the list of activities
@@ -44,7 +44,7 @@ module Upwork
44
44
  # engagement: (String)
45
45
  # params: (Hash)
46
46
  def assign(company, team, engagement, params)
47
- @client.put '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/engagements/' + engagement + '/tasks', params
47
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
48
48
  end
49
49
 
50
50
  # Assign to specific engagement the list of activities
@@ -53,7 +53,7 @@ module Upwork
53
53
  # engagement_ref: (String)
54
54
  # params: (Hash)
55
55
  def assign_to_engagement(engagement_ref, params)
56
- @client.put '/tasks/v2/tasks/contracts/' + engagement_ref, params
56
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
57
57
  end
58
58
 
59
59
  end
@@ -54,7 +54,7 @@ module Upwork
54
54
  # team: (String)
55
55
  # params: (Hash)
56
56
  def add_activity(company, team, params)
57
- @client.post '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/tasks', params
57
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
58
58
  end
59
59
 
60
60
  # Update specific oTask/Activity record within a team
@@ -65,7 +65,7 @@ module Upwork
65
65
  # code: (String)
66
66
  # params: (Hash)
67
67
  def update_activities(company, team, code, params)
68
- @client.put '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/tasks/' + code, params
68
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
69
69
  end
70
70
 
71
71
  # Archive specific oTask/Activity record within a team
@@ -75,7 +75,7 @@ module Upwork
75
75
  # team: (String)
76
76
  # code: (String)
77
77
  def archive_activities(company, team, code)
78
- @client.put '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/archive/' + code
78
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
79
79
  end
80
80
 
81
81
  # Unarchive specific oTask/Activity record within a team
@@ -85,7 +85,7 @@ module Upwork
85
85
  # team: (String)
86
86
  # code: (String)
87
87
  def unarchive_activities(company, team, code)
88
- @client.put '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/unarchive/' + code
88
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
89
89
  end
90
90
 
91
91
  # Update a group of oTask/Activity records within a company
@@ -94,7 +94,7 @@ module Upwork
94
94
  # company: (String)
95
95
  # params: (Hash)
96
96
  def update_batch(company, params)
97
- @client.put '/otask/v1/tasks/companies/' + company + '/tasks/batch', params
97
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
98
98
  end
99
99
 
100
100
  private
@@ -30,9 +30,9 @@ module Upwork
30
30
  # Get info of authenticated user
31
31
  def get_user_info
32
32
  $LOG.i "running " + __method__.to_s
33
- @client.get '/auth/v1/info'
33
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
34
34
  end
35
35
  end
36
36
  end
37
37
  end
38
- end
38
+ end
@@ -34,7 +34,7 @@ module Upwork
34
34
  # key: (String)
35
35
  def get_specific(key)
36
36
  $LOG.i "running " + __method__.to_s
37
- @client.get '/profiles/v1/providers/' + key
37
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
38
38
  end
39
39
 
40
40
  # Get brief info on specific profile
@@ -42,7 +42,7 @@ module Upwork
42
42
  # Arguments:
43
43
  # key: (String)
44
44
  def get_specific_brief(key)
45
- $LOG.i "running " + __method__.to_s
45
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
46
46
  @client.get '/profiles/v1/providers/' + key + '/brief'
47
47
  end
48
48
  end
@@ -34,10 +34,10 @@ module Upwork
34
34
  # params: (Hash)
35
35
  def find(params)
36
36
  $LOG.i "running " + __method__.to_s
37
- @client.get '/profiles/v2/search/providers', params
37
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
38
38
  end
39
39
  end
40
40
  end
41
41
  end
42
42
  end
43
- end
43
+ end
@@ -35,7 +35,7 @@ module Upwork
35
35
  # params: (Hash)
36
36
  def get_list(params)
37
37
  $LOG.i "running " + __method__.to_s
38
- @client.get '/hr/v4/clients/applications', params
38
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
39
39
  end
40
40
 
41
41
  # Get specific application
@@ -45,7 +45,7 @@ module Upwork
45
45
  # params: (Hash)
46
46
  def get_specific(reference, params)
47
47
  $LOG.i "running " + __method__.to_s
48
- @client.get '/hr/v4/clients/applications/' + reference, params
48
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
49
49
  end
50
50
  end
51
51
  end
@@ -35,7 +35,7 @@ module Upwork
35
35
  # params: (Hash)
36
36
  def get_list(params)
37
37
  $LOG.i "running " + __method__.to_s
38
- @client.get '/offers/v1/clients/offers', params
38
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
39
39
  end
40
40
 
41
41
  # Get specific offer
@@ -45,7 +45,7 @@ module Upwork
45
45
  # params: (Hash)
46
46
  def get_specific(reference, params)
47
47
  $LOG.i "running " + __method__.to_s
48
- @client.get '/offers/v1/clients/offers/' + reference, params
48
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
49
49
  end
50
50
 
51
51
  # Make an Offer
@@ -54,7 +54,7 @@ module Upwork
54
54
  # params: (Hash)
55
55
  def make_offer(params)
56
56
  $LOG.i "running " + __method__.to_s
57
- @client.post '/offers/v1/clients/offers', params
57
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
58
58
  end
59
59
  end
60
60
  end
@@ -35,7 +35,7 @@ module Upwork
35
35
  # params: (Hash)
36
36
  def suspend_contract(reference, params)
37
37
  $LOG.i "running " + __method__.to_s
38
- @client.put '/hr/v2/contracts/' + reference + '/suspend', params
38
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
39
39
  end
40
40
 
41
41
  # Restart Contract
@@ -45,7 +45,7 @@ module Upwork
45
45
  # params: (Hash)
46
46
  def restart_contract(reference, params)
47
47
  $LOG.i "running " + __method__.to_s
48
- @client.put '/hr/v2/contracts/' + reference + '/restart', params
48
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
49
49
  end
50
50
 
51
51
  # End Contract
@@ -55,7 +55,7 @@ module Upwork
55
55
  # params: (Hash)
56
56
  def end_contract(reference, params)
57
57
  $LOG.i "running " + __method__.to_s
58
- @client.delete '/hr/v2/contracts/' + reference, params
58
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
59
59
  end
60
60
  end
61
61
  end
@@ -34,7 +34,7 @@ module Upwork
34
34
  # params: (Hash)
35
35
  def get_list(params)
36
36
  $LOG.i "running " + __method__.to_s
37
- @client.get '/hr/v2/engagements', params
37
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
38
38
  end
39
39
 
40
40
  # Get specific engagement
@@ -43,10 +43,10 @@ module Upwork
43
43
  # reference: (String)
44
44
  def get_specific(reference)
45
45
  $LOG.i "running " + __method__.to_s
46
- @client.get '/hr/v2/engagements/' + reference
46
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
47
47
  end
48
48
  end
49
49
  end
50
50
  end
51
51
  end
52
- end
52
+ end
@@ -35,7 +35,7 @@ module Upwork
35
35
  # params: (Hash)
36
36
  def get_list(params = {})
37
37
  $LOG.i "running " + __method__.to_s
38
- @client.get '/hr/v4/contractors/applications', params
38
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
39
39
  end
40
40
 
41
41
  # Get specific application
@@ -44,7 +44,7 @@ module Upwork
44
44
  # reference: (String)
45
45
  def get_specific(reference)
46
46
  $LOG.i "running " + __method__.to_s
47
- @client.get '/hr/v4/contractors/applications' + reference
47
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
48
48
  end
49
49
  end
50
50
  end
@@ -35,7 +35,7 @@ module Upwork
35
35
  # params: (Hash)
36
36
  def get_list(params = {})
37
37
  $LOG.i "running " + __method__.to_s
38
- @client.get '/offers/v1/contractors/offers', params
38
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
39
39
  end
40
40
 
41
41
  # Get specific offer
@@ -44,7 +44,7 @@ module Upwork
44
44
  # reference: (String)
45
45
  def get_specific(reference)
46
46
  $LOG.i "running " + __method__.to_s
47
- @client.get '/offers/v1/clients/offers/' + reference
47
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
48
48
  end
49
49
 
50
50
  # Apply specific action
@@ -54,7 +54,7 @@ module Upwork
54
54
  # params: (Hash)
55
55
  def actions(reference, params)
56
56
  $LOG.i "running " + __method__.to_s
57
- @client.post '/offers/v1/clients/actions/' + reference, params
57
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
58
58
  end
59
59
  end
60
60
  end
@@ -35,10 +35,10 @@ module Upwork
35
35
  # params: (Hash)
36
36
  def invite(job_key, params)
37
37
  $LOG.i "running " + __method__.to_s
38
- @client.post '/hr/v1/jobs/' + job_key + '/candidates', params
38
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
39
39
  end
40
40
  end
41
41
  end
42
42
  end
43
43
  end
44
- end
44
+ end
@@ -34,7 +34,7 @@ module Upwork
34
34
  # params: (Hash)
35
35
  def get_list(params)
36
36
  $LOG.i "running " + __method__.to_s
37
- @client.get '/hr/v2/jobs', params
37
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
38
38
  end
39
39
 
40
40
  # Get specific job by key
@@ -43,7 +43,7 @@ module Upwork
43
43
  # key: (String)
44
44
  def get_specific(key)
45
45
  $LOG.i "running " + __method__.to_s
46
- @client.get '/hr/v2/jobs/' + key
46
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
47
47
  end
48
48
 
49
49
  # Post a new job
@@ -52,7 +52,7 @@ module Upwork
52
52
  # params: (Hash)
53
53
  def post_job(params)
54
54
  $LOG.i "running " + __method__.to_s
55
- @client.post '/hr/v2/jobs', params
55
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
56
56
  end
57
57
 
58
58
  # Edit existent job
@@ -61,7 +61,7 @@ module Upwork
61
61
  # params: (Hash)
62
62
  def edit_job(key, params)
63
63
  $LOG.i "running " + __method__.to_s
64
- @client.put '/hr/v2/jobs/' + key, params
64
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
65
65
  end
66
66
 
67
67
  # Delete existent job
@@ -70,10 +70,10 @@ module Upwork
70
70
  # params: (Hash)
71
71
  def delete_job(key, params)
72
72
  $LOG.i "running " + __method__.to_s
73
- @client.delete '/hr/v2/jobs/' + key, params
73
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
74
74
  end
75
75
  end
76
76
  end
77
77
  end
78
78
  end
79
- end
79
+ end
@@ -34,7 +34,7 @@ module Upwork
34
34
  # contract_id: (String)
35
35
  def get_active_milestone(contract_id)
36
36
  $LOG.i "running " + __method__.to_s
37
- @client.get '/hr/v3/fp/milestones/statuses/active/contracts/' + contract_id
37
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
38
38
  end
39
39
 
40
40
  # Get active Milestone for specific Contract
@@ -43,7 +43,7 @@ module Upwork
43
43
  # milestone_id: (String)
44
44
  def get_submissions(milestone_id)
45
45
  $LOG.i "running " + __method__.to_s
46
- @client.get '/hr/v3/fp/milestones/' + milestone_id + '/submissions'
46
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
47
47
  end
48
48
 
49
49
  # Create a new Milestone
@@ -52,7 +52,7 @@ module Upwork
52
52
  # params: (Hash)
53
53
  def create(params)
54
54
  $LOG.i "running " + __method__.to_s
55
- @client.post '/hr/v3/fp/milestones', params
55
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
56
56
  end
57
57
 
58
58
  # Edit an existing Milestone
@@ -62,7 +62,7 @@ module Upwork
62
62
  # params: (Hash)
63
63
  def edit(milestone_id, params)
64
64
  $LOG.i "running " + __method__.to_s
65
- @client.put '/hr/v3/fp/milestones/' + milestone_id, params
65
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
66
66
  end
67
67
 
68
68
  # Activate an existing Milestone
@@ -72,7 +72,7 @@ module Upwork
72
72
  # params: (Hash)
73
73
  def activate(milestone_id, params)
74
74
  $LOG.i "running " + __method__.to_s
75
- @client.put '/hr/v3/fp/milestones/' + milestone_id + '/activate', params
75
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
76
76
  end
77
77
 
78
78
  # Approve an existing Milestone
@@ -82,7 +82,7 @@ module Upwork
82
82
  # params: (Hash)
83
83
  def approve(milestone_id, params)
84
84
  $LOG.i "running " + __method__.to_s
85
- @client.put '/hr/v3/fp/milestones/' + milestone_id + '/approve', params
85
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
86
86
  end
87
87
 
88
88
  # Delete an existing Milestone
@@ -91,7 +91,7 @@ module Upwork
91
91
  # milestone_id: (String)
92
92
  def delete(milestone_id)
93
93
  $LOG.i "running " + __method__.to_s
94
- @client.delete '/hr/v3/fp/milestones/' + milestone_id
94
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
95
95
  end
96
96
  end
97
97
  end
@@ -31,7 +31,7 @@ module Upwork
31
31
  # Get user roles
32
32
  def get_all
33
33
  $LOG.i "running " + __method__.to_s
34
- @client.get '/hr/v2/userroles'
34
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
35
35
  end
36
36
 
37
37
  # Get by specific user
@@ -40,10 +40,10 @@ module Upwork
40
40
  # reference: (String)
41
41
  def get_by_specific_user(user_reference)
42
42
  $LOG.i "running " + __method__.to_s
43
- @client.get '/hr/v2/userroles/' + user_reference
43
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
44
44
  end
45
45
  end
46
46
  end
47
47
  end
48
48
  end
49
- end
49
+ end
@@ -34,7 +34,7 @@ module Upwork
34
34
  # params: (Hash)
35
35
  def request_approval(params)
36
36
  $LOG.i "running " + __method__.to_s
37
- @client.post '/hr/v3/fp/submissions', params
37
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
38
38
  end
39
39
 
40
40
  # Approve an existing Submission
@@ -44,7 +44,7 @@ module Upwork
44
44
  # params: (Hash)
45
45
  def approve(submission_id, params)
46
46
  $LOG.i "running " + __method__.to_s
47
- @client.put '/hr/v3/fp/submissions/' + submission_id + '/approve', params
47
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
48
48
  end
49
49
 
50
50
  # Reject an existing Submission
@@ -54,7 +54,7 @@ module Upwork
54
54
  # params: (Hash)
55
55
  def reject(submission_id, params)
56
56
  $LOG.i "running " + __method__.to_s
57
- @client.put '/hr/v3/fp/submissions/' + submission_id + '/reject', params
57
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
58
58
  end
59
59
  end
60
60
  end
@@ -34,10 +34,10 @@ module Upwork
34
34
  # key: (String)
35
35
  def get_specific(key)
36
36
  $LOG.i "running " + __method__.to_s
37
- @client.get '/profiles/v1/jobs/' + key
37
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
38
38
  end
39
39
  end
40
40
  end
41
41
  end
42
42
  end
43
- end
43
+ end
@@ -34,10 +34,10 @@ module Upwork
34
34
  # params: (Hash)
35
35
  def find(params)
36
36
  $LOG.i "running " + __method__.to_s
37
- @client.get '/profiles/v2/search/jobs', params
37
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
38
38
  end
39
39
  end
40
40
  end
41
41
  end
42
42
  end
43
- end
43
+ end
@@ -33,7 +33,7 @@ module Upwork
33
33
  # params: (Hash)
34
34
  def get_rooms(company, params = {})
35
35
  $LOG.i "running " + __method__.to_s
36
- @client.get '/messages/v3/' + company + '/rooms', params
36
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
37
37
  end
38
38
 
39
39
  # Get a specific room information
@@ -44,7 +44,7 @@ module Upwork
44
44
  # params: (Hash)
45
45
  def get_room_details(company, room_id, params = {})
46
46
  $LOG.i "running " + __method__.to_s
47
- @client.get '/messages/v3/' + company + '/rooms/' + room_id, params
47
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
48
48
  end
49
49
 
50
50
  # Get messages from a specific room
@@ -55,7 +55,7 @@ module Upwork
55
55
  # params: (Hash)
56
56
  def get_room_messages(company, room_id, params = {})
57
57
  $LOG.i "running " + __method__.to_s
58
- @client.get '/messages/v3/' + company + '/rooms/' + room_id + '/stories', params
58
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
59
59
  end
60
60
 
61
61
  # Get a specific room by offer ID
@@ -66,7 +66,7 @@ module Upwork
66
66
  # params: (Hash)
67
67
  def get_room_by_offer(company, offer_id, params = {})
68
68
  $LOG.i "running " + __method__.to_s
69
- @client.get '/messages/v3/' + company + '/rooms/offers/' + offer_id, params
69
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
70
70
  end
71
71
 
72
72
  # Get a specific room by application ID
@@ -77,7 +77,7 @@ module Upwork
77
77
  # params: (Hash)
78
78
  def get_room_by_application(company, application_id, params = {})
79
79
  $LOG.i "running " + __method__.to_s
80
- @client.get '/messages/v3/' + company + '/rooms/applications/' + application_id, params
80
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
81
81
  end
82
82
 
83
83
  # Get a specific room by contract ID
@@ -88,7 +88,7 @@ module Upwork
88
88
  # params: (Hash)
89
89
  def get_room_by_contract(company, contract_id, params = {})
90
90
  $LOG.i "running " + __method__.to_s
91
- @client.get '/messages/v3/' + company + '/rooms/contracts/' + contract_id, params
91
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
92
92
  end
93
93
 
94
94
  # Create a new room
@@ -98,7 +98,7 @@ module Upwork
98
98
  # params: (Hash)
99
99
  def create_room(company, params = {})
100
100
  $LOG.i "running " + __method__.to_s
101
- @client.post '/messages/v3/' + company + '/rooms', params
101
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
102
102
  end
103
103
 
104
104
  # Send a message to a room
@@ -109,7 +109,7 @@ module Upwork
109
109
  # params: (Hash)
110
110
  def send_message_to_room(company, room_id, params = {})
111
111
  $LOG.i "running " + __method__.to_s
112
- @client.post '/messages/v3/' + company + '/rooms/' + room_id + '/stories', params
112
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
113
113
  end
114
114
 
115
115
  # Send a message to a batch of rooms
@@ -119,7 +119,7 @@ module Upwork
119
119
  # params: (Hash)
120
120
  def send_message_to_rooms(company, params = {})
121
121
  $LOG.i "running " + __method__.to_s
122
- @client.post '/messages/v3/' + company + '/stories/batch', params
122
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
123
123
  end
124
124
 
125
125
  # Update a room settings
@@ -131,7 +131,7 @@ module Upwork
131
131
  # params: (Hash)
132
132
  def update_room_settings(company, room_id, username, params = {})
133
133
  $LOG.i "running " + __method__.to_s
134
- @client.put '/messages/v3/' + company + '/rooms/' + room_id + '/users/' + username, params
134
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
135
135
  end
136
136
 
137
137
  # Update the metadata of a room
@@ -142,7 +142,7 @@ module Upwork
142
142
  # params: (Hash)
143
143
  def update_room_metadata(company, room_id, params = {})
144
144
  $LOG.i "running " + __method__.to_s
145
- @client.put '/messages/v3/' + company + '/rooms/' + room_id, params
145
+ raise StandardError.new "The legacy API was deprecated. Please, use GraphQL call - see example in this library."
146
146
  end
147
147
  end
148
148
  end