dev_ruby 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/Gemfile +12 -0
  4. data/Gemfile.lock +20 -1
  5. data/README.md +254 -3
  6. data/dev_ruby.gemspec +1 -1
  7. data/lib/dev_ruby/client.rb +72 -0
  8. data/lib/dev_ruby/collection.rb +21 -0
  9. data/lib/dev_ruby/error.rb +5 -0
  10. data/lib/dev_ruby/helpers.rb +11 -0
  11. data/lib/dev_ruby/objects/article.rb +8 -0
  12. data/lib/dev_ruby/objects/base_object.rb +24 -0
  13. data/lib/dev_ruby/objects/comment.rb +8 -0
  14. data/lib/dev_ruby/objects/error.rb +8 -0
  15. data/lib/dev_ruby/objects/follower.rb +8 -0
  16. data/lib/dev_ruby/objects/listing.rb +12 -0
  17. data/lib/dev_ruby/objects/organization.rb +8 -0
  18. data/lib/dev_ruby/objects/podcast_episode.rb +8 -0
  19. data/lib/dev_ruby/objects/profile_image.rb +8 -0
  20. data/lib/dev_ruby/objects/tag.rb +8 -0
  21. data/lib/dev_ruby/objects/user.rb +8 -0
  22. data/lib/dev_ruby/objects/video_article.rb +8 -0
  23. data/lib/dev_ruby/resources/articles_resource.rb +169 -0
  24. data/lib/dev_ruby/resources/base_resource.rb +49 -0
  25. data/lib/dev_ruby/resources/comments_resource.rb +35 -0
  26. data/lib/dev_ruby/resources/followers_resource.rb +22 -0
  27. data/lib/dev_ruby/resources/follows_resource.rb +23 -0
  28. data/lib/dev_ruby/resources/listings_resource.rb +75 -0
  29. data/lib/dev_ruby/resources/organizations_resource.rb +67 -0
  30. data/lib/dev_ruby/resources/podcast_episodes_resource.rb +23 -0
  31. data/lib/dev_ruby/resources/profile_images_resource.rb +19 -0
  32. data/lib/dev_ruby/resources/readinglists_resource.rb +23 -0
  33. data/lib/dev_ruby/resources/tags_resource.rb +39 -0
  34. data/lib/dev_ruby/resources/users_resource.rb +41 -0
  35. data/lib/dev_ruby/version.rb +1 -1
  36. data/lib/dev_ruby.rb +37 -2
  37. metadata +31 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c97ff734180da46570fffd2b2cbf21b6c4b43ab1fb776a9c5bc6961581286dd6
4
- data.tar.gz: bd6d656db14a79f310e2428aeecc3df77382488879c1fec011045334284124ef
3
+ metadata.gz: 7a1c4336ef269ff3bdbee4f7ebeeaa9f591bdc107ae3a2a6d295bf23bbdec604
4
+ data.tar.gz: 755974cc241a6dddc39e1b28e45089302a0016aa46fa1c043a4ad8ae2e55556c
5
5
  SHA512:
6
- metadata.gz: 24293c5d54863cf0743d08117a071ebe5f52bcd2cc5807fb428b390c85ffb0f8bb32b0c1ff035e519bfaf6f1cb3147dc17f21dc13a7e258d31740f9de0414688
7
- data.tar.gz: 68fdd8fac1d3211556cd7c79a5389acd4e240e30ee68f82c218c08fffb322b93302d27126680aed885a9c1e07d8b313d24d54ef25bf231ee6aa2082e5862a04c
6
+ metadata.gz: be5cf753eb9bad7ce3e031c0644cc6ee3e187d2a818df27af8277dcbd41c89e849ec95ceb12f4a4cc3fb51b08e6f299afc3ce89d7cde2959cd712c00f1a90452
7
+ data.tar.gz: 0b6ed0bf05b1d630f79c96406db09219d6641ba2124256fec0d43426eaecafd1049b7def8f6f45495791ce3af958361357837b8d9de3d856b552916a88f99b6c
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.6
2
+ TargetRubyVersion: 2.7
3
3
  NewCops: disable
4
4
  SuggestExtensions: false
5
5
 
data/Gemfile CHANGED
@@ -10,3 +10,15 @@ gem 'rake', '~> 13.0'
10
10
  gem 'minitest', '~> 5.0'
11
11
 
12
12
  gem 'rubocop', '~> 1.21'
13
+
14
+ # HTTP/REST API client library [https://github.com/lostisland/faraday]
15
+ gem 'faraday', '~> 2.2'
16
+
17
+ # Common monads for Ruby [https://github.com/dry-rb/dry-monads]
18
+ gem 'dry-monads', '~> 1.4'
19
+
20
+ # Pretty print Ruby objects with proper indentation and colors [https://github.com/awesome-print/awesome_print]
21
+ gem 'awesome_print'
22
+
23
+ # A mixin to add configuration functionality to your classes [https://github.com/dry-rb/dry-configurable]
24
+ gem 'dry-configurable', '~> 0.15.0'
data/Gemfile.lock CHANGED
@@ -1,12 +1,26 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dev_ruby (0.1.0)
4
+ dev_ruby (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
+ awesome_print (1.9.2)
11
+ concurrent-ruby (1.1.10)
12
+ dry-configurable (0.15.0)
13
+ concurrent-ruby (~> 1.0)
14
+ dry-core (~> 0.6)
15
+ dry-core (0.7.1)
16
+ concurrent-ruby (~> 1.0)
17
+ dry-monads (1.4.0)
18
+ concurrent-ruby (~> 1.0)
19
+ dry-core (~> 0.7)
20
+ faraday (2.3.0)
21
+ faraday-net_http (~> 2.0)
22
+ ruby2_keywords (>= 0.0.4)
23
+ faraday-net_http (2.0.2)
10
24
  minitest (5.15.0)
11
25
  parallel (1.22.1)
12
26
  parser (3.1.2.0)
@@ -27,13 +41,18 @@ GEM
27
41
  rubocop-ast (1.17.0)
28
42
  parser (>= 3.1.1.0)
29
43
  ruby-progressbar (1.11.0)
44
+ ruby2_keywords (0.0.5)
30
45
  unicode-display_width (2.1.0)
31
46
 
32
47
  PLATFORMS
33
48
  arm64-darwin-21
34
49
 
35
50
  DEPENDENCIES
51
+ awesome_print
36
52
  dev_ruby!
53
+ dry-configurable (~> 0.15.0)
54
+ dry-monads (~> 1.4)
55
+ faraday (~> 2.2)
37
56
  minitest (~> 5.0)
38
57
  rake (~> 13.0)
39
58
  rubocop (~> 1.21)
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  ![test](https://github.com/nejdetkadir/dev-ruby/actions/workflows/test.yml/badge.svg?branch=main)
3
3
  ![rubocop](https://github.com/nejdetkadir/dev-ruby/actions/workflows/rubocop.yml/badge.svg?branch=main)
4
4
  [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
5
- ![Ruby Version](https://img.shields.io/badge/ruby_version->=_2.6.0-blue.svg)
5
+ ![Ruby Version](https://img.shields.io/badge/ruby_version->=_2.7.0-blue.svg)
6
6
 
7
7
  # DevRuby
8
8
  Ruby bindings for DEV API
@@ -11,7 +11,7 @@ Ruby bindings for DEV API
11
11
  Add this line to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
- gem 'dev_ruby'
14
+ gem 'dev_ruby', github: 'nejdetkadir/dev-ruby', branch: 'main'
15
15
  ```
16
16
 
17
17
  And then execute:
@@ -22,8 +22,259 @@ Or install it yourself as:
22
22
 
23
23
  $ gem install dev_ruby
24
24
 
25
+ ## Configuration
26
+ ```ruby
27
+ DevRuby.configure do |config|
28
+ config.logger = ::Logger.new($stdout).tap { |d| d.level = Logger::DEBUG }
29
+ config.log_api_bodies = true
30
+ config.per_page = 20
31
+ end
32
+ ```
33
+
25
34
  ## Usage
26
- TODO: Write usage instructions here
35
+ To access the API, you'll need to create a DevRuby::Client and pass in your API key. You can find your API key at [https://developers.forem.com/api](https://developers.forem.com/api)
36
+
37
+ ```ruby
38
+ client = DevRuby::Client.new(api_key: ENV['DEV_API_KEY'])
39
+ ```
40
+ The client then gives you access to each of the resources.
41
+
42
+ ## Resources
43
+ The gem maps as closely as we can to the DEV API so you can easily convert API examples to gem code.
44
+
45
+ Responses are returning as objects like `DevRuby::Objects::Article` with using [dry-monads](https://github.com/dry-rb/dry-monads) gem for easly error handling. Having types like `DevRuby::Objects::Article` is handy for understanding what type of object you're working with. They're built using OpenStruct so you can easily access data in a Ruby-ish way.
46
+
47
+ ```ruby
48
+ # Sample request with dry-monads
49
+
50
+ client = DevRuby::Client.new(api_key: ENV['DEV_API_KEY'])
51
+
52
+ operation = client.articles.create(title: 'My Article',
53
+ body: 'This is my article')
54
+
55
+ if operation.success?
56
+ article = operation.success
57
+
58
+ puts 'Article created successfully'
59
+ puts "Article ID: #{article.id}"
60
+ end
61
+
62
+ if operation.failure?
63
+ errors = operation.failure
64
+
65
+ puts 'Article creation failed'
66
+ puts "Error: #{errors}"
67
+ end
68
+
69
+ operation.value! # Returns the article if successful or return error if not successful
70
+ ```
71
+
72
+ ## Pagination
73
+ Some endpoints return pages of results. The result object will have a data key to access the results, as well as metadata like next_page and prev_page for retrieving the next and previous pages. You may also specify the
74
+
75
+ ```ruby
76
+ collection = client.articles.published.value!
77
+ #=> DevRuby::Collection
78
+
79
+ collection.data
80
+ #=> [#<DevRuby::Objects::Article>, #<DevRuby::Objects::Article>]
81
+
82
+ collection.data.count
83
+ #=> 3
84
+
85
+ collection.next_page
86
+ #=> "3"
87
+
88
+ collection.prev_page
89
+ #=> "1"
90
+
91
+ # Retrieve the next page
92
+ client.articles.published(per_page: 100, page: collection.next_page)
93
+ #=> DevRuby::Collection
94
+ ```
95
+
96
+ ## Articles
97
+ ```ruby
98
+ # This endpoint allows the client to retrieve a list of articles.
99
+ # By default it will return featured, published articles ordered by descending popularity.
100
+ collection = client.articles.published.value! # per_page is optional, defaults to 20.
101
+ #=> DevRuby::Collection
102
+
103
+ # This endpoint allows the client to create a new article.
104
+ article = client.articles.create(title: 'Hello, World!',
105
+ published: true,
106
+ body_markdown: 'Hello DEV, this is my first post',
107
+ tags: %w[discuss help],
108
+ series: 'Hello series').value!
109
+ #=> DevRuby::Objects::Article
110
+
111
+ # This endpoint allows the client to retrieve a list of articles. ordered by descending publish date.
112
+ collection = client.articles.latest_published.value!
113
+ #=> DevRuby::Collection
114
+
115
+ # This endpoint allows the client to retrieve a single published article given its id.
116
+ article = client.articles.find('123456').value!
117
+ #=> DevRuby::Objects::Article
118
+
119
+ # This endpoint allows the client to update an existing article.
120
+ article = client.articles.update(id: '123456',
121
+ title: 'Hello, World!').value!
122
+ #=> DevRuby::Objects::Article
123
+
124
+ # This endpoint allows the client to retrieve a single published article given its path.
125
+ article = client.articles.find_by_path(username: 'nejdetkadir', slug: 'hello-world').value!
126
+ #=> DevRuby::Objects::Article
127
+
128
+ # This endpoint allows the client to retrieve a list of published articles on behalf of an authenticated user.
129
+ # Published articles will be in reverse chronological publication order.
130
+ collection = client.articles.me.value!
131
+ #=> DevRuby::Collection
132
+
133
+ # This endpoint allows the client to retrieve a list of published articles on behalf of an authenticated user.
134
+ # Published articles will be in reverse chronological publication order
135
+ collection = client.articles.me_published.value!
136
+ #=> DevRuby::Collection
137
+
138
+ # This endpoint allows the client to retrieve a list of unpublished articles on behalf of an authenticated user.
139
+ # Unpublished articles will be in reverse chronological creation order.
140
+ collection = client.articles.me_unpublished.value!
141
+ #=> DevRuby::Collection
142
+
143
+ # This endpoint allows the client to retrieve a list of all articles on behalf of an authenticated user.
144
+ # It will return both published and unpublished articles with pagination.
145
+ # Unpublished articles will be at the top of the list in reverse chronological creation order. Published articles will follow in reverse chronological publication order
146
+ collection = client.articles.me_all.value!
147
+ #=> DevRuby::Collection
148
+
149
+ # This endpoint allows the client to retrieve a list of articles that are uploaded with a video.
150
+ # It will only return published video articles ordered by descending popularity.
151
+ collection = client.articles.videos.value!
152
+ #=> DevRuby::Collection
153
+ ```
154
+
155
+ ## Comments
156
+ ```ruby
157
+ # This endpoint allows the client to retrieve all comments belonging to an article or podcast episode as threaded conversations.
158
+ # It will return the all top level comments with their nested comments as threads. See the format specification for further details.
159
+ collection = client.comments.all.value!
160
+ #=> DevRuby::Collection
161
+
162
+ # This endpoint allows the client to retrieve a comment as well as his descendants comments.
163
+ # It will return the required comment (the root) with its nested descendants as a thread.
164
+ # See the format specification for further details.
165
+ comment = client.comments.find('123456').value!
166
+ #=> DevRuby::Objects::Comment
167
+ ```
168
+
169
+ ## Follows
170
+ ```ruby
171
+ # This endpoint allows the client to retrieve a list of the tags they follow.
172
+ collection = client.follows.followed_tags.value!
173
+ #=> DevRuby::Collection
174
+ ```
175
+
176
+ ## Followers
177
+ ```ruby
178
+ # This endpoint allows the client to retrieve a list of the followers they have.
179
+ collection = client.followers.all.value!
180
+ #=> DevRuby::Collection
181
+ ```
182
+
183
+ ## Listings
184
+ ```ruby
185
+ # This endpoint allows the client to retrieve a list of listings.
186
+ # By default it will return published listings ordered by descending freshness.
187
+ collection = client.listings.published.value!
188
+ #=> DevRuby::Collection
189
+
190
+ # This endpoint allows the client to create a new listing.
191
+ # The user creating the listing or the organization on which behalf the user is creating for need to have enough credits for this operation to be successful. The server will prioritize the organization's credits over the user's credits.
192
+ listing = client.listings.create(title: 'ACME Conference',
193
+ body_markdown: 'Awesome conference',
194
+ category: 'cfp',
195
+ tags: %w[events]).value!
196
+ #=> DevRuby::Objects::Listing
197
+
198
+ # This endpoint allows the client to retrieve a list of listings belonging to the specified category.
199
+ # By default it will return published listings ordered by descending freshness.
200
+ collection = client.listings.published_by_category(category: 'cfp').value!
201
+ #=> DevRuby::Collection
202
+
203
+ # This endpoint allows the client to retrieve a single listing given its id.
204
+ # An unpublished listing is only accessible if authentication is supplied and it belongs to the authenticated user.
205
+ listing = client.listings.find('123456').value!
206
+ #=> DevRuby::Objects::Listing
207
+
208
+ # This endpoint allows the client to update an existing listing.
209
+ article = client.listings.update(id: '123456', action: 'bump').value!
210
+ #=> DevRuby::Objects::Listing
211
+ ```
212
+
213
+ ## Organizations
214
+ ```ruby
215
+ # This endpoint allows the client to retrieve a single organization by their username.
216
+ organization = client.organizations.find_by_username('nejdetkadir').value!
217
+ #=> DevRuby::Objects::Organization
218
+
219
+ # This endpoint allows the client to retrieve a list of users belonging to the organization
220
+ collection = client.organizations.all_users_by_username(username: 'nejdetkadir').value!
221
+ #=> DevRuby::Collection
222
+
223
+ # This endpoint allows the client to retrieve a list of listings belonging to the organization
224
+ collection = client.organizations.all_listings_by_username(username: 'nejdetkadir').value!
225
+ #=> DevRuby::Collection
226
+
227
+ # This endpoint allows the client to retrieve a list of Articles belonging to the organization
228
+ collection = client.organizations.all_articles_by_username(username: 'nejdetkadir').value!
229
+ #=> DevRuby::Collection
230
+ ```
231
+
232
+ ## Podcast Episodes
233
+ ```ruby
234
+ # This endpoint allows the client to retrieve a list of podcast episodes.
235
+ collection = client.podcast_episodes.published.value!
236
+ #=> DevRuby::Collection
237
+ ```
238
+
239
+ ## Readinglists
240
+ ```ruby
241
+ # This endpoint allows the client to retrieve a list of readinglist reactions along with the related article for the authenticated user.
242
+ # Reading list will be in reverse chronological order base on the creation of the reaction.
243
+ collection = client.readinglists.all.value!
244
+ #=> DevRuby::Collection
245
+ ```
246
+
247
+ ## Tags
248
+ ```ruby
249
+ # This endpoint allows the client to retrieve a list of tags that can be used to tag articles.
250
+ # It will return tags ordered by popularity.
251
+ collection = client.tags.all.value!
252
+ #=> DevRuby::Collection
253
+
254
+ # This endpoint allows the client to retrieve a list of the tags they follow.
255
+ collection = client.tags.followed_tags.value!
256
+ #=> DevRuby::Collection
257
+ ```
258
+
259
+ ## Users
260
+ ```ruby
261
+ # This endpoint allows the client to retrieve a list of published articles on behalf of an authenticated user.
262
+ user = client.users.me.value!
263
+ #=> DevRuby::Objects::User
264
+
265
+ # This endpoint allows the client to retrieve a single user, either by id or by the user's username
266
+ user = client.users.find('123456').value!
267
+ #=> DevRuby::Objects::User
268
+
269
+ invitation = client.users.invite_user(email: 'user@example.com', name: 'string').value!
270
+ #=> true
271
+ ```
272
+
273
+ ## Profile Images
274
+ ```ruby
275
+ profile_image = client.profile_images.find_by_username('nejdetkadir').value!
276
+ #=> DevRuby::Objects::ProfileImage
277
+ ```
27
278
 
28
279
  ## Development
29
280
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/dev_ruby.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = spec.summary
13
13
  spec.homepage = 'https://github.com/nejdetkadir/dev-ruby'
14
14
  spec.license = 'MIT'
15
- spec.required_ruby_version = '>= 2.6.0'
15
+ spec.required_ruby_version = '>= 2.7.0'
16
16
 
17
17
  spec.metadata['homepage_uri'] = spec.homepage
18
18
  spec.metadata['source_code_uri'] = spec.homepage
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ class Client
5
+ BASE_URL = 'https://dev.to/api'
6
+ AUTHORIZATION_KEY = 'api-key'
7
+
8
+ attr_reader :api_key, :adapter
9
+
10
+ def initialize(api_key:, adapter: Faraday.default_adapter, stubs: nil)
11
+ @api_key = api_key
12
+ @adapter = adapter
13
+ @stubs = stubs # Test stubs for requests
14
+ end
15
+
16
+ def articles
17
+ DevRuby::Resources::ArticlesResource.new(self)
18
+ end
19
+
20
+ def comments
21
+ DevRuby::Resources::CommentsResource.new(self)
22
+ end
23
+
24
+ def follows
25
+ DevRuby::Resources::FollowsResource.new(self)
26
+ end
27
+
28
+ def followers
29
+ DevRuby::Resources::FollowersResource.new(self)
30
+ end
31
+
32
+ def listings
33
+ DevRuby::Resources::ListingsResource.new(self)
34
+ end
35
+
36
+ def organizations
37
+ DevRuby::Resources::OrganizationsResource.new(self)
38
+ end
39
+
40
+ def podcast_episodes
41
+ DevRuby::Resources::PodcastEpisodesResource.new(self)
42
+ end
43
+
44
+ def readinglist
45
+ DevRuby::Resources::ReadinglistsResource.new(self)
46
+ end
47
+
48
+ def tags
49
+ DevRuby::Resources::TagsResource.new(self)
50
+ end
51
+
52
+ def users
53
+ DevRuby::Resources::UsersResource.new(self)
54
+ end
55
+
56
+ def profile_images
57
+ DevRuby::Resources::ProfileImagesResource.new(self)
58
+ end
59
+
60
+ # rubocop:disable Layout/LineLength
61
+ def connection
62
+ @connection ||= Faraday.new(BASE_URL) do |conn|
63
+ conn.headers[AUTHORIZATION_KEY] = api_key
64
+ conn.request :json
65
+ conn.response :json, content_type: 'application/json'
66
+ conn.response :logger, DevRuby.logger, body: true, bodies: { request: true, response: true } if DevRuby.log_api_bodies
67
+ conn.adapter adapter, @stubs
68
+ end
69
+ end
70
+ # rubocop:enable Layout/LineLength
71
+ end
72
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ class Collection
5
+ attr_reader :page, :per_page, :next_page, :prev_page, :data
6
+
7
+ def self.from_response(response:, type:, params:)
8
+ new(data: response.body.map { |attrs| type.new(attrs) },
9
+ page: params[:page],
10
+ per_page: params[:per_page])
11
+ end
12
+
13
+ def initialize(data:, page:, per_page:)
14
+ @data = data
15
+ @page = page
16
+ @per_page = per_page
17
+ @next_page = data.count.positive? ? (page + 1) : nil
18
+ @prev_page = page.positive? ? (page - 1) : nil
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ class Error < StandardError; end
5
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ class Helpers
5
+ class << self
6
+ def expected_response?(response, expected_status)
7
+ response.status == expected_status
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class Article < BaseObject
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ostruct'
4
+
5
+ module DevRuby
6
+ module Objects
7
+ class BaseObject < OpenStruct
8
+ def initialize(attributes)
9
+ super to_ostruct(attributes)
10
+ end
11
+
12
+ def to_ostruct(obj)
13
+ case obj
14
+ when Hash
15
+ OpenStruct.new(obj.transform_values { |val| to_ostruct(val) })
16
+ when Array
17
+ obj.map { |o| to_ostruct(o) }
18
+ else # Assumed to be a primitive value
19
+ obj
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class Comment < BaseObject
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class Error < BaseObject
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class Follower < BaseObject
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class Listing < BaseObject
6
+ CATEGORIES = %w[
7
+ cfp forhire collabs education jobs mentors
8
+ products mentees forsale events misc
9
+ ].freeze
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class Organization < BaseObject
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class PodcastEpisode < BaseObject
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class ProfileImage < BaseObject
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class Tag < BaseObject
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class User < BaseObject
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DevRuby
4
+ module Objects
5
+ class VideoArticle < BaseObject
6
+ end
7
+ end
8
+ end