nimbu-api 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c90781f56e3b58c95a49e9ab8f5ac7e57750c64491347f041991481d113e7c82
4
- data.tar.gz: 3f0f1ea716b65f7bbf23dfcee37e2d9856772cc5ae8fa663f43dd6df0ac69f74
3
+ metadata.gz: ff45e3502100e6c7b27a5e133fd72404d18ea95094de0cc2603a97218f53baf9
4
+ data.tar.gz: 828d0760339cd0077cbffff8a1a2454f80e518b0723a511942e3d4bd2f37aeb6
5
5
  SHA512:
6
- metadata.gz: 16347208b44ab18209d19064a8be29289694c4b367db628be23874291beec515650b720ed31c17d5de6d1b328307b21317400b0feb57564c33695d9c462d030f
7
- data.tar.gz: c524519ab7e32ff73fc2cdc83c31a42a1f4216beb83bc44ab2341a4f8b05cbf183c71d6f59aa73ebb2828ec4726c271bc457f182b3f30d3a991c176a6f697682
6
+ metadata.gz: dbec9008321be132f0ad9ed0a2e873154c71dc8b1bd9d87d4b1a46734d9ca511eaf6f3384dc06cf63b5534448cd95a2557197cbf70174727b38da016bb344e6e
7
+ data.tar.gz: 8935d575d7e1bf6f416d990c3c3c16ecd10819ccc68bb9b5d20704a05f4438d0e78bc13226225c69343b88819ffea1a5777840065185762f97c9943b1677eaa4
@@ -39,6 +39,7 @@ require 'nimbu-api/endpoints/orders'
39
39
  require 'nimbu-api/endpoints/functions'
40
40
  require 'nimbu-api/endpoints/jobs'
41
41
  require 'nimbu-api/endpoints/roles'
42
+ require 'nimbu-api/endpoints/users'
42
43
 
43
44
  module Nimbu
44
45
  extend Configuration
@@ -54,5 +54,9 @@ module Nimbu
54
54
  Nimbu::Builder.new('Login', current_options.merge(options), &block).response
55
55
  end
56
56
 
57
+ def users(options={}, &block)
58
+ Nimbu::Builder.new('Users', current_options.merge(options), &block)
59
+ end
60
+
57
61
  end # Client
58
62
  end # Nimbu
@@ -0,0 +1,22 @@
1
+ # encoding: utf-8
2
+
3
+ module Nimbu
4
+ module Endpoints
5
+ class Users < Endpoint
6
+
7
+ def me(*args)
8
+ require_authentication
9
+
10
+ get_request("/user")
11
+ end
12
+ alias :whoami :me
13
+
14
+ private
15
+
16
+ def require_authentication
17
+ raise ArgumentError, 'You need to be authenticated to access the sites' unless authenticated?
18
+ end
19
+
20
+ end # Authorizations
21
+ end # Endpoints
22
+ end # Nimbu
@@ -1,5 +1,5 @@
1
1
  module Nimbu
2
2
  module API
3
- VERSION = "0.4.3"
3
+ VERSION = "0.4.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nimbu-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Dedene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-23 00:00:00.000000000 Z
11
+ date: 2019-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -206,6 +206,7 @@ files:
206
206
  - lib/nimbu-api/endpoints/themes/snippets.rb
207
207
  - lib/nimbu-api/endpoints/themes/templates.rb
208
208
  - lib/nimbu-api/endpoints/translations.rb
209
+ - lib/nimbu-api/endpoints/users.rb
209
210
  - lib/nimbu-api/endpoints/videos.rb
210
211
  - lib/nimbu-api/endpoints/webhooks.rb
211
212
  - lib/nimbu-api/errors.rb
@@ -281,8 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
282
  - !ruby/object:Gem::Version
282
283
  version: '0'
283
284
  requirements: []
284
- rubyforge_project:
285
- rubygems_version: 2.7.6
285
+ rubygems_version: 3.0.3
286
286
  signing_key:
287
287
  specification_version: 4
288
288
  summary: Ruby bindings for the Nimbu API