PostlightMDTest 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fb25b7e419d7623d556303af36ad4fd9a8ea89956b5c0c0330c515b0a5ac2b8e
4
+ data.tar.gz: 7c8a96dd6f4e35d23aa7692cb22853397a005eaf7a5919843e5b04512f2dfcf9
5
+ SHA512:
6
+ metadata.gz: 4bb932f0fee51b11b04b8895025bc558fddeaf85f7fac0f0d8bc717126631920fcd13a28236801c340c566fdb251eeb56b519b87638ca708515719abd3444a3f
7
+ data.tar.gz: 80f233cddf1d87707e86d98d4d7e3bbc40189c48d1c73af4cd95a06594b3d979b36e56aa8a5f55aded6fd503e19b17793825a87aada066dd9dc4a35b168be517
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,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Mandrill API
5
+
6
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7
+
8
+ OpenAPI spec version: 0.0.9
9
+ Contact: apihelp@mandrill.com
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.4.12
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "PostlightMDTest/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "PostlightMDTest"
20
+ s.version = PostlightMDTest::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Swagger-Codegen"]
23
+ s.email = ["apihelp@mandrill.com"]
24
+ s.homepage = "https://github.com/swagger-api/swagger-codegen"
25
+ s.summary = "Mandrill API Ruby Gem"
26
+ s.description = "No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)"
27
+ s.license = "Unlicense"
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
+
41
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
42
+ s.test_files = `find spec/*`.split("\n")
43
+ s.executables = []
44
+ s.require_paths = ["lib"]
45
+ end
data/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # PostlightMDTest
2
+
3
+ PostlightMDTest - the Ruby gem for the Mandrill API
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: 0.0.9
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 PostlightMDTest.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./PostlightMDTest-1.0.0.gem
27
+ ```
28
+ (for development, run `gem install --dev ./PostlightMDTest-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 'PostlightMDTest', '~> 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 'PostlightMDTest', :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 'PostlightMDTest'
56
+
57
+ api_instance = PostlightMDTest::DefaultApi.new
58
+
59
+ body = PostlightMDTest::Body.new # Body |
60
+
61
+
62
+ begin
63
+ #/users/ping
64
+ result = api_instance.post_users_ping(body)
65
+ p result
66
+ rescue PostlightMDTest::ApiError => e
67
+ puts "Exception when calling DefaultApi->post_users_ping: #{e}"
68
+ end
69
+
70
+ ```
71
+
72
+ ## Documentation for API Endpoints
73
+
74
+ All URIs are relative to *https://mandrillapp.com/api/1.0*
75
+
76
+ Class | Method | HTTP request | Description
77
+ ------------ | ------------- | ------------- | -------------
78
+ *PostlightMDTest::DefaultApi* | [**post_users_ping**](docs/DefaultApi.md#post_users_ping) | **POST** /users/ping | /users/ping
79
+
80
+
81
+ ## Documentation for Models
82
+
83
+ - [PostlightMDTest::Body](docs/Body.md)
84
+
85
+
86
+ ## Documentation for Authorization
87
+
88
+ All endpoints do not require authorization.
89
+
data/Rakefile ADDED
@@ -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
data/docs/Body.md ADDED
@@ -0,0 +1,8 @@
1
+ # PostlightMDTest::Body
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **key** | **String** | a valid api key |
7
+
8
+
@@ -0,0 +1,56 @@
1
+ # PostlightMDTest::DefaultApi
2
+
3
+ All URIs are relative to *https://mandrillapp.com/api/1.0*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**post_users_ping**](DefaultApi.md#post_users_ping) | **POST** /users/ping | /users/ping
8
+
9
+
10
+ # **post_users_ping**
11
+ > String post_users_ping(body)
12
+
13
+ /users/ping
14
+
15
+ Validate an API key and respond to a ping
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'PostlightMDTest'
21
+
22
+ api_instance = PostlightMDTest::DefaultApi.new
23
+
24
+ body = PostlightMDTest::Body.new # Body |
25
+
26
+
27
+ begin
28
+ #/users/ping
29
+ result = api_instance.post_users_ping(body)
30
+ p result
31
+ rescue PostlightMDTest::ApiError => e
32
+ puts "Exception when calling DefaultApi->post_users_ping: #{e}"
33
+ end
34
+ ```
35
+
36
+ ### Parameters
37
+
38
+ Name | Type | Description | Notes
39
+ ------------- | ------------- | ------------- | -------------
40
+ **body** | [**Body**](Body.md)| |
41
+
42
+ ### Return type
43
+
44
+ **String**
45
+
46
+ ### Authorization
47
+
48
+ No authorization required
49
+
50
+ ### HTTP request headers
51
+
52
+ - **Content-Type**: application/json
53
+ - **Accept**: application/json
54
+
55
+
56
+
data/git_push.sh ADDED
@@ -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,77 @@
1
+ =begin
2
+ #Mandrill API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 0.0.9
7
+ Contact: apihelp@mandrill.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module PostlightMDTest
16
+ class DefaultApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # /users/ping
23
+ # Validate an API key and respond to a ping
24
+ # @param body
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [String]
27
+ def post_users_ping(body, opts = {})
28
+ data, _status_code, _headers = post_users_ping_with_http_info(body, opts)
29
+ data
30
+ end
31
+
32
+ # /users/ping
33
+ # Validate an API key and respond to a ping
34
+ # @param body
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
37
+ def post_users_ping_with_http_info(body, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DefaultApi.post_users_ping ...'
40
+ end
41
+ # verify the required parameter 'body' is set
42
+ if @api_client.config.client_side_validation && body.nil?
43
+ fail ArgumentError, "Missing the required parameter 'body' when calling DefaultApi.post_users_ping"
44
+ end
45
+ # resource path
46
+ local_var_path = '/users/ping'
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = @api_client.object_to_http_body(body)
63
+ auth_names = []
64
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'String')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: DefaultApi#post_users_ping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ end
77
+ end