goodreads-easy-api 0.1.1 → 0.1.2
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/.gitignore +0 -0
- data/.idea/.rakeTasks +1 -1
- data/.idea/encodings.xml +0 -0
- data/.idea/goodreads-api.iml +17 -0
- data/.idea/misc.xml +0 -0
- data/.idea/modules.xml +1 -1
- data/.idea/vcs.xml +0 -0
- data/.idea/workspace.xml +156 -187
- data/.rspec +0 -0
- data/.travis.yml +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +2 -2
- data/LICENSE.txt +1 -1
- data/README.md +6 -6
- data/Rakefile +0 -0
- data/goodreads-api.gemspec +36 -0
- data/lib/goodreads.rb +13 -0
- data/lib/goodreads/api/api_instance.rb +25 -0
- data/lib/goodreads/api/author.rb +33 -0
- data/lib/goodreads/api/books.rb +47 -0
- data/lib/goodreads/api/engine.rb +5 -0
- data/lib/goodreads/{api.rb → api/handler.rb} +9 -26
- data/lib/goodreads/api/version.rb +5 -0
- metadata +18 -17
- data/.idea/goodreads-wrapper.iml +0 -16
- data/.idea/inspectionProfiles/Project_Default.xml +0 -6
- data/goodreads-wrapper.gemspec +0 -35
- data/lib/goodreads/author.rb +0 -29
- data/lib/goodreads/book.rb +0 -44
- data/lib/goodreads/review.rb +0 -2
- data/lib/goodreads/test.rb +0 -7
- data/lib/goodreads/wrapper/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c69356311c861705b1da20c9c1cf5a7818f257bfed1ec5a5b2dc33bfdfbd9e86
|
4
|
+
data.tar.gz: bf01b044311b8726355ce2564f6693d10c2d0028ce79ac95afd090d6febcee31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 108d9e69bfbde0092a56f29d03ca7badc6874bd753e0d502ad308696e5a68beeb409a9e9028834d84639632a1f7d1fd213e5fb419619ff0ac83fa9d4f9118643
|
7
|
+
data.tar.gz: c57fdcbfc1681e89fed263fe09d0b771799db7f142bcb46fe984440303b880442223c5f0790337ba6518e848b23c629c2af76a5bc5c4b117eb4cc5f801e2d1fb
|
data/.gitignore
CHANGED
File without changes
|
data/.idea/.rakeTasks
CHANGED
@@ -4,4 +4,4 @@ You are allowed to:
|
|
4
4
|
1. Remove rake task
|
5
5
|
2. Add existing rake tasks
|
6
6
|
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
-
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build goodreads-
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build goodreads-api-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install goodreads-api-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install goodreads-api-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push goodreads-api-0.1.0.gem to TODO: Set to 'http://mygemserver.com'" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
|
data/.idea/encodings.xml
CHANGED
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<shared />
|
5
|
+
</component>
|
6
|
+
<component name="NewModuleRootManager">
|
7
|
+
<content url="file://$USER_HOME$/goodreads" />
|
8
|
+
<orderEntry type="inheritedJdk" />
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
10
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, ruby-2.5.1-p57) [gem]" level="application" />
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.8.0, ruby-2.5.1-p57) [gem]" level="application" />
|
12
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.8.0, ruby-2.5.1-p57) [gem]" level="application" />
|
13
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.8.2, ruby-2.5.1-p57) [gem]" level="application" />
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.8.0, ruby-2.5.1-p57) [gem]" level="application" />
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.8.0, ruby-2.5.1-p57) [gem]" level="application" />
|
16
|
+
</component>
|
17
|
+
</module>
|
data/.idea/misc.xml
CHANGED
File without changes
|
data/.idea/modules.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<project version="4">
|
3
3
|
<component name="ProjectModuleManager">
|
4
4
|
<modules>
|
5
|
-
<module fileurl="file://$PROJECT_DIR
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/../goodreads/.idea/goodreads-api.iml" filepath="$PROJECT_DIR$/../goodreads/.idea/goodreads-api.iml" />
|
6
6
|
</modules>
|
7
7
|
</component>
|
8
8
|
</project>
|
data/.idea/vcs.xml
CHANGED
File without changes
|
data/.idea/workspace.xml
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<project version="4">
|
3
3
|
<component name="ChangeListManager">
|
4
|
-
<list default="true" id="
|
5
|
-
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
6
|
-
<change beforePath="$PROJECT_DIR$/goodreads-wrapper.gemspec" beforeDir="false" afterPath="$PROJECT_DIR$/goodreads-wrapper.gemspec" afterDir="false" />
|
7
|
-
<change beforePath="$PROJECT_DIR$/lib/goodreads/wrapper/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/goodreads/wrapper/version.rb" afterDir="false" />
|
8
|
-
</list>
|
4
|
+
<list default="true" id="94b7f7f9-9360-4fb4-903d-d5a49f9591e0" name="Default Changelist" comment="" />
|
9
5
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
10
6
|
<option name="SHOW_DIALOG" value="false" />
|
11
7
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
@@ -13,106 +9,105 @@
|
|
13
9
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
14
10
|
</component>
|
15
11
|
<component name="CoverageDataManager">
|
16
|
-
<SUITE FILE_PATH="coverage/
|
17
|
-
<SUITE FILE_PATH="coverage/
|
18
|
-
<SUITE FILE_PATH="coverage/goodreads_wrapper@wrapper.rcov" NAME="api Coverage Results" MODIFIED="1548759349417" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib/goodreads" MODULE_NAME="goodreads-wrapper" />
|
12
|
+
<SUITE FILE_PATH="coverage/goodreads_api@handler.rcov" NAME="handler Coverage Results" MODIFIED="1550674960786" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib/goodreads/api" MODULE_NAME="goodreads-api" />
|
13
|
+
<SUITE FILE_PATH="coverage/goodreads_api@api.rcov" NAME="api_instance Coverage Results" MODIFIED="1550801919796" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib" MODULE_NAME="goodreads-api" />
|
19
14
|
</component>
|
20
15
|
<component name="FileEditorManager">
|
21
|
-
<leaf
|
16
|
+
<leaf>
|
22
17
|
<file pinned="false" current-in-tab="false">
|
23
|
-
<entry file="file://$PROJECT_DIR
|
18
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads.rb">
|
24
19
|
<provider selected="true" editor-type-id="text-editor">
|
25
|
-
<state relative-caret-position="
|
26
|
-
<caret line="
|
20
|
+
<state relative-caret-position="195">
|
21
|
+
<caret line="13" selection-start-line="13" selection-end-line="13" />
|
27
22
|
</state>
|
28
23
|
</provider>
|
29
24
|
</entry>
|
30
25
|
</file>
|
31
26
|
<file pinned="false" current-in-tab="false">
|
32
|
-
<entry file="file://$PROJECT_DIR
|
33
|
-
<provider selected="true" editor-type-id="text-editor">
|
34
|
-
<state
|
35
|
-
<
|
27
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/README.md">
|
28
|
+
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
29
|
+
<state split_layout="SPLIT">
|
30
|
+
<first_editor relative-caret-position="120">
|
31
|
+
<caret line="20" column="20" selection-start-line="20" selection-start-column="20" selection-end-line="20" selection-end-column="20" />
|
32
|
+
</first_editor>
|
33
|
+
<second_editor />
|
36
34
|
</state>
|
37
35
|
</provider>
|
38
36
|
</entry>
|
39
37
|
</file>
|
40
38
|
<file pinned="false" current-in-tab="false">
|
41
|
-
<entry file="file://$PROJECT_DIR
|
39
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/version.rb">
|
42
40
|
<provider selected="true" editor-type-id="text-editor">
|
43
|
-
<state relative-caret-position="
|
44
|
-
<caret line="
|
41
|
+
<state relative-caret-position="75">
|
42
|
+
<caret line="5" selection-start-line="5" selection-end-line="5" />
|
45
43
|
</state>
|
46
44
|
</provider>
|
47
45
|
</entry>
|
48
46
|
</file>
|
49
47
|
<file pinned="false" current-in-tab="false">
|
50
|
-
<entry file="file://$PROJECT_DIR
|
51
|
-
<provider selected="true" editor-type-id="text-editor"
|
48
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/api_instance.rb">
|
49
|
+
<provider selected="true" editor-type-id="text-editor">
|
50
|
+
<state relative-caret-position="240">
|
51
|
+
<caret line="22" column="7" selection-start-line="22" selection-start-column="7" selection-end-line="22" selection-end-column="7" />
|
52
|
+
</state>
|
53
|
+
</provider>
|
52
54
|
</entry>
|
53
55
|
</file>
|
54
56
|
<file pinned="false" current-in-tab="true">
|
55
|
-
<entry file="file://$PROJECT_DIR
|
57
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/author.rb">
|
56
58
|
<provider selected="true" editor-type-id="text-editor">
|
57
|
-
<state relative-caret-position="
|
58
|
-
<caret line="
|
59
|
+
<state relative-caret-position="225">
|
60
|
+
<caret line="21" column="16" selection-start-line="21" selection-start-column="16" selection-end-line="21" selection-end-column="16" />
|
59
61
|
</state>
|
60
62
|
</provider>
|
61
63
|
</entry>
|
62
64
|
</file>
|
63
65
|
<file pinned="false" current-in-tab="false">
|
64
|
-
<entry file="file://$PROJECT_DIR
|
66
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/handler.rb">
|
65
67
|
<provider selected="true" editor-type-id="text-editor">
|
66
|
-
<state relative-caret-position="
|
67
|
-
<caret line="
|
68
|
+
<state relative-caret-position="195">
|
69
|
+
<caret line="13" column="14" selection-start-line="13" selection-start-column="14" selection-end-line="13" selection-end-column="14" />
|
68
70
|
</state>
|
69
71
|
</provider>
|
70
72
|
</entry>
|
71
73
|
</file>
|
72
74
|
<file pinned="false" current-in-tab="false">
|
73
|
-
<entry file="file://$PROJECT_DIR
|
74
|
-
<provider selected="true" editor-type-id="
|
75
|
-
<state
|
76
|
-
<
|
77
|
-
<second_editor />
|
75
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/goodreads-api.gemspec">
|
76
|
+
<provider selected="true" editor-type-id="text-editor">
|
77
|
+
<state relative-caret-position="143">
|
78
|
+
<caret line="27" column="5" selection-start-line="27" selection-start-column="5" selection-end-line="27" selection-end-column="5" />
|
78
79
|
</state>
|
79
80
|
</provider>
|
80
81
|
</entry>
|
81
82
|
</file>
|
82
83
|
<file pinned="false" current-in-tab="false">
|
83
|
-
<entry file="file://$PROJECT_DIR
|
84
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/Gemfile">
|
84
85
|
<provider selected="true" editor-type-id="text-editor" />
|
85
86
|
</entry>
|
86
87
|
</file>
|
87
88
|
<file pinned="false" current-in-tab="false">
|
88
|
-
<entry file="file://$PROJECT_DIR
|
89
|
-
<provider selected="true" editor-type-id="
|
90
|
-
<state
|
91
|
-
<
|
92
|
-
<caret line="3" selection-start-line="2" selection-end-line="3" />
|
93
|
-
</first_editor>
|
94
|
-
<second_editor />
|
89
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/engine.rb">
|
90
|
+
<provider selected="true" editor-type-id="text-editor">
|
91
|
+
<state relative-caret-position="45">
|
92
|
+
<caret line="3" column="5" selection-start-line="3" selection-start-column="5" selection-end-line="3" selection-end-column="5" />
|
95
93
|
</state>
|
96
94
|
</provider>
|
97
95
|
</entry>
|
98
96
|
</file>
|
99
97
|
<file pinned="false" current-in-tab="false">
|
100
|
-
<entry file="file://$PROJECT_DIR
|
101
|
-
<provider selected="true" editor-type-id="text-editor"
|
98
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/books.rb">
|
99
|
+
<provider selected="true" editor-type-id="text-editor">
|
100
|
+
<state relative-caret-position="135">
|
101
|
+
<caret line="9" selection-start-line="9" selection-end-line="9" />
|
102
|
+
</state>
|
103
|
+
</provider>
|
102
104
|
</entry>
|
103
105
|
</file>
|
104
106
|
</leaf>
|
105
107
|
</component>
|
106
|
-
<component name="FileTemplateManagerImpl">
|
107
|
-
<option name="RECENT_TEMPLATES">
|
108
|
-
<list>
|
109
|
-
<option value="Ruby Class Template" />
|
110
|
-
</list>
|
111
|
-
</option>
|
112
|
-
</component>
|
113
108
|
<component name="FindInProjectRecents">
|
114
109
|
<findStrings>
|
115
|
-
<find>
|
110
|
+
<find>self.</find>
|
116
111
|
</findStrings>
|
117
112
|
</component>
|
118
113
|
<component name="Git.Settings">
|
@@ -121,16 +116,19 @@
|
|
121
116
|
<component name="IdeDocumentHistory">
|
122
117
|
<option name="CHANGED_PATHS">
|
123
118
|
<list>
|
124
|
-
<option value="$PROJECT_DIR$/lib/goodreads/
|
125
|
-
<option value="$PROJECT_DIR$/
|
126
|
-
<option value="$PROJECT_DIR$/lib/goodreads/
|
127
|
-
<option value="$PROJECT_DIR$/lib/goodreads/
|
119
|
+
<option value="$PROJECT_DIR$/lib/goodreads/api/api.rb" />
|
120
|
+
<option value="$PROJECT_DIR$/lib/goodreads/api/api_instance.rb" />
|
121
|
+
<option value="$PROJECT_DIR$/lib/goodreads/api/author.rb" />
|
122
|
+
<option value="$PROJECT_DIR$/lib/goodreads/api/books.rb" />
|
123
|
+
<option value="$PROJECT_DIR$/lib/goodreads/api/handler.rb" />
|
128
124
|
<option value="$PROJECT_DIR$/lib/goodreads/api.rb" />
|
129
|
-
<option value="$PROJECT_DIR$/lib/
|
130
|
-
<option value="$PROJECT_DIR$/lib/goodreads/
|
131
|
-
<option value="$PROJECT_DIR$/lib/goodreads
|
132
|
-
<option value="$PROJECT_DIR$/goodreads-
|
133
|
-
<option value="$PROJECT_DIR
|
125
|
+
<option value="$PROJECT_DIR$/lib/api.rb" />
|
126
|
+
<option value="$PROJECT_DIR$/lib/goodreads/api/engine.rb" />
|
127
|
+
<option value="$PROJECT_DIR$/lib/goodreads.rb" />
|
128
|
+
<option value="$PROJECT_DIR$/goodreads-api.gemspec" />
|
129
|
+
<option value="$PROJECT_DIR$/../goodreads/goodreads-api.gemspec" />
|
130
|
+
<option value="$PROJECT_DIR$/../goodreads/lib/goodreads.rb" />
|
131
|
+
<option value="$PROJECT_DIR$/../goodreads/README.md" />
|
134
132
|
</list>
|
135
133
|
</option>
|
136
134
|
</component>
|
@@ -138,53 +136,53 @@
|
|
138
136
|
<option name="width" value="683" />
|
139
137
|
<option name="height" value="768" />
|
140
138
|
</component>
|
139
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
141
140
|
<component name="ProjectView">
|
142
141
|
<navigator proportions="" version="1">
|
143
142
|
<foldersAlwaysOnTop value="true" />
|
144
143
|
</navigator>
|
145
144
|
<panes>
|
146
|
-
<pane id="Scope" />
|
147
145
|
<pane id="ProjectPane">
|
148
146
|
<subPane>
|
149
147
|
<expand>
|
150
148
|
<path>
|
151
|
-
<item name="goodreads-
|
152
|
-
<item name="goodreads
|
149
|
+
<item name="goodreads-api" type="b2602c69:ProjectViewProjectNode" />
|
150
|
+
<item name="goodreads" type="462c0819:PsiDirectoryNode" />
|
153
151
|
</path>
|
154
152
|
<path>
|
155
|
-
<item name="goodreads-
|
156
|
-
<item name="goodreads
|
153
|
+
<item name="goodreads-api" type="b2602c69:ProjectViewProjectNode" />
|
154
|
+
<item name="goodreads" type="462c0819:PsiDirectoryNode" />
|
157
155
|
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
158
156
|
</path>
|
159
157
|
<path>
|
160
|
-
<item name="goodreads-
|
161
|
-
<item name="goodreads
|
158
|
+
<item name="goodreads-api" type="b2602c69:ProjectViewProjectNode" />
|
159
|
+
<item name="goodreads" type="462c0819:PsiDirectoryNode" />
|
162
160
|
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
163
161
|
<item name="goodreads" type="462c0819:PsiDirectoryNode" />
|
164
162
|
</path>
|
165
163
|
<path>
|
166
|
-
<item name="goodreads-
|
167
|
-
<item name="goodreads
|
164
|
+
<item name="goodreads-api" type="b2602c69:ProjectViewProjectNode" />
|
165
|
+
<item name="goodreads" type="462c0819:PsiDirectoryNode" />
|
168
166
|
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
169
167
|
<item name="goodreads" type="462c0819:PsiDirectoryNode" />
|
170
|
-
<item name="
|
168
|
+
<item name="api" type="462c0819:PsiDirectoryNode" />
|
171
169
|
</path>
|
172
170
|
</expand>
|
173
171
|
<select />
|
174
172
|
</subPane>
|
175
173
|
</pane>
|
174
|
+
<pane id="Scope" />
|
176
175
|
</panes>
|
177
176
|
</component>
|
178
177
|
<component name="PropertiesComponent">
|
179
178
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
180
|
-
<property name="last_opened_file_path" value="$PROJECT_DIR
|
179
|
+
<property name="last_opened_file_path" value="$PROJECT_DIR$/../projects/job_portal" />
|
181
180
|
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
182
181
|
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
183
182
|
<property name="nodejs_package_manager_path" value="npm" />
|
184
|
-
<property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
|
185
183
|
</component>
|
186
184
|
<component name="RecentsManager">
|
187
|
-
<key name="
|
185
|
+
<key name="CopyFile.RECENT_KEYS">
|
188
186
|
<recent name="$PROJECT_DIR$/lib/goodreads" />
|
189
187
|
</key>
|
190
188
|
</component>
|
@@ -200,11 +198,11 @@
|
|
200
198
|
</list>
|
201
199
|
</option>
|
202
200
|
</component>
|
203
|
-
<component name="RunManager" selected="Ruby.
|
204
|
-
<configuration name="
|
205
|
-
<module name="goodreads-
|
201
|
+
<component name="RunManager" selected="Ruby.api_instance">
|
202
|
+
<configuration name="api_instance" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
203
|
+
<module name="goodreads-api" />
|
206
204
|
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="" />
|
207
|
-
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$
|
205
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$USER_HOME$/goodreads/lib" />
|
208
206
|
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
209
207
|
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
210
208
|
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
@@ -215,14 +213,14 @@
|
|
215
213
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
216
214
|
</COVERAGE_PATTERN>
|
217
215
|
</EXTENSION>
|
218
|
-
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$
|
216
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$USER_HOME$/goodreads/lib/goodreads.rb" />
|
219
217
|
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
220
218
|
<method v="2" />
|
221
219
|
</configuration>
|
222
|
-
<configuration name="
|
223
|
-
<module name="goodreads-
|
220
|
+
<configuration name="goodreads" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
221
|
+
<module name="goodreads-api" />
|
224
222
|
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="" />
|
225
|
-
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$
|
223
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$USER_HOME$/goodreads/lib/goodreads" />
|
226
224
|
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
227
225
|
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
228
226
|
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
@@ -233,14 +231,14 @@
|
|
233
231
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
234
232
|
</COVERAGE_PATTERN>
|
235
233
|
</EXTENSION>
|
236
|
-
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$
|
234
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$USER_HOME$/goodreads/lib/goodreads/api.rb" />
|
237
235
|
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
238
236
|
<method v="2" />
|
239
237
|
</configuration>
|
240
|
-
<configuration name="
|
241
|
-
<module name="goodreads-
|
238
|
+
<configuration name="handler" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
239
|
+
<module name="goodreads-api" />
|
242
240
|
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="" />
|
243
|
-
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$
|
241
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$USER_HOME$/goodreads/lib/goodreads/api" />
|
244
242
|
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
245
243
|
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
246
244
|
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
@@ -251,15 +249,15 @@
|
|
251
249
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
252
250
|
</COVERAGE_PATTERN>
|
253
251
|
</EXTENSION>
|
254
|
-
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$
|
252
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$USER_HOME$/goodreads/lib/goodreads/api/handler.rb" />
|
255
253
|
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
256
254
|
<method v="2" />
|
257
255
|
</configuration>
|
258
256
|
<recent_temporary>
|
259
257
|
<list>
|
260
|
-
<item itemvalue="Ruby.
|
261
|
-
<item itemvalue="Ruby.
|
262
|
-
<item itemvalue="Ruby.
|
258
|
+
<item itemvalue="Ruby.api_instance" />
|
259
|
+
<item itemvalue="Ruby.goodreads" />
|
260
|
+
<item itemvalue="Ruby.handler" />
|
263
261
|
</list>
|
264
262
|
</recent_temporary>
|
265
263
|
</component>
|
@@ -269,159 +267,130 @@
|
|
269
267
|
</component>
|
270
268
|
<component name="TaskManager">
|
271
269
|
<task active="true" id="Default" summary="Default task">
|
272
|
-
<changelist id="
|
273
|
-
<created>
|
270
|
+
<changelist id="94b7f7f9-9360-4fb4-903d-d5a49f9591e0" name="Default Changelist" comment="" />
|
271
|
+
<created>1550668787932</created>
|
274
272
|
<option name="number" value="Default" />
|
275
273
|
<option name="presentableId" value="Default" />
|
276
|
-
<updated>
|
277
|
-
<workItem from="
|
278
|
-
<workItem from="1548676992017" duration="18692000" />
|
274
|
+
<updated>1550668787932</updated>
|
275
|
+
<workItem from="1550668789927" duration="21224000" />
|
279
276
|
</task>
|
280
277
|
<servers />
|
281
278
|
</component>
|
282
279
|
<component name="TimeTrackingManager">
|
283
|
-
<option name="totallyTimeSpent" value="
|
284
|
-
</component>
|
285
|
-
<component name="TodoView">
|
286
|
-
<todo-panel id="selected-file">
|
287
|
-
<is-autoscroll-to-source value="true" />
|
288
|
-
</todo-panel>
|
289
|
-
<todo-panel id="all">
|
290
|
-
<are-packages-shown value="true" />
|
291
|
-
<is-autoscroll-to-source value="true" />
|
292
|
-
</todo-panel>
|
280
|
+
<option name="totallyTimeSpent" value="21224000" />
|
293
281
|
</component>
|
294
282
|
<component name="ToolWindowManager">
|
295
|
-
<frame x="
|
296
|
-
<editor active="true" />
|
283
|
+
<frame x="61" y="25" width="1305" height="743" extended-state="6" />
|
297
284
|
<layout>
|
298
|
-
<window_info
|
299
|
-
<window_info id="
|
300
|
-
<window_info id="
|
301
|
-
<window_info anchor="bottom" id="
|
302
|
-
<window_info anchor="bottom" id="
|
303
|
-
<window_info anchor="bottom" id="
|
304
|
-
<window_info anchor="bottom" id="
|
305
|
-
<window_info anchor="bottom" id="
|
306
|
-
<window_info anchor="bottom" id="
|
307
|
-
<window_info anchor="bottom" id="
|
308
|
-
<window_info anchor="bottom" id="
|
309
|
-
<window_info anchor="bottom" id="
|
310
|
-
<window_info anchor="bottom" id="
|
311
|
-
<window_info anchor="bottom" id="
|
312
|
-
<window_info anchor="bottom" id="
|
313
|
-
<window_info anchor="right" id="
|
314
|
-
<window_info anchor="right" id="
|
315
|
-
<window_info anchor="right"
|
316
|
-
<window_info anchor="right" id="
|
285
|
+
<window_info id="Favorites" order="0" side_tool="true" />
|
286
|
+
<window_info content_ui="combo" id="Project" order="1" visible="true" weight="0.2494043" />
|
287
|
+
<window_info id="Structure" order="2" side_tool="true" weight="0.25" />
|
288
|
+
<window_info active="true" anchor="bottom" id="Terminal" order="0" visible="true" weight="0.32899022" />
|
289
|
+
<window_info anchor="bottom" id="Database Changes" order="1" />
|
290
|
+
<window_info anchor="bottom" id="Event Log" order="2" sideWeight="0.50039715" side_tool="true" weight="0.32899022" />
|
291
|
+
<window_info anchor="bottom" id="Version Control" order="3" />
|
292
|
+
<window_info anchor="bottom" id="Docker" order="4" show_stripe_button="false" />
|
293
|
+
<window_info anchor="bottom" id="Message" order="5" />
|
294
|
+
<window_info anchor="bottom" id="Find" order="6" weight="0.32899022" />
|
295
|
+
<window_info anchor="bottom" id="Run" order="7" sideWeight="0.49960285" weight="0.32899022" />
|
296
|
+
<window_info anchor="bottom" id="Debug" order="8" weight="0.4" />
|
297
|
+
<window_info anchor="bottom" id="Cvs" order="9" weight="0.25" />
|
298
|
+
<window_info anchor="bottom" id="Inspection" order="10" weight="0.4" />
|
299
|
+
<window_info anchor="bottom" id="TODO" order="11" />
|
300
|
+
<window_info anchor="right" id="Database" order="0" />
|
301
|
+
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="1" type="SLIDING" weight="0.4" />
|
302
|
+
<window_info anchor="right" id="Ant Build" order="2" weight="0.25" />
|
303
|
+
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="3" weight="0.25" />
|
317
304
|
</layout>
|
318
305
|
</component>
|
319
306
|
<component name="TypeScriptGeneratedFilesManager">
|
320
307
|
<option name="version" value="1" />
|
321
308
|
</component>
|
309
|
+
<component name="XDebuggerManager">
|
310
|
+
<breakpoint-manager>
|
311
|
+
<breakpoints>
|
312
|
+
<line-breakpoint enabled="true" type="ruby-line">
|
313
|
+
<url>file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/books.rb</url>
|
314
|
+
<line>17</line>
|
315
|
+
<option name="timeStamp" value="1" />
|
316
|
+
</line-breakpoint>
|
317
|
+
</breakpoints>
|
318
|
+
</breakpoint-manager>
|
319
|
+
</component>
|
322
320
|
<component name="editorHistoryManager">
|
323
|
-
<entry file="file://$PROJECT_DIR
|
324
|
-
<provider selected="true" editor-type-id="text-editor" />
|
325
|
-
</entry>
|
326
|
-
<entry file="file://$PROJECT_DIR$/spec/goodreads/wrapper_spec.rb">
|
327
|
-
<provider selected="true" editor-type-id="text-editor" />
|
328
|
-
</entry>
|
329
|
-
<entry file="file://$PROJECT_DIR$/.rspec">
|
330
|
-
<provider selected="true" editor-type-id="text-editor" />
|
331
|
-
</entry>
|
332
|
-
<entry file="file:///usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb">
|
321
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/books.rb">
|
333
322
|
<provider selected="true" editor-type-id="text-editor">
|
334
|
-
<state relative-caret-position="
|
335
|
-
<caret line="
|
323
|
+
<state relative-caret-position="135">
|
324
|
+
<caret line="9" selection-start-line="9" selection-end-line="9" />
|
336
325
|
</state>
|
337
326
|
</provider>
|
338
327
|
</entry>
|
339
|
-
<entry file="file://$PROJECT_DIR$/
|
340
|
-
<provider selected="true" editor-type-id="text-editor" />
|
341
|
-
</entry>
|
342
|
-
<entry file="file://$PROJECT_DIR$/lib/goodreads/find.rb">
|
343
|
-
<provider selected="true" editor-type-id="text-editor" />
|
344
|
-
</entry>
|
345
|
-
<entry file="file://$PROJECT_DIR$/lib/goodreads/review.rb">
|
328
|
+
<entry file="file://$PROJECT_DIR$/lib/goodreads/api.rb">
|
346
329
|
<provider selected="true" editor-type-id="text-editor">
|
347
|
-
<state relative-caret-position="
|
348
|
-
<caret line="
|
330
|
+
<state relative-caret-position="180">
|
331
|
+
<caret line="12" column="20" selection-start-line="12" selection-start-column="20" selection-end-line="12" selection-end-column="20" />
|
349
332
|
</state>
|
350
333
|
</provider>
|
351
334
|
</entry>
|
352
|
-
<entry file="file://$PROJECT_DIR
|
335
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/engine.rb">
|
353
336
|
<provider selected="true" editor-type-id="text-editor">
|
354
|
-
<state relative-caret-position="
|
355
|
-
<caret line="
|
337
|
+
<state relative-caret-position="45">
|
338
|
+
<caret line="3" column="5" selection-start-line="3" selection-start-column="5" selection-end-line="3" selection-end-column="5" />
|
356
339
|
</state>
|
357
340
|
</provider>
|
358
341
|
</entry>
|
359
|
-
<entry file="file://$PROJECT_DIR
|
342
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/Gemfile">
|
343
|
+
<provider selected="true" editor-type-id="text-editor" />
|
344
|
+
</entry>
|
345
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/api_instance.rb">
|
360
346
|
<provider selected="true" editor-type-id="text-editor">
|
361
|
-
<state relative-caret-position="
|
362
|
-
<caret line="
|
347
|
+
<state relative-caret-position="240">
|
348
|
+
<caret line="22" column="7" selection-start-line="22" selection-start-column="7" selection-end-line="22" selection-end-column="7" />
|
363
349
|
</state>
|
364
350
|
</provider>
|
365
351
|
</entry>
|
366
|
-
<entry file="file://$PROJECT_DIR
|
352
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/version.rb">
|
367
353
|
<provider selected="true" editor-type-id="text-editor">
|
368
|
-
<state relative-caret-position="
|
369
|
-
<caret line="
|
354
|
+
<state relative-caret-position="75">
|
355
|
+
<caret line="5" selection-start-line="5" selection-end-line="5" />
|
370
356
|
</state>
|
371
357
|
</provider>
|
372
358
|
</entry>
|
373
|
-
<entry file="file://$PROJECT_DIR
|
359
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/goodreads-api.gemspec">
|
374
360
|
<provider selected="true" editor-type-id="text-editor">
|
375
|
-
<state relative-caret-position="
|
376
|
-
<caret line="
|
361
|
+
<state relative-caret-position="143">
|
362
|
+
<caret line="27" column="5" selection-start-line="27" selection-start-column="5" selection-end-line="27" selection-end-column="5" />
|
377
363
|
</state>
|
378
364
|
</provider>
|
379
365
|
</entry>
|
380
|
-
<entry file="file://$PROJECT_DIR
|
381
|
-
<provider selected="true" editor-type-id="text-editor"
|
382
|
-
|
383
|
-
|
384
|
-
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
385
|
-
<state split_layout="SPLIT">
|
386
|
-
<first_editor />
|
387
|
-
<second_editor />
|
366
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads.rb">
|
367
|
+
<provider selected="true" editor-type-id="text-editor">
|
368
|
+
<state relative-caret-position="195">
|
369
|
+
<caret line="13" selection-start-line="13" selection-end-line="13" />
|
388
370
|
</state>
|
389
371
|
</provider>
|
390
372
|
</entry>
|
391
|
-
<entry file="file://$PROJECT_DIR
|
392
|
-
<provider selected="true" editor-type-id="text-editor" />
|
393
|
-
</entry>
|
394
|
-
<entry file="file://$PROJECT_DIR$/README.md">
|
373
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/README.md">
|
395
374
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
396
375
|
<state split_layout="SPLIT">
|
397
|
-
<first_editor relative-caret-position="
|
398
|
-
<caret line="
|
376
|
+
<first_editor relative-caret-position="120">
|
377
|
+
<caret line="20" column="20" selection-start-line="20" selection-start-column="20" selection-end-line="20" selection-end-column="20" />
|
399
378
|
</first_editor>
|
400
379
|
<second_editor />
|
401
380
|
</state>
|
402
381
|
</provider>
|
403
382
|
</entry>
|
404
|
-
<entry file="file://$PROJECT_DIR
|
405
|
-
<provider selected="true" editor-type-id="text-editor">
|
406
|
-
<state relative-caret-position="45">
|
407
|
-
<caret line="3" column="19" selection-start-line="3" selection-start-column="19" selection-end-line="3" selection-end-column="19" />
|
408
|
-
</state>
|
409
|
-
</provider>
|
410
|
-
</entry>
|
411
|
-
<entry file="file://$PROJECT_DIR$/goodreads-wrapper-0.1.0.gem">
|
412
|
-
<provider selected="true" editor-type-id="text-editor" />
|
413
|
-
</entry>
|
414
|
-
<entry file="file://$PROJECT_DIR$/goodreads-wrapper.gemspec">
|
383
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/handler.rb">
|
415
384
|
<provider selected="true" editor-type-id="text-editor">
|
416
|
-
<state relative-caret-position="
|
417
|
-
<caret line="
|
385
|
+
<state relative-caret-position="195">
|
386
|
+
<caret line="13" column="14" selection-start-line="13" selection-start-column="14" selection-end-line="13" selection-end-column="14" />
|
418
387
|
</state>
|
419
388
|
</provider>
|
420
389
|
</entry>
|
421
|
-
<entry file="file://$PROJECT_DIR
|
390
|
+
<entry file="file://$PROJECT_DIR$/../goodreads/lib/goodreads/api/author.rb">
|
422
391
|
<provider selected="true" editor-type-id="text-editor">
|
423
|
-
<state relative-caret-position="
|
424
|
-
<caret line="
|
392
|
+
<state relative-caret-position="225">
|
393
|
+
<caret line="21" column="16" selection-start-line="21" selection-start-column="16" selection-end-line="21" selection-end-column="16" />
|
425
394
|
</state>
|
426
395
|
</provider>
|
427
396
|
</entry>
|
data/.rspec
CHANGED
File without changes
|
data/.travis.yml
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Goodreads::
|
1
|
+
# Goodreads::Api
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/goodreads/
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/goodreads/api`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
5
|
TODO: Delete this and the text above, and describe your gem
|
6
6
|
|
@@ -9,7 +9,7 @@ TODO: Delete this and the text above, and describe your gem
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem 'goodreads-
|
12
|
+
gem 'goodreads-easy-api'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -18,7 +18,7 @@ And then execute:
|
|
18
18
|
|
19
19
|
Or install it yourself as:
|
20
20
|
|
21
|
-
$ gem install goodreads-
|
21
|
+
$ gem install goodreads-easy-api
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/goodreads-
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/goodreads-api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
36
|
|
37
37
|
## License
|
38
38
|
|
@@ -40,4 +40,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
40
|
|
41
41
|
## Code of Conduct
|
42
42
|
|
43
|
-
Everyone interacting in the Goodreads::
|
43
|
+
Everyone interacting in the Goodreads::Api project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/goodreads-api/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
File without changes
|
@@ -0,0 +1,36 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "./lib/goodreads/api/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "goodreads-easy-api"
|
7
|
+
spec.version = Goodreads::Api::VERSION
|
8
|
+
spec.authors = ["mohamed"]
|
9
|
+
spec.email = ["mohamedmohy216@gmail.com"]
|
10
|
+
spec.metadata['allowed_push_host'] = ["https://rubygems.org","http://rubygems.org"]
|
11
|
+
spec.summary = %q{A gem that help you using goodreads api}
|
12
|
+
spec.description = %q{this gem helps you to deal with goodreads api onli by calling methods and saves you from dealing with requests and URIs }
|
13
|
+
spec.homepage = "https://github.com/MohamedMohy/goodreads_easy_api"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
else
|
21
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
+
"public gem pushes."
|
23
|
+
end
|
24
|
+
|
25
|
+
# spec.files =["lib/goodreads.rb","lib/"]
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f)}
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
34
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
36
|
+
end
|
data/lib/goodreads.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require_relative 'goodreads/api/version'
|
2
|
+
require_relative 'goodreads/api/api_instance'
|
3
|
+
require_relative 'goodreads/api/handler'
|
4
|
+
module Goodreads
|
5
|
+
if defined?(Rails)
|
6
|
+
require 'goodreads/api/engine'
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.new(key)
|
10
|
+
Goodreads::ApiInstance.new(key)
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'active_support/core_ext/hash'
|
3
|
+
require 'openssl'
|
4
|
+
require 'json'
|
5
|
+
require_relative 'handler'
|
6
|
+
require_relative 'books'
|
7
|
+
require_relative 'author'
|
8
|
+
module Goodreads
|
9
|
+
class ApiInstance
|
10
|
+
include Goodreads::Author
|
11
|
+
include Goodreads::Books
|
12
|
+
include Goodreads::Handler
|
13
|
+
attr_reader :key
|
14
|
+
attr_reader :base_url
|
15
|
+
attr_accessor :info
|
16
|
+
|
17
|
+
def initialize(key)
|
18
|
+
@key = key
|
19
|
+
@base_url = 'www.goodreads.com'
|
20
|
+
@info ={}
|
21
|
+
@info[:key] = key
|
22
|
+
@info[:base_url] = @base_url
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require_relative 'handler'
|
2
|
+
module Goodreads
|
3
|
+
module Author
|
4
|
+
def get_author_info_by_id(id)
|
5
|
+
info[:path] = '/author/show/' + id.to_s
|
6
|
+
info[:data] = { key: info[:key] }
|
7
|
+
uri = build_uri(info)
|
8
|
+
call(uri)
|
9
|
+
end
|
10
|
+
|
11
|
+
def paginate_into_author_books_by_id(id)
|
12
|
+
info[:path] = '/author/list/' + id.to_s
|
13
|
+
info[:data] = { key: info[:key] }
|
14
|
+
uri = build_uri(info)
|
15
|
+
call(uri)
|
16
|
+
end
|
17
|
+
|
18
|
+
def find_author_by_name(name)
|
19
|
+
name = name.gsub(' ', '+')
|
20
|
+
info[:path] = '/api/author_url/' + name
|
21
|
+
info[:data] = { key: info[:key] }
|
22
|
+
uri = build_uri(info)
|
23
|
+
call(uri)
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_all_series_by_an_author(id)
|
27
|
+
info[:path] = '/series/list/' + id.to_s + '.xml'
|
28
|
+
info[:data] = { key: info[:key] }
|
29
|
+
uri = build_uri(info)
|
30
|
+
call(uri)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Goodreads
|
2
|
+
module Books
|
3
|
+
|
4
|
+
def get_review_for_book_by_title(title)
|
5
|
+
info[:path] = '/book/title.xml'
|
6
|
+
info[:data] = { key: info[:key], title: title }
|
7
|
+
uri = build_uri(info)
|
8
|
+
call(uri)
|
9
|
+
end
|
10
|
+
|
11
|
+
def get_review_for_book_by_author_and_title(author, title)
|
12
|
+
info[:path] = '/book/title.xml'
|
13
|
+
info[:data] = { key: info[:key], title: title, author: author }
|
14
|
+
uri = build_uri(info)
|
15
|
+
call(uri)
|
16
|
+
end
|
17
|
+
|
18
|
+
def get_reviews_for_given_isbns(isbns)
|
19
|
+
info[:path] = '/book/review_counts.json'
|
20
|
+
info[:data] = { key: info[:key], isbns: isbns }
|
21
|
+
uri = build_uri(info)
|
22
|
+
call(uri)
|
23
|
+
end
|
24
|
+
|
25
|
+
def get_review_for_book_given_goodreads_book_id(id)
|
26
|
+
info[:path] = '/book/show/' + id.to_s + '.xml'
|
27
|
+
info[:data] = { key: info[:key] }
|
28
|
+
uri = build_uri(info)
|
29
|
+
call(uri)
|
30
|
+
end
|
31
|
+
|
32
|
+
def get_user_review_for_given_book(user_id, book_id)
|
33
|
+
info[:path] = '/review/show_by_user_and_book.xml'
|
34
|
+
info[:data] = { key: info[:key], book_id: book_id, user_id: user_id }
|
35
|
+
uri = build_uri(info)
|
36
|
+
call(uri)
|
37
|
+
end
|
38
|
+
|
39
|
+
def find_book_by_title_author_isbn(query)
|
40
|
+
query = query.gsub(' ', '+')
|
41
|
+
info[:path] = '/search/index.xml'
|
42
|
+
info[:data] = { key: info[:key], q: query }
|
43
|
+
uri = build_uri(info)
|
44
|
+
call(uri)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -1,39 +1,24 @@
|
|
1
|
-
# require "goodreads/wrapper/version"
|
2
|
-
require 'net/http'
|
3
|
-
require 'active_support/core_ext/hash'
|
4
|
-
require 'openssl'
|
5
|
-
require 'json'
|
6
|
-
|
7
1
|
module Goodreads
|
8
|
-
|
9
|
-
|
10
|
-
BASE_URL = 'www.goodreads.com'
|
11
|
-
@@API_KEY = ''
|
12
|
-
|
13
|
-
def get_base_url
|
14
|
-
BASE_URL
|
15
|
-
end
|
16
|
-
|
17
|
-
def initialize(key)
|
18
|
-
@@API_KEY = key
|
19
|
-
end
|
20
|
-
|
2
|
+
module Handler
|
21
3
|
def call(uri)
|
22
4
|
uri = URI.encode(uri.to_s)
|
23
|
-
puts uri
|
24
5
|
url = URI.parse(uri)
|
25
6
|
http = Net::HTTP.new(url.host, url.port)
|
26
7
|
http.use_ssl = true
|
27
|
-
x=http.get(url)
|
8
|
+
x = http.get(url)
|
28
9
|
if (x.body[0] == '<')
|
29
10
|
parse_xml(x)
|
30
|
-
else
|
31
|
-
|
11
|
+
else
|
12
|
+
parse_json(x)
|
32
13
|
end
|
33
|
-
|
34
14
|
return x
|
35
15
|
end
|
36
16
|
|
17
|
+
def build_uri(params)
|
18
|
+
URI::HTTPS.build(host: params[:base_url], path: params[:path],
|
19
|
+
query: URI.encode_www_form(params[:data]))
|
20
|
+
end
|
21
|
+
|
37
22
|
def parse_xml(response)
|
38
23
|
res = Hash.from_xml(response.body)
|
39
24
|
puts res
|
@@ -43,8 +28,6 @@ module Goodreads
|
|
43
28
|
res = JSON.parse(response.body)
|
44
29
|
puts res
|
45
30
|
end
|
46
|
-
|
47
31
|
end
|
48
|
-
|
49
32
|
end
|
50
33
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goodreads-easy-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- mohamed
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,8 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
description:
|
55
|
+
description: 'this gem helps you to deal with goodreads api onli by calling methods
|
56
|
+
and saves you from dealing with requests and URIs '
|
56
57
|
email:
|
57
58
|
- mohamedmohy216@gmail.com
|
58
59
|
executables: []
|
@@ -62,8 +63,7 @@ files:
|
|
62
63
|
- ".gitignore"
|
63
64
|
- ".idea/.rakeTasks"
|
64
65
|
- ".idea/encodings.xml"
|
65
|
-
- ".idea/goodreads-
|
66
|
-
- ".idea/inspectionProfiles/Project_Default.xml"
|
66
|
+
- ".idea/goodreads-api.iml"
|
67
67
|
- ".idea/misc.xml"
|
68
68
|
- ".idea/modules.xml"
|
69
69
|
- ".idea/vcs.xml"
|
@@ -77,17 +77,19 @@ files:
|
|
77
77
|
- Rakefile
|
78
78
|
- bin/console
|
79
79
|
- bin/setup
|
80
|
-
- goodreads-
|
81
|
-
- lib/goodreads
|
82
|
-
- lib/goodreads/
|
83
|
-
- lib/goodreads/
|
84
|
-
- lib/goodreads/
|
85
|
-
- lib/goodreads/
|
86
|
-
- lib/goodreads/
|
80
|
+
- goodreads-api.gemspec
|
81
|
+
- lib/goodreads.rb
|
82
|
+
- lib/goodreads/api/api_instance.rb
|
83
|
+
- lib/goodreads/api/author.rb
|
84
|
+
- lib/goodreads/api/books.rb
|
85
|
+
- lib/goodreads/api/engine.rb
|
86
|
+
- lib/goodreads/api/handler.rb
|
87
|
+
- lib/goodreads/api/version.rb
|
87
88
|
homepage: https://github.com/MohamedMohy/goodreads_easy_api
|
88
89
|
licenses:
|
89
|
-
-
|
90
|
-
metadata:
|
90
|
+
- MIT
|
91
|
+
metadata:
|
92
|
+
allowed_push_host: https://rubygems.org
|
91
93
|
post_install_message:
|
92
94
|
rdoc_options: []
|
93
95
|
require_paths:
|
@@ -107,6 +109,5 @@ rubyforge_project:
|
|
107
109
|
rubygems_version: 2.7.6
|
108
110
|
signing_key:
|
109
111
|
specification_version: 4
|
110
|
-
summary:
|
111
|
-
dealing with requests.
|
112
|
+
summary: A gem that help you using goodreads api
|
112
113
|
test_files: []
|
data/.idea/goodreads-wrapper.iml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="ModuleRunConfigurationManager">
|
4
|
-
<shared />
|
5
|
-
</component>
|
6
|
-
<component name="NewModuleRootManager">
|
7
|
-
<content url="file://$MODULE_DIR$" />
|
8
|
-
<orderEntry type="inheritedJdk" />
|
9
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
10
|
-
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.2.2, ruby-2.5.1-p57) [gem]" level="application" />
|
11
|
-
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.4, ruby-2.5.1-p57) [gem]" level="application" />
|
12
|
-
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.9.5, ruby-2.5.1-p57) [gem]" level="application" />
|
13
|
-
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, ruby-2.5.1-p57) [gem]" level="application" />
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.5, ruby-2.5.1-p57) [gem]" level="application" />
|
15
|
-
</component>
|
16
|
-
</module>
|
data/goodreads-wrapper.gemspec
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "goodreads/wrapper/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "goodreads-easy-api"
|
8
|
-
spec.version = Goodreads::Wrapper::VERSION
|
9
|
-
spec.authors = ["mohy"]
|
10
|
-
spec.email = ["mohamedmohy216@gmail.com"]
|
11
|
-
|
12
|
-
spec.summary = %q{easy to use gem, helps rails users to access goodreads api easily without dealing with requests.}
|
13
|
-
spec.homepage = "https://github.com/MohamedMohy/goodreads_easy_api"
|
14
|
-
spec.license = "None"
|
15
|
-
|
16
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
-
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
-
# if spec.respond_to?(:metadata)
|
19
|
-
# spec.metadata["allowed_push_host"] = "https://github.com/MohamedMohy/goodreads_easy_api"
|
20
|
-
# else
|
21
|
-
# raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
-
# "public gem pushes."
|
23
|
-
# end
|
24
|
-
|
25
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
26
|
-
f.match(%r{^(test|spec|features)/})
|
27
|
-
end
|
28
|
-
spec.bindir = "exe"
|
29
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
|
-
spec.require_paths = ["lib"]
|
31
|
-
|
32
|
-
spec.add_development_dependency "bundler", "~> 1.16"
|
33
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
35
|
-
end
|
data/lib/goodreads/author.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
require './api'
|
2
|
-
module Goodreads
|
3
|
-
class Author < Api
|
4
|
-
|
5
|
-
|
6
|
-
def self.get_author_info_by_id(id)
|
7
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/author/show/' + id.to_s,
|
8
|
-
query: URI.encode_www_form({key: @@API_KEY}))
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.paginate_into_author_books_by_id(id)
|
12
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/author/list/' + id.to_s,
|
13
|
-
query: URI.encode_www_form({key: @@API_KEY}))
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.find_author_by_name(name)
|
18
|
-
name = name.gsub(' ', '+')
|
19
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/api/author_url/' + name,
|
20
|
-
query: URI.encode_www_form({key: @@API_KEY}))
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.get_all_series_by_an_author(id)
|
25
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/series/list/' + id.to_s+'.xml',
|
26
|
-
query: URI.encode_www_form({key: @@API_KEY}))
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/lib/goodreads/book.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
require './api'
|
2
|
-
module Goodreads
|
3
|
-
class Book < Api
|
4
|
-
|
5
|
-
def self.get_review_for_book_by_title(title)
|
6
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/book/title.xml',
|
7
|
-
query: URI.encode_www_form({title: title,
|
8
|
-
key: @@API_KEY}))
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.get_review_for_book_by_author_and_title(author, title)
|
12
|
-
|
13
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/book/title.xml',
|
14
|
-
query: URI.encode_www_form({author: author,
|
15
|
-
title: title,
|
16
|
-
key: @@API_KEY}))
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.get_reviews_for_given_isbns(isbns)
|
20
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/book/review_counts.json',
|
21
|
-
query: URI.encode_www_form({isbns: isbns,
|
22
|
-
key: @@API_KEY}))
|
23
|
-
end
|
24
|
-
def self.get_review_for_book_given_goodreads_book_id(id)
|
25
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/book/show/'+id.to_s+'.xml',
|
26
|
-
query: URI.encode_www_form({key: @@API_KEY}))
|
27
|
-
end
|
28
|
-
def self.get_user_review_for_given_book(user_id,book_id)
|
29
|
-
|
30
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/review/show_by_user_and_book.xml',
|
31
|
-
query: URI.encode_www_form({book_id: book_id,
|
32
|
-
user_id: user_id,
|
33
|
-
key: @@API_KEY}))
|
34
|
-
def self.find_book_by_title_author_ISBN(query)
|
35
|
-
query =query.gsub(' ','+')
|
36
|
-
URI::HTTPS.build(host: Goodreads::Api::BASE_URL, path: '/search/index.xml',
|
37
|
-
query: URI.encode_www_form({q: query,
|
38
|
-
key: @@API_KEY}))
|
39
|
-
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
data/lib/goodreads/review.rb
DELETED
data/lib/goodreads/test.rb
DELETED