revirow 0.1.0 → 0.1.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: 2b8aad536825b4fd30fafb55b524eb41818078e2afc40d7600d7a125758196c6
4
- data.tar.gz: b22386d8e3a405c0fa138699070b94dda5bba3b79ab27cb3f1389d078721ca9e
3
+ metadata.gz: 3d964e2566cd2be44b64c0138ec3c873dce7541b3f0e9e38c6cd20d8bc3a3a4b
4
+ data.tar.gz: a7d99e718b3298bd8437e6160aea34720b627e999b7bb984d5e3bf306723d200
5
5
  SHA512:
6
- metadata.gz: 45bd145f6b69dac9c96c2d3d24f3eebfc928900d0329d86ea8ab4c5a92fb859475df60708b06ec1831b199e17c943b41039e20e14c798a805f6156414f004c71
7
- data.tar.gz: 86a401e3c53b89b323319acc7c5bd49686d50f87dca7e284da9ea4539273937374c62479fe4b1cc369b89e57eb5bd2cc89a34ae7e48e189fad85f30beb7bf535
6
+ metadata.gz: 39f9be4f8c68093593e07300a70a32dc03f66b11f6c0c2654a85995ec6403c3d2d97fe08638119dfa4011f02576b85224f6316956b248e8cf7aa8cb6ff9fc2dc
7
+ data.tar.gz: cbbd94e80bc9d3b70475d185c0873b786da78e9bddbab33d278843eba285c7ae3d882c48de05793f43544ef0e58a5c65a6d0be6cc3d4a78784d2a41d24780c92
data/README.md CHANGED
@@ -1,39 +1,80 @@
1
- # Revirow
1
+ # Revirow Ruby Gem
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- 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/revirow`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Official Ruby client for the Revirow API. Integrate changelog and feedback collection into your Ruby applications.
6
4
 
7
5
  ## Installation
8
6
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
7
  Install the gem and add to the application's Gemfile by executing:
12
8
 
13
9
  ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
10
+ bundle add revirow
15
11
  ```
16
12
 
17
13
  If bundler is not being used to manage dependencies, install the gem by executing:
18
14
 
19
15
  ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
16
+ gem install revirow
21
17
  ```
22
18
 
19
+ ## Configuration
20
+
21
+ Add your API key as an environment variable `REVIROW_KEY`. The gem will automatically use this key.
22
+
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ ### Initialize Client
26
+
27
+ ```ruby
28
+ require 'revirow'
29
+
30
+ client = Revirow::Client.new
31
+ ```
32
+
33
+ ### Changelog
34
+
35
+ Fetch changelog entries with cursor-based pagination:
26
36
 
27
- ## Development
37
+ ```ruby
38
+ # Get latest changelog entries
39
+ response = client.changelog.list(limit: 10)
28
40
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
41
+ # Access entries
42
+ response['entries'].each do |entry|
43
+ puts entry['title']
44
+ puts entry['content']
45
+ puts entry['published_at']
46
+ end
30
47
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
48
+ # Paginate through more entries
49
+ if response['pagination']['has_more']
50
+ next_page = client.changelog.list(
51
+ limit: 10,
52
+ cursor: response['pagination']['next_cursor']
53
+ )
54
+ end
55
+ ```
56
+
57
+ ### Feedback
32
58
 
33
- ## Contributing
59
+ Submit feedback requests to a feedback board:
34
60
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/revirow.
61
+ ```ruby
62
+ # Create a feedback request
63
+ response = client.feedback.create(
64
+ feedback_board_public_id: 'board_abc123',
65
+ description: 'Would love to see dark mode support!',
66
+ title: 'Dark Mode Feature Request' # optional
67
+ )
36
68
 
37
- ## License
69
+ # Response includes the created feedback request
70
+ puts response['id'] # public_id
71
+ puts response['title'] # title (if provided)
72
+ puts response['description'] # description
73
+ puts response['status'] # 'open'
74
+ puts response['created_at'] # timestamp
75
+ ```
38
76
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
77
+ **Parameters:**
78
+ - `feedback_board_public_id` (required): The public ID of the feedback board
79
+ - `description` (required): The feedback content/description
80
+ - `title` (optional): A title for the feedback request
@@ -17,6 +17,10 @@ module Revirow
17
17
  @changelog ||= Resources::Changelog.new(self)
18
18
  end
19
19
 
20
+ def feedback
21
+ @feedback ||= Resources::Feedback.new(self)
22
+ end
23
+
20
24
  def get(path, params = {})
21
25
  uri = URI("#{@base_url}#{path}")
22
26
  uri.query = URI.encode_www_form(params) unless params.empty?
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Revirow
4
+ module Resources
5
+ class Feedback
6
+ def initialize(client)
7
+ @client = client
8
+ end
9
+
10
+ def create(feedback_board_public_id:, description:, title: nil)
11
+ body = {
12
+ feedback_board_public_id: feedback_board_public_id,
13
+ feedback_request: {
14
+ description: description
15
+ }
16
+ }
17
+ body[:feedback_request][:title] = title if title
18
+
19
+ @client.post("/api/feedback", body)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Revirow
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
data/lib/revirow.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require_relative "revirow/version"
4
4
  require_relative "revirow/configuration"
5
5
  require_relative "revirow/resources/changelog"
6
+ require_relative "revirow/resources/feedback"
6
7
  require_relative "revirow/client"
7
8
 
8
9
  module Revirow
data/revirow-0.1.0.gem ADDED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revirow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Revirow
@@ -23,7 +23,9 @@ files:
23
23
  - lib/revirow/client.rb
24
24
  - lib/revirow/configuration.rb
25
25
  - lib/revirow/resources/changelog.rb
26
+ - lib/revirow/resources/feedback.rb
26
27
  - lib/revirow/version.rb
28
+ - revirow-0.1.0.gem
27
29
  - sig/revirow.rbs
28
30
  homepage: https://revirow.com
29
31
  licenses: