mxhero-api 1.0.5 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTUzYjJhMWY4ODM3OGYxNzczZWZjMjQ2Mjg5NWU4YjJmY2JlMDI5Yg==
4
+ NjQyYjNkZWMxM2FhYmRkNGYxOWY2MjA3OGQxODg5ZjJlODc4YjM4Ng==
5
5
  data.tar.gz: !binary |-
6
- MmIwNWVmMDgyODhmNmU3YmI0ZWM2OTEwNDFhNDlkZTQyYzVlZWYwMw==
6
+ MDBiYzFlMDViMDg0YmNjOTIwNGI1MjU4YWQwZjcxNDdkZDhkYjlkNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjcwMDZkY2M5ZmUwYjE1MTI0YzJjNjUyZWI4MDgyYzRhOTk3Y2I4MzFmNGFi
10
- ZDgyNDdmMjg3MmViODI1YTNjY2RmNTJhZGJhZmZjYzdjZjYzNzRlNDg5N2Jl
11
- NzZkOTk1ODExY2FmNDM2NTExM2MzOTI1NjllOTJjMTllZGU0Njc=
9
+ ODkyMTYxYzQ1YzMyMGU4ZWJiYWM5YzVhMDA1NDdhM2NhMzIxODM1OWRkZmJj
10
+ MDBmMTg4YmFmMWM4M2Q0ZTM0ZTUzODcxNTExMDNiOGNhYTQwMTg1NWE0OWE5
11
+ MTRjNzBiNmM1MTQ1NzUxMTIzOTgwNjNjYjEyY2YyZGEyN2Q5OGQ=
12
12
  data.tar.gz: !binary |-
13
- MjY2ZjYzM2ZjZGZiNGJjMDRlMjViOTBmMTkxNjY4NjYwYzhkODQzOGE5NjQx
14
- YmZmM2EyYzQ5N2Y2ZjgwMWIzMzlkNzI2MGZjN2I4NDUzM2JlODE2MThkZDYw
15
- NjVjMTJiMDk3ZjA3MWVmNjE2Y2I4NzRmNTBiOGViYjI4NDdlNGU=
13
+ Y2QyOWU0Y2MyZWEwMzc5ZjA5MDVmOTRiNTBkNzUyNzQxMzkxYTk4ZmZlNjYz
14
+ N2Q4ZTFlMzEzNTA0M2E3NmQ2ZDcyNTAwMDBkNzkzZTJmMTY0ZjBhMDdkOGQ5
15
+ ZDY3NTliYjdlM2UzZmM1NWU5ZmE4NjE5NzRhZjcyYTMwNzk0Njk=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.1.0
data/lib/mxhero-api.rb CHANGED
@@ -115,8 +115,11 @@ module MxHero::API
115
115
  # * :actualPage
116
116
  #
117
117
  # @raise an exception when the status code isn't 200
118
- def domains
119
- response = call(:get, domains_url)
118
+ def domains(params = {})
119
+ url = domains_url
120
+ limit, offset = params.values_at(:limit, :offset)
121
+ url = paginate(domains_url, { limit: limit, offset: offset }) if limit && offset
122
+ response = call(:get, url)
120
123
  raise 'an error ocurred when try to communicate with the API' if response.status != 200
121
124
  response_as_a_hash = json_parse(response.content)
122
125
  response_as_a_hash
data/mxhero-api.gemspec CHANGED
@@ -1,13 +1,13 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: mxhero-api 1.0.5 ruby lib
2
+ # stub: mxhero-api 1.1.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "mxhero-api"
6
- s.version = "1.0.5"
6
+ s.version = "1.1.0"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Maximiliano Dello Russo", "Juan Pablo Royo", "mxHero"]
10
- s.date = "2016-04-21"
10
+ s.date = "2016-04-28"
11
11
  s.description = "A gem to provide easy access to the API of MxHero platform (http://www.mxhero.com/)"
12
12
  s.email = ["maxidr@mxhero.com", "juanpablo.royo@gmail.com", "mxhero@mxhero.com"]
13
13
  s.files = [".gitignore", ".ruby-gemset", ".ruby-version", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "VERSION", "lib/communication.rb", "lib/directories.rb", "lib/dto.rb", "lib/groups.rb", "lib/mxhero-api.rb", "lib/pst-converter.rb", "lib/resource.rb", "lib/resources/account.rb", "lib/resources/domain.rb", "lib/resources/group.rb", "lib/urls.rb", "mxhero-api.gemspec", "test/fixtures/api/account_properties.yml", "test/fixtures/api/account_properties_not_found.yml", "test/fixtures/api/accounts.yml", "test/fixtures/api/accounts_filtered.yml", "test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/accounts_from_domain_paginated.yml", "test/fixtures/api/accounts_without_group.yml", "test/fixtures/api/add_an_inexistent_account_to_group.yml", "test/fixtures/api/add_and_remove_account.yml", "test/fixtures/api/add_feature.yml", "test/fixtures/api/all_groups.yml", "test/fixtures/api/associate_user_domain.yml", "test/fixtures/api/create_directory.yml", "test/fixtures/api/create_domain.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/create_user.yml", "test/fixtures/api/delete_directory.yml", "test/fixtures/api/delete_group.yml", "test/fixtures/api/delete_rule.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/fetch_directory.yml", "test/fixtures/api/fetch_user.yml", "test/fixtures/api/ldap_info.yml", "test/fixtures/api/move_to_trial.yml", "test/fixtures/api/refresh_directory.yml", "test/fixtures/api/remove_account_from_group_twice.yml", "test/fixtures/api/remove_inexistente_account_from_group.yml", "test/fixtures/api/rule_status.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/rules_for_domain_by_component.yml", "test/fixtures/api/save_group.yml", "test/fixtures/api/system_properties.yml", "test/fixtures/api/system_properties_create.yml", "test/fixtures/api/system_properties_element.yml", "test/fixtures/api/test_domain.yml", "test/fixtures/api/update_account_properties.yml", "test/fixtures/api/update_accounts_group_scope.yml", "test/fixtures/api/update_accounts_properties_scope.yml", "test/fixtures/api/update_directory.yml", "test/fixtures/api/update_rule.yml", "test/fixtures/api/update_user.yml", "test/fixtures/api/user_domains.yml", "test/fixtures/api/users_for_domain.yml", "test/fixtures/api/validate_user_credential.yml", "test/fixtures/domain.rb", "test/helper.rb", "test/test_directories.rb", "test/test_domain.rb", "test/test_dto.rb", "test/test_feature.rb", "test/test_groups.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb", "test/test_resource.rb"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mxhero-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maximiliano Dello Russo
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-04-21 00:00:00.000000000 Z
13
+ date: 2016-04-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: vcr