zyphr 0.1.16 → 0.1.17
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 +1 -0
- data/docs/InboxApi.md +83 -0
- data/lib/zyphr/api/inbox_api.rb +81 -0
- data/spec/api/inbox_api_spec.rb +17 -0
- data/zyphr.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc874bcc04f01c43da7844d1d562c5e1e8720a1c791abe5988228eecf2a3486a
|
|
4
|
+
data.tar.gz: 1daf9d45e70baf4dc6bff9467cf4b4de10cf40f891812f2df5c0ac8840882b91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 885fe09a25de1fe5e69a444e341c844790fbe5b1dcb8b20dfc399647ed06858f726c911cb8eea37984c50db15ba064e1a6ae562a3794dcc7aeacb257bc655aff
|
|
7
|
+
data.tar.gz: 823f2d417febb7b5983953185586f0facbf80ff56cd7ee1618995486b56faad69afbaae47dd3079caa75d4dc88913c98412600d6520326fcfb89736784882e6a
|
data/README.md
CHANGED
|
@@ -196,6 +196,7 @@ Class | Method | HTTP request | Description
|
|
|
196
196
|
*Zyphr::InboxApi* | [**get_subscriber_notification**](docs/InboxApi.md#get_subscriber_notification) | **GET** /subscriber-inbox/{id} | Get a notification
|
|
197
197
|
*Zyphr::InboxApi* | [**get_subscriber_unread_count**](docs/InboxApi.md#get_subscriber_unread_count) | **GET** /subscriber-inbox/unread-count | Get unread count
|
|
198
198
|
*Zyphr::InboxApi* | [**get_unread_count**](docs/InboxApi.md#get_unread_count) | **GET** /inbox/unread-count | Get unread notification count
|
|
199
|
+
*Zyphr::InboxApi* | [**list_all_inbox**](docs/InboxApi.md#list_all_inbox) | **GET** /inbox/all | List all project notifications
|
|
199
200
|
*Zyphr::InboxApi* | [**list_inbox**](docs/InboxApi.md#list_inbox) | **GET** /inbox | List inbox notifications
|
|
200
201
|
*Zyphr::InboxApi* | [**list_subscriber_notifications**](docs/InboxApi.md#list_subscriber_notifications) | **GET** /subscriber-inbox | List subscriber notifications
|
|
201
202
|
*Zyphr::InboxApi* | [**mark_all_inbox_read**](docs/InboxApi.md#mark_all_inbox_read) | **POST** /inbox/read-all | Mark all notifications as read
|
data/docs/InboxApi.md
CHANGED
|
@@ -14,6 +14,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
14
14
|
| [**get_subscriber_notification**](InboxApi.md#get_subscriber_notification) | **GET** /subscriber-inbox/{id} | Get a notification |
|
|
15
15
|
| [**get_subscriber_unread_count**](InboxApi.md#get_subscriber_unread_count) | **GET** /subscriber-inbox/unread-count | Get unread count |
|
|
16
16
|
| [**get_unread_count**](InboxApi.md#get_unread_count) | **GET** /inbox/unread-count | Get unread notification count |
|
|
17
|
+
| [**list_all_inbox**](InboxApi.md#list_all_inbox) | **GET** /inbox/all | List all project notifications |
|
|
17
18
|
| [**list_inbox**](InboxApi.md#list_inbox) | **GET** /inbox | List inbox notifications |
|
|
18
19
|
| [**list_subscriber_notifications**](InboxApi.md#list_subscriber_notifications) | **GET** /subscriber-inbox | List subscriber notifications |
|
|
19
20
|
| [**mark_all_inbox_read**](InboxApi.md#mark_all_inbox_read) | **POST** /inbox/read-all | Mark all notifications as read |
|
|
@@ -729,6 +730,88 @@ end
|
|
|
729
730
|
- **Accept**: application/json
|
|
730
731
|
|
|
731
732
|
|
|
733
|
+
## list_all_inbox
|
|
734
|
+
|
|
735
|
+
> list_all_inbox(opts)
|
|
736
|
+
|
|
737
|
+
List all project notifications
|
|
738
|
+
|
|
739
|
+
List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
|
|
740
|
+
|
|
741
|
+
### Examples
|
|
742
|
+
|
|
743
|
+
```ruby
|
|
744
|
+
require 'time'
|
|
745
|
+
require 'zyphr'
|
|
746
|
+
# setup authorization
|
|
747
|
+
Zyphr.configure do |config|
|
|
748
|
+
# Configure API key authorization: ApiKeyAuth
|
|
749
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
750
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
751
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
752
|
+
end
|
|
753
|
+
|
|
754
|
+
api_instance = Zyphr::InboxApi.new
|
|
755
|
+
opts = {
|
|
756
|
+
subscriber_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | Optional subscriber filter
|
|
757
|
+
status: 'unread', # String | Filter by notification status
|
|
758
|
+
category: 'category_example', # String | Filter by category
|
|
759
|
+
search: 'search_example', # String | Search by title or body
|
|
760
|
+
limit: 56, # Integer |
|
|
761
|
+
offset: 56 # Integer |
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
begin
|
|
765
|
+
# List all project notifications
|
|
766
|
+
api_instance.list_all_inbox(opts)
|
|
767
|
+
rescue Zyphr::ApiError => e
|
|
768
|
+
puts "Error when calling InboxApi->list_all_inbox: #{e}"
|
|
769
|
+
end
|
|
770
|
+
```
|
|
771
|
+
|
|
772
|
+
#### Using the list_all_inbox_with_http_info variant
|
|
773
|
+
|
|
774
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
775
|
+
|
|
776
|
+
> <Array(nil, Integer, Hash)> list_all_inbox_with_http_info(opts)
|
|
777
|
+
|
|
778
|
+
```ruby
|
|
779
|
+
begin
|
|
780
|
+
# List all project notifications
|
|
781
|
+
data, status_code, headers = api_instance.list_all_inbox_with_http_info(opts)
|
|
782
|
+
p status_code # => 2xx
|
|
783
|
+
p headers # => { ... }
|
|
784
|
+
p data # => nil
|
|
785
|
+
rescue Zyphr::ApiError => e
|
|
786
|
+
puts "Error when calling InboxApi->list_all_inbox_with_http_info: #{e}"
|
|
787
|
+
end
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
### Parameters
|
|
791
|
+
|
|
792
|
+
| Name | Type | Description | Notes |
|
|
793
|
+
| ---- | ---- | ----------- | ----- |
|
|
794
|
+
| **subscriber_id** | **String** | Optional subscriber filter | [optional] |
|
|
795
|
+
| **status** | **String** | Filter by notification status | [optional] |
|
|
796
|
+
| **category** | **String** | Filter by category | [optional] |
|
|
797
|
+
| **search** | **String** | Search by title or body | [optional] |
|
|
798
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
799
|
+
| **offset** | **Integer** | | [optional][default to 0] |
|
|
800
|
+
|
|
801
|
+
### Return type
|
|
802
|
+
|
|
803
|
+
nil (empty response body)
|
|
804
|
+
|
|
805
|
+
### Authorization
|
|
806
|
+
|
|
807
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
808
|
+
|
|
809
|
+
### HTTP request headers
|
|
810
|
+
|
|
811
|
+
- **Content-Type**: Not defined
|
|
812
|
+
- **Accept**: Not defined
|
|
813
|
+
|
|
814
|
+
|
|
732
815
|
## list_inbox
|
|
733
816
|
|
|
734
817
|
> <InboxListResponse> list_inbox(opts)
|
data/lib/zyphr/api/inbox_api.rb
CHANGED
|
@@ -645,6 +645,87 @@ module Zyphr
|
|
|
645
645
|
return data, status_code, headers
|
|
646
646
|
end
|
|
647
647
|
|
|
648
|
+
# List all project notifications
|
|
649
|
+
# List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
|
|
650
|
+
# @param [Hash] opts the optional parameters
|
|
651
|
+
# @option opts [String] :subscriber_id Optional subscriber filter
|
|
652
|
+
# @option opts [String] :status Filter by notification status
|
|
653
|
+
# @option opts [String] :category Filter by category
|
|
654
|
+
# @option opts [String] :search Search by title or body
|
|
655
|
+
# @option opts [Integer] :limit (default to 50)
|
|
656
|
+
# @option opts [Integer] :offset (default to 0)
|
|
657
|
+
# @return [nil]
|
|
658
|
+
def list_all_inbox(opts = {})
|
|
659
|
+
list_all_inbox_with_http_info(opts)
|
|
660
|
+
nil
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
# List all project notifications
|
|
664
|
+
# List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
|
|
665
|
+
# @param [Hash] opts the optional parameters
|
|
666
|
+
# @option opts [String] :subscriber_id Optional subscriber filter
|
|
667
|
+
# @option opts [String] :status Filter by notification status
|
|
668
|
+
# @option opts [String] :category Filter by category
|
|
669
|
+
# @option opts [String] :search Search by title or body
|
|
670
|
+
# @option opts [Integer] :limit (default to 50)
|
|
671
|
+
# @option opts [Integer] :offset (default to 0)
|
|
672
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
673
|
+
def list_all_inbox_with_http_info(opts = {})
|
|
674
|
+
if @api_client.config.debugging
|
|
675
|
+
@api_client.config.logger.debug 'Calling API: InboxApi.list_all_inbox ...'
|
|
676
|
+
end
|
|
677
|
+
allowable_values = ["unread", "read", "archived"]
|
|
678
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
679
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
680
|
+
end
|
|
681
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
682
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InboxApi.list_all_inbox, must be smaller than or equal to 100.'
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
# resource path
|
|
686
|
+
local_var_path = '/inbox/all'
|
|
687
|
+
|
|
688
|
+
# query parameters
|
|
689
|
+
query_params = opts[:query_params] || {}
|
|
690
|
+
query_params[:'subscriber_id'] = opts[:'subscriber_id'] if !opts[:'subscriber_id'].nil?
|
|
691
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
692
|
+
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
|
|
693
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
694
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
695
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
696
|
+
|
|
697
|
+
# header parameters
|
|
698
|
+
header_params = opts[:header_params] || {}
|
|
699
|
+
|
|
700
|
+
# form parameters
|
|
701
|
+
form_params = opts[:form_params] || {}
|
|
702
|
+
|
|
703
|
+
# http body (model)
|
|
704
|
+
post_body = opts[:debug_body]
|
|
705
|
+
|
|
706
|
+
# return_type
|
|
707
|
+
return_type = opts[:debug_return_type]
|
|
708
|
+
|
|
709
|
+
# auth_names
|
|
710
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
711
|
+
|
|
712
|
+
new_options = opts.merge(
|
|
713
|
+
:operation => :"InboxApi.list_all_inbox",
|
|
714
|
+
:header_params => header_params,
|
|
715
|
+
:query_params => query_params,
|
|
716
|
+
:form_params => form_params,
|
|
717
|
+
:body => post_body,
|
|
718
|
+
:auth_names => auth_names,
|
|
719
|
+
:return_type => return_type
|
|
720
|
+
)
|
|
721
|
+
|
|
722
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
723
|
+
if @api_client.config.debugging
|
|
724
|
+
@api_client.config.logger.debug "API called: InboxApi#list_all_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
725
|
+
end
|
|
726
|
+
return data, status_code, headers
|
|
727
|
+
end
|
|
728
|
+
|
|
648
729
|
# List inbox notifications
|
|
649
730
|
# Retrieve in-app notifications for a subscriber. Requires subscriber_id or external_id.
|
|
650
731
|
# @param [Hash] opts the optional parameters
|
data/spec/api/inbox_api_spec.rb
CHANGED
|
@@ -154,6 +154,23 @@ describe 'InboxApi' do
|
|
|
154
154
|
end
|
|
155
155
|
end
|
|
156
156
|
|
|
157
|
+
# unit tests for list_all_inbox
|
|
158
|
+
# List all project notifications
|
|
159
|
+
# List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
|
|
160
|
+
# @param [Hash] opts the optional parameters
|
|
161
|
+
# @option opts [String] :subscriber_id Optional subscriber filter
|
|
162
|
+
# @option opts [String] :status Filter by notification status
|
|
163
|
+
# @option opts [String] :category Filter by category
|
|
164
|
+
# @option opts [String] :search Search by title or body
|
|
165
|
+
# @option opts [Integer] :limit
|
|
166
|
+
# @option opts [Integer] :offset
|
|
167
|
+
# @return [nil]
|
|
168
|
+
describe 'list_all_inbox test' do
|
|
169
|
+
it 'should work' do
|
|
170
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
157
174
|
# unit tests for list_inbox
|
|
158
175
|
# List inbox notifications
|
|
159
176
|
# Retrieve in-app notifications for a subscriber. Requires subscriber_id or external_id.
|
data/zyphr.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zyphr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zyphr
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|