height-api 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +4 -4
- data/README.md +6 -0
- data/height-api.gemspec +1 -1
- data/lib/height/api/tasks.rb +6 -0
- data/lib/height/model/task.rb +4 -0
- data/lib/height/request.rb +15 -0
- data/lib/height/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1aa6fe8422292bad2ef75dc3cbdf94cfc8eed5d628ec3b7ad16414acf4845b03
|
4
|
+
data.tar.gz: e3a410a55ce001c7af8aea0606a3fe73fc0786b78d8e741c9d5bf60a66d3f55b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b805ca3be1acc18914c69938398dfc26c71465107aa35469e4eb9d12dd6859656714d89f6edd068cf0cb6f93d8afca09f3820b3b2a152c709b13f8ffba689a9e
|
7
|
+
data.tar.gz: 1721360d2dd15c903449572c66782e7fb5abbd35cb9a5fa63e89c42b55a9e586f1d60933f51ced0c1a92de56283199d556caaeb80c2ef19b110e6d0b6e54c21d
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
height-api (0.0.
|
4
|
+
height-api (0.0.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -39,12 +39,12 @@ PLATFORMS
|
|
39
39
|
ruby
|
40
40
|
|
41
41
|
DEPENDENCIES
|
42
|
-
byebug
|
42
|
+
byebug (~> 11.1.3)
|
43
43
|
height-api!
|
44
44
|
rake (~> 12.0)
|
45
45
|
rspec (~> 3.0)
|
46
|
-
vcr
|
47
|
-
webmock
|
46
|
+
vcr (~> 6.0.0)
|
47
|
+
webmock (~> 3.12.2)
|
48
48
|
|
49
49
|
BUNDLED WITH
|
50
50
|
2.1.4
|
data/README.md
CHANGED
@@ -53,6 +53,12 @@ You can also get a task if you know the index or id
|
|
53
53
|
task = height.tasks.get(2)
|
54
54
|
```
|
55
55
|
|
56
|
+
And update it
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
updated_task = task.update('status' => 'inProgress')
|
60
|
+
```
|
61
|
+
|
56
62
|
## Development
|
57
63
|
|
58
64
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
data/height-api.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
16
16
|
spec.metadata["source_code_uri"] = spec.homepage
|
17
|
-
spec.metadata["changelog_uri"] = "
|
17
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
18
18
|
|
19
19
|
# Specify which files should be added to the gem when it is released.
|
20
20
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
data/lib/height/api/tasks.rb
CHANGED
data/lib/height/model/task.rb
CHANGED
data/lib/height/request.rb
CHANGED
@@ -12,4 +12,19 @@ class Height::Request
|
|
12
12
|
|
13
13
|
http.request(req)
|
14
14
|
end
|
15
|
+
|
16
|
+
def self.put(endpoint, data)
|
17
|
+
uri = URI("https://api.height.app/#{endpoint}")
|
18
|
+
http = Net::HTTP.new(uri.hostname, uri.port)
|
19
|
+
http.use_ssl = true
|
20
|
+
headers = {
|
21
|
+
'Authorization' => "api-key #{ENV['HEIGHT_API_KEY']}",
|
22
|
+
'Content-Type' => 'application/json'
|
23
|
+
}
|
24
|
+
req = Net::HTTP::Put.new(uri, headers)
|
25
|
+
req.body = data.to_json
|
26
|
+
res = http.request(req)
|
27
|
+
|
28
|
+
http.request(req)
|
29
|
+
end
|
15
30
|
end
|
data/lib/height/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: height-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mauro Morales
|
@@ -90,7 +90,7 @@ licenses:
|
|
90
90
|
metadata:
|
91
91
|
homepage_uri: https://github.com/mauromorales/height-api
|
92
92
|
source_code_uri: https://github.com/mauromorales/height-api
|
93
|
-
changelog_uri: https://github.com/mauromorales/height-api/CHANGELOG.md
|
93
|
+
changelog_uri: https://github.com/mauromorales/height-api/blob/main/CHANGELOG.md
|
94
94
|
post_install_message:
|
95
95
|
rdoc_options: []
|
96
96
|
require_paths:
|