ruby-lokalise-api 9.5.0 → 9.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc7bacb7f1ff0d27112db67a6fb124f6eeb35bf878f23ae897a28144e5f559fa
4
- data.tar.gz: 375fa427d45798133845573106c0a4cde68e3f26a14d0b3509a66b05823015fb
3
+ metadata.gz: 626901ad0ff2b3ba8be2bae730baa6673a377123890981e5f67db31e1d137fc9
4
+ data.tar.gz: d3cd767767f3d467ae94e113a74e876670f430e0d080416e45f250d99851735d
5
5
  SHA512:
6
- metadata.gz: 6e1c5f558238f260eb8b612555a403d9162660da9b4e346f29d1e42e4f0ca5a51e0d0b97917be622bf849ff6ff68c7feaf4bcaf32df3eba4b924347ddf884016
7
- data.tar.gz: d3f8e93c4664337c946defe4f058a8ec16ae280336e97fc69ba1b71bcedffa4e1db0b26ad03c7434a8b6bece88cebed98fcf35635a5e51de14dd5937992cab8c
6
+ metadata.gz: c1e45a7a061aec930386ce7c96ef19b924e4f4c64e5396a8a16e20419998bdc95e4115c0e19a1f25b9a11ef4c0dfa3ab6345caa38503ca534b1ef213b7c4b7a1
7
+ data.tar.gz: bdc8fb68cbbd264a996e626b1a1c904d7a8336fd60ac32327fadd35be5eb57d67250ec513674e7264ddfee4030b5e65c35babf41a9ceb4c5d4945af37a8de01d
@@ -5,8 +5,10 @@ module RubyLokaliseApi
5
5
  class TeamsEndpoint < MainEndpoint
6
6
  private
7
7
 
8
- def base_query(*_args)
9
- [:teams]
8
+ def base_query(team_id = nil, *_args)
9
+ {
10
+ teams: [team_id]
11
+ }
10
12
  end
11
13
  end
12
14
  end
@@ -22,6 +22,7 @@ module RubyLokaliseApi
22
22
 
23
23
  delegate_call :contributor
24
24
  delegate_call :contributors
25
+ delegate_call :current_contributor
25
26
  delegate_call :create_contributors
26
27
  delegate_call :update_contributor
27
28
  delegate_call :destroy_contributor
@@ -3,8 +3,8 @@
3
3
  module RubyLokaliseApi
4
4
  module Resources
5
5
  class Team < Base
6
- MAIN_PARAMS = [].freeze
7
- no_support_for %i[update destroy reload_data]
6
+ MAIN_PARAMS = %i[team_id].freeze
7
+ no_support_for %i[update destroy]
8
8
  end
9
9
  end
10
10
  end
@@ -19,6 +19,19 @@ module RubyLokaliseApi
19
19
  resource 'Contributor', data
20
20
  end
21
21
 
22
+ # Returns current contributor (me)
23
+ #
24
+ # @see https://developers.lokalise.com/reference/retrieve-me-as-a-contributor
25
+ # @return [RubyLokaliseApi::Resources::Contributor]
26
+ # @param project_id [String]
27
+ def current_contributor(project_id)
28
+ params = { query: [project_id, :me] }
29
+
30
+ data = endpoint(name: 'Contributors', params: params).do_get
31
+
32
+ resource 'Contributor', data
33
+ end
34
+
22
35
  # Returns project contributors
23
36
  #
24
37
  # @see https://developers.lokalise.com/reference/list-all-contributors
@@ -16,6 +16,19 @@ module RubyLokaliseApi
16
16
 
17
17
  collection name, data
18
18
  end
19
+
20
+ # Returns a single team
21
+ #
22
+ # @see https://developers.lokalise.com/reference/get-team-details
23
+ # @return [RubyLokaliseApi::Resources::Team]
24
+ # @param team_id [String, Integer]
25
+ def team(team_id)
26
+ params = { query: team_id }
27
+
28
+ data = endpoint(name: 'Teams', params: params).do_get
29
+
30
+ resource 'Team', data
31
+ end
19
32
  end
20
33
  end
21
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyLokaliseApi
4
- VERSION = '9.5.0'
4
+ VERSION = '9.6.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lokalise-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.5.0
4
+ version: 9.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Krukowski