dock_health_api 0.4.0 → 0.4.1

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: 7948e2eee630eae60b00389c067560a4db5400cca6ed56134619d95a97667bab
4
- data.tar.gz: aaba98419dd489685a6f88274b43eeaa28224f012f35725498777ed480b12a86
3
+ metadata.gz: ee077425b72c248b6d549be0e696dbb962f64c76b09eaf07000acdf9353aeebd
4
+ data.tar.gz: db0e1fa7d75f574d16cd46cc71a838f24f1f31083371cfea78109874d4e16c2c
5
5
  SHA512:
6
- metadata.gz: 96a369151547d0cfba4b61a0776013db3ccb63172ae51b948e5b52637ab9bf16fbde5d32654d29a4f4a16ea534aeace8353f1ae1f739141f6f2b8307604bf6f7
7
- data.tar.gz: 5c30bc833f4b9d5bf02d202aac2c1c29abd1b0ee5481cbc9a0ef3516318d8a51ca5f8c2da6740c029e93d16115904192add23d3e839719d025f3935e9a93a695
6
+ metadata.gz: 64276bf68cd5d90cbda50a3c6a6cf30a761fb8ba8f9d98b4c0dadbdb4f365fe49dc20aaea6c8c485e395076b3b33a13576f9f443176235797f7e3999317c1b77
7
+ data.tar.gz: f1e60b666372844d91f10e2d358a250826286845be052e1352ac9922ddd686869420f15a3de3e8a882157c2483914b498891631d7c09f77ff9bf9f401280c9f3
data/README.md CHANGED
@@ -94,7 +94,7 @@ DockHealthApi::TaskList.delete(id: "<tasklist ID>")
94
94
  params = { taskList: { type: "tasklist type", id: "<tasklist id>" }, user: { type: "user type", id: "<user id>" } }
95
95
  DockHealthApi::TaskList::User.put(params)
96
96
  # Update role for existing user in tasklist
97
- params = { taskList: { type: "tasklist type", id: "<tasklist id>" }, user: { type: "user type", id: "<user id>", userRole: "user role"} }
97
+ params = { taskList: { type: "tasklist type", id: "<tasklist id>" }, user: { type: "user type", id: "<user id>" }, userRole: "user role" }
98
98
  DockHealthApi::TaskList::User.update(params)
99
99
  # Delete existing user from tasklist
100
100
  params = { taskList: { type: "tasklist type", id: "<tasklist id>" }, user: { type: "user type", id: "<user id>" } }
@@ -114,14 +114,16 @@ DockHealthApi::Webhook.put(params)
114
114
  DockHealthApi::Webhook.delete(id: "<webhook id>")
115
115
 
116
116
  # Get Specific Organization
117
- DockHealthApi::Organization.get('id of user')
117
+ DockHealthApi::Organization.get('id of organization')
118
118
  # Create Organization
119
119
  DockHealthApi::Organization.create(organization_data)
120
120
  # Update Specific Organization
121
121
  DockHealthApi::Organization.update(updated_organization_data)
122
122
  # Delete Specific Organization (can't be an active Organization)
123
123
  DockHealthApi::Organization.delete({id: "id of organization"})
124
-
124
+ # Add User to Organization
125
+ params = { userId: "<user id>", organizationId: "<organization id>" }
126
+ DockHealthApi::Organization::User.update(params)
125
127
 
126
128
  ```
127
129
 
@@ -11,7 +11,7 @@ module DockHealthApi
11
11
  end
12
12
 
13
13
  def self.list(**params)
14
- headers = {"x-api-key": "#{ENV["DOCK_HEALTH_API"]}", "x-user-id": "#{ENV["DOCK_USER"]}", "x-organization-id": "#{ENV["DOCK_ORG"]}"}
14
+ headers = {"x-api-key": "#{ENV["DOCK_HEALTH_API"]}", "x-user-id": "#{ENV["DOCK_USER"]}", "x-organization-id": client.config.org_id}
15
15
  response = execute_request(:get, "#{resource_url}", headers: headers, params: params)
16
16
  return response.parsed
17
17
  new(response.parsed)
@@ -7,7 +7,7 @@ module DockHealthApi
7
7
  extend DockHealthApi::Crud::List
8
8
 
9
9
  def self.list(**params)
10
- headers = {"x-api-key": "#{ENV["DOCK_HEALTH_API"]}", "x-user-id": "#{ENV["DOCK_USER"]}", "x-organization-id": "#{ENV["DOCK_ORG"]}"}
10
+ headers = {"x-api-key": "#{ENV["DOCK_HEALTH_API"]}", "x-user-id": "#{ENV["DOCK_USER"]}", "x-organization-id": client.config.org_id}
11
11
  response = execute_request(:get, "#{resource_url}", headers: headers, params: params)
12
12
  return response.parsed
13
13
  new(response.parsed)
@@ -1,3 +1,3 @@
1
1
  module DockHealthApi
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dock_health_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Magomero
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-09-27 00:00:00.000000000 Z
12
+ date: 2022-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2