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 +4 -4
- data/README.md +57 -16
- data/lib/revirow/client.rb +4 -0
- data/lib/revirow/resources/feedback.rb +23 -0
- data/lib/revirow/version.rb +1 -1
- data/lib/revirow.rb +1 -0
- data/revirow-0.1.0.gem +0 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d964e2566cd2be44b64c0138ec3c873dce7541b3f0e9e38c6cd20d8bc3a3a4b
|
|
4
|
+
data.tar.gz: a7d99e718b3298bd8437e6160aea34720b627e999b7bb984d5e3bf306723d200
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
37
|
+
```ruby
|
|
38
|
+
# Get latest changelog entries
|
|
39
|
+
response = client.changelog.list(limit: 10)
|
|
28
40
|
|
|
29
|
-
|
|
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
|
-
|
|
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
|
-
|
|
59
|
+
Submit feedback requests to a feedback board:
|
|
34
60
|
|
|
35
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
data/lib/revirow/client.rb
CHANGED
|
@@ -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
|
data/lib/revirow/version.rb
CHANGED
data/lib/revirow.rb
CHANGED
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.
|
|
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:
|