hypothesis 0.0.2 → 0.0.3
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 +4 -4
- data/README.md +20 -6
- data/lib/hypothesis/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6932a1ab9d62d6efd17ec3b3481666773c238a1d
|
4
|
+
data.tar.gz: 735097cbad4a8b74579ec0b50dbf53e55b86d165
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8351021cbb35c78ffa10bef4fe88dbe5f574e6398be91d0f7174627606e645574ab82e1edd662be5f6aaf4c5862de380cb04001cc586c58c9c8e79129c407080
|
7
|
+
data.tar.gz: 0d4bd6400bdee5838299725277506e2e4058dbfc7707b45f7b2a9ea1b92ce75237e18f2fb5e5c9f5d5ec1fb91a2d23ef83a1cba74c2e97c1b7339ea0d6948454
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Unofficial [hypothesis](https://hypothes.is)
|
1
|
+
Unofficial ruby gem for the [hypothesis](https://hypothes.is) API.
|
2
2
|
|
3
3
|
### Installation
|
4
4
|
|
@@ -13,14 +13,29 @@ require 'rubygems'
|
|
13
13
|
require 'hypothesis'
|
14
14
|
|
15
15
|
hypothesis = Hypothesis::API.new('YOUR_HYPOTHESIS_API_KEY')
|
16
|
-
puts hypothesis.search({ user: '
|
16
|
+
puts hypothesis.search({ user: 'USERNAME', limit: 10 })
|
17
17
|
|
18
18
|
```
|
19
19
|
|
20
|
-
That will output
|
20
|
+
That will output an object with the found items.
|
21
|
+
|
22
|
+
Here's how you to print the title, URL, text and highlighted content:
|
21
23
|
|
22
24
|
```ruby
|
23
|
-
|
25
|
+
hypothesis = Hypothesis::API.new('YOUR_HYPOTHESIS_API_KEY')
|
26
|
+
results = hypothesis.search(user: 'USERNAME', limit: 10)
|
27
|
+
|
28
|
+
results.rows.each do |row|
|
29
|
+
puts row.document.title
|
30
|
+
puts row.uri
|
31
|
+
puts row.text unless row.text.nil?
|
32
|
+
|
33
|
+
row.target.each do |target|
|
34
|
+
puts target.selector[target.selector.length - 1].exact unless target.selector.nil?
|
35
|
+
end
|
36
|
+
|
37
|
+
puts "\n"
|
38
|
+
end
|
24
39
|
```
|
25
40
|
|
26
41
|
Currently this gem only supports the `root`, `search`, and `read` endpoints.
|
@@ -31,5 +46,4 @@ Currently this gem only supports the `root`, `search`, and `read` endpoints.
|
|
31
46
|
|
32
47
|
### License
|
33
48
|
|
34
|
-
|
35
|
-
This work is licensed under the [MIT License (MIT)](LICENSE) and it is not associated with [TinyLetter](https://www.tinyletter.com) in any way.
|
49
|
+
This work is licensed under the [MIT License (MIT)](LICENSE) and it is not associated with [Hypothes.is](https://hypothes.is) in any way.
|
data/lib/hypothesis/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hypothesis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Arce
|
@@ -64,34 +64,34 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
67
|
+
version: 0.52.1
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
74
|
+
version: 0.52.1
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: httparty
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 0.
|
81
|
+
version: 0.11.0
|
82
82
|
- - ">="
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
84
|
+
version: 0.11.0
|
85
85
|
type: :runtime
|
86
86
|
prerelease: false
|
87
87
|
version_requirements: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.
|
91
|
+
version: 0.11.0
|
92
92
|
- - ">="
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version: 0.
|
94
|
+
version: 0.11.0
|
95
95
|
description: 'Ruby API for hypothesis '
|
96
96
|
email: javierarce@gmail.com
|
97
97
|
executables:
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.6.
|
127
|
+
rubygems_version: 2.6.11
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: Ruby API for hypothesis
|