pipeline_publisher_ruby 1.0.3

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4c2b5a29d81a388358a956549afccaf737530b3a
4
+ data.tar.gz: 460f48be698fbf5647cc1dd051731dcdfa8881c3
5
+ SHA512:
6
+ metadata.gz: 3dc0570feb70306824daf8626405dd1f80202e3b62ae66a11623d3ba97984dbcb63fad15ec4aee06b469c76012d26266dc874c26178e2a475b7149cd520c17fd
7
+ data.tar.gz: 52538098097548d0fc6a82adb83e562a2ce246b46f14a065013ab641b12529cb206570f02b46816786bf71199ba74a7377500f0a4e2064446b8b7a31a7709381
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ end
@@ -0,0 +1,101 @@
1
+ # pipeline_publisher_ruby
2
+
3
+ PipelinePublisher - the Ruby gem for the API v1.0.2
4
+
5
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: v1.0.2
10
+ - Package version: 1.0.0
11
+ - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build pipeline_publisher_ruby.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./pipeline_publisher_ruby-1.0.0.gem
27
+ ```
28
+ (for development, run `gem install --dev ./pipeline_publisher_ruby-1.0.0.gem` to install the development dependencies)
29
+
30
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
+
32
+ Finally add this to the Gemfile:
33
+
34
+ gem 'pipeline_publisher_ruby', '~> 1.0.0'
35
+
36
+ ### Install from Git
37
+
38
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
39
+
40
+ gem 'pipeline_publisher_ruby', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
41
+
42
+ ### Include the Ruby code directly
43
+
44
+ Include the Ruby code directly using `-I` as follows:
45
+
46
+ ```shell
47
+ ruby -Ilib script.rb
48
+ ```
49
+
50
+ ## Getting Started
51
+
52
+ Please follow the [installation](#installation) procedure and then run the following code:
53
+ ```ruby
54
+ # Load the gem
55
+ require 'pipeline_publisher_ruby'
56
+
57
+ # Setup authorization
58
+ PipelinePublisher.configure do |config|
59
+ # Configure HTTP basic authorization: basic
60
+ config.username = 'YOUR USERNAME'
61
+ config.password = 'YOUR PASSWORD'
62
+ end
63
+
64
+ api_instance = PipelinePublisher::MessagesApi.new
65
+
66
+ message = PipelinePublisher::Message.new # Message | Note: At least one key/value pair for identifiers field is required.
67
+
68
+
69
+ begin
70
+ #Creates a message on the pipeline
71
+ api_instance.messages_post(message)
72
+ rescue PipelinePublisher::ApiError => e
73
+ puts "Exception when calling MessagesApi->messages_post: #{e}"
74
+ end
75
+
76
+ ```
77
+
78
+ ## Documentation for API Endpoints
79
+
80
+ All URIs are relative to *https://localhost*
81
+
82
+ Class | Method | HTTP request | Description
83
+ ------------ | ------------- | ------------- | -------------
84
+ *PipelinePublisher::MessagesApi* | [**messages_post**](docs/MessagesApi.md#messages_post) | **POST** /messages | Creates a message on the pipeline
85
+ *PipelinePublisher::StreamMetricsApi* | [**stream_metrics_get**](docs/StreamMetricsApi.md#stream_metrics_get) | **GET** /stream_metrics | Fetches metrics about the stream
86
+
87
+
88
+ ## Documentation for Models
89
+
90
+ - [PipelinePublisher::InlineResponse200](docs/InlineResponse200.md)
91
+ - [PipelinePublisher::InlineResponse200MessagesReceived](docs/InlineResponse200MessagesReceived.md)
92
+ - [PipelinePublisher::Message](docs/Message.md)
93
+
94
+
95
+ ## Documentation for Authorization
96
+
97
+
98
+ ### basic
99
+
100
+ - **Type**: HTTP basic authentication
101
+
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,8 @@
1
+ # PipelinePublisher::InlineResponse200
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **messages_received** | [**InlineResponse200MessagesReceived**](InlineResponse200MessagesReceived.md) | | [optional]
7
+
8
+
@@ -0,0 +1,10 @@
1
+ # PipelinePublisher::InlineResponse200MessagesReceived
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **since_timestamp** | **String** | | [optional]
7
+ **until_timestamp** | **String** | | [optional]
8
+ **count** | **Integer** | | [optional]
9
+
10
+
@@ -0,0 +1,11 @@
1
+ # PipelinePublisher::Message
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **noun** | **String** | |
7
+ **meta** | **Object** | | [optional]
8
+ **identifiers** | **Object** | |
9
+ **data** | **Object** | | [optional]
10
+
11
+
@@ -0,0 +1,59 @@
1
+ # PipelinePublisher::MessagesApi
2
+
3
+ All URIs are relative to *https://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**messages_post**](MessagesApi.md#messages_post) | **POST** /messages | Creates a message on the pipeline
8
+
9
+
10
+ # **messages_post**
11
+ > messages_post(message)
12
+
13
+ Creates a message on the pipeline
14
+
15
+ ### Example
16
+ ```ruby
17
+ # load the gem
18
+ require 'pipeline_publisher_ruby'
19
+ # setup authorization
20
+ PipelinePublisher.configure do |config|
21
+ # Configure HTTP basic authorization: basic
22
+ config.username = 'YOUR USERNAME'
23
+ config.password = 'YOUR PASSWORD'
24
+ end
25
+
26
+ api_instance = PipelinePublisher::MessagesApi.new
27
+
28
+ message = PipelinePublisher::Message.new # Message | Note: At least one key/value pair for identifiers field is required.
29
+
30
+
31
+ begin
32
+ #Creates a message on the pipeline
33
+ api_instance.messages_post(message)
34
+ rescue PipelinePublisher::ApiError => e
35
+ puts "Exception when calling MessagesApi->messages_post: #{e}"
36
+ end
37
+ ```
38
+
39
+ ### Parameters
40
+
41
+ Name | Type | Description | Notes
42
+ ------------- | ------------- | ------------- | -------------
43
+ **message** | [**Message**](Message.md)| Note: At least one key/value pair for identifiers field is required. |
44
+
45
+ ### Return type
46
+
47
+ nil (empty response body)
48
+
49
+ ### Authorization
50
+
51
+ [basic](../README.md#basic)
52
+
53
+ ### HTTP request headers
54
+
55
+ - **Content-Type**: application/json
56
+ - **Accept**: Not defined
57
+
58
+
59
+
@@ -0,0 +1,63 @@
1
+ # PipelinePublisher::StreamMetricsApi
2
+
3
+ All URIs are relative to *https://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**stream_metrics_get**](StreamMetricsApi.md#stream_metrics_get) | **GET** /stream_metrics | Fetches metrics about the stream
8
+
9
+
10
+ # **stream_metrics_get**
11
+ > InlineResponse200 stream_metrics_get(opts)
12
+
13
+ Fetches metrics about the stream
14
+
15
+ ### Example
16
+ ```ruby
17
+ # load the gem
18
+ require 'pipeline_publisher_ruby'
19
+ # setup authorization
20
+ PipelinePublisher.configure do |config|
21
+ # Configure HTTP basic authorization: basic
22
+ config.username = 'YOUR USERNAME'
23
+ config.password = 'YOUR PASSWORD'
24
+ end
25
+
26
+ api_instance = PipelinePublisher::StreamMetricsApi.new
27
+
28
+ opts = {
29
+ count_since_timestamp: "count_since_timestamp_example", # String | ISO 8601 compliant timestamp to perform message count calculations from. Example: 2018-04-12T23:54:57.595123Z
30
+ count_until_timestamp: "count_until_timestamp_example" # String | ISO 8601 compliant timestamp to perform message count calculations until. Example: 2018-04-12T23:54:57.595123Z
31
+ }
32
+
33
+ begin
34
+ #Fetches metrics about the stream
35
+ result = api_instance.stream_metrics_get(opts)
36
+ p result
37
+ rescue PipelinePublisher::ApiError => e
38
+ puts "Exception when calling StreamMetricsApi->stream_metrics_get: #{e}"
39
+ end
40
+ ```
41
+
42
+ ### Parameters
43
+
44
+ Name | Type | Description | Notes
45
+ ------------- | ------------- | ------------- | -------------
46
+ **count_since_timestamp** | **String**| ISO 8601 compliant timestamp to perform message count calculations from. Example: 2018-04-12T23:54:57.595123Z | [optional]
47
+ **count_until_timestamp** | **String**| ISO 8601 compliant timestamp to perform message count calculations until. Example: 2018-04-12T23:54:57.595123Z | [optional]
48
+
49
+ ### Return type
50
+
51
+ [**InlineResponse200**](InlineResponse200.md)
52
+
53
+ ### Authorization
54
+
55
+ [basic](../README.md#basic)
56
+
57
+ ### HTTP request headers
58
+
59
+ - **Content-Type**: application/json
60
+ - **Accept**: application/json
61
+
62
+
63
+
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,44 @@
1
+ =begin
2
+ #API v1.0.2
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: v1.0.2
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'pipeline_publisher_ruby/api_client'
15
+ require 'pipeline_publisher_ruby/api_error'
16
+ require 'pipeline_publisher_ruby/version'
17
+ require 'pipeline_publisher_ruby/configuration'
18
+
19
+ # Models
20
+ require 'pipeline_publisher_ruby/models/inline_response_200'
21
+ require 'pipeline_publisher_ruby/models/inline_response_200_messages_received'
22
+ require 'pipeline_publisher_ruby/models/message'
23
+
24
+ # APIs
25
+ require 'pipeline_publisher_ruby/api/messages_api'
26
+ require 'pipeline_publisher_ruby/api/stream_metrics_api'
27
+
28
+ module PipelinePublisher
29
+ class << self
30
+ # Customize default settings for the SDK using block.
31
+ # PipelinePublisher.configure do |config|
32
+ # config.username = "xxx"
33
+ # config.password = "xxx"
34
+ # end
35
+ # If no block given, return the default Configuration object.
36
+ def configure
37
+ if block_given?
38
+ yield(Configuration.default)
39
+ else
40
+ Configuration.default
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,75 @@
1
+ =begin
2
+ #API v1.0.2
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: v1.0.2
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module PipelinePublisher
16
+ class MessagesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Creates a message on the pipeline
24
+ #
25
+ # @param message Note: At least one key/value pair for identifiers field is required.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def messages_post(message, opts = {})
29
+ messages_post_with_http_info(message, opts)
30
+ return nil
31
+ end
32
+
33
+ # Creates a message on the pipeline
34
+ #
35
+ # @param message Note: At least one key/value pair for identifiers field is required.
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
38
+ def messages_post_with_http_info(message, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: MessagesApi.messages_post ..."
41
+ end
42
+ # verify the required parameter 'message' is set
43
+ if @api_client.config.client_side_validation && message.nil?
44
+ fail ArgumentError, "Missing the required parameter 'message' when calling MessagesApi.messages_post"
45
+ end
46
+ # resource path
47
+ local_var_path = "/messages"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Content-Type'
55
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
56
+
57
+ # form parameters
58
+ form_params = {}
59
+
60
+ # http body (model)
61
+ post_body = @api_client.object_to_http_body(message)
62
+ auth_names = ['basic']
63
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names)
69
+ if @api_client.config.debugging
70
+ @api_client.config.logger.debug "API called: MessagesApi#messages_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
71
+ end
72
+ return data, status_code, headers
73
+ end
74
+ end
75
+ end