bundleup-sdk 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/CHANGELOG.md +3 -0
- data/README.md +4 -21
- data/lib/bundleup/proxy.rb +19 -17
- data/lib/bundleup/version.rb +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: 3cd00090acb55ec52d7516c10ac79b3c1bd111e049eac5f0262a678f6767f337
|
|
4
|
+
data.tar.gz: 5a6e5a00b99782483cbad0814375ab17b8d8ff6db8a42ddcde9dab4046b29f89
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40e0d45491f039bb20caefc76733a64bea90e4080a20c282e9250d7b0c3159ff56c5319389525601fd0b65c8d497cf07f7d374e16a0369752c0b730125285547
|
|
7
|
+
data.tar.gz: 75bf90c69031a5e9c01f67540497ebb57e3f9a4016343b98e58e8e2ece15928cb909949595d2a7c6c6e8525ef4eb73d6426ffa135f682f4d36ce964d2f276a86
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.1] - 2026-02-14
|
|
9
|
+
###
|
|
10
|
+
|
|
8
11
|
## [0.1.0] - 2026-01-21
|
|
9
12
|
|
|
10
13
|
### Added
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# BundleUp Ruby SDK
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/rb/bundleup)
|
|
3
|
+
[](https://badge.fury.io/rb/bundleup-sdk)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
6
|
Official Ruby client library for the [BundleUp](https://bundleup.io) API. Connect to 100+ integrations with a single, unified API.
|
|
@@ -10,7 +10,7 @@ Official Ruby client library for the [BundleUp](https://bundleup.io) API. Connec
|
|
|
10
10
|
Add this line to your application's Gemfile:
|
|
11
11
|
|
|
12
12
|
```ruby
|
|
13
|
-
gem 'bundleup'
|
|
13
|
+
gem 'bundleup-sdk'
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
And then execute:
|
|
@@ -22,7 +22,7 @@ bundle install
|
|
|
22
22
|
Or install it yourself as:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
gem install bundleup
|
|
25
|
+
gem install bundleup-sdk
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
## Requirements
|
|
@@ -33,7 +33,7 @@ gem install bundleup
|
|
|
33
33
|
## Quick Start
|
|
34
34
|
|
|
35
35
|
```ruby
|
|
36
|
-
require 'bundleup'
|
|
36
|
+
require 'bundleup-sdk'
|
|
37
37
|
|
|
38
38
|
# Initialize the client with your API key
|
|
39
39
|
client = Bundleup::Client.new(ENV['BUNDLEUP_API_KEY'])
|
|
@@ -41,12 +41,6 @@ client = Bundleup::Client.new(ENV['BUNDLEUP_API_KEY'])
|
|
|
41
41
|
# List all connections
|
|
42
42
|
connections = client.connections.list
|
|
43
43
|
puts connections
|
|
44
|
-
|
|
45
|
-
# Create a new connection
|
|
46
|
-
new_connection = client.connections.create({
|
|
47
|
-
name: 'My Connection',
|
|
48
|
-
integration_id: 'integration_123'
|
|
49
|
-
})
|
|
50
44
|
```
|
|
51
45
|
|
|
52
46
|
## Authentication
|
|
@@ -79,17 +73,6 @@ connections = client.connections.list(limit: 10, page: 1)
|
|
|
79
73
|
# Retrieve a specific connection
|
|
80
74
|
connection = client.connections.retrieve('conn_123')
|
|
81
75
|
|
|
82
|
-
# Create a new connection
|
|
83
|
-
connection = client.connections.create({
|
|
84
|
-
name: 'GitHub Connection',
|
|
85
|
-
integration_id: 'int_github'
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
# Update a connection
|
|
89
|
-
updated = client.connections.update('conn_123', {
|
|
90
|
-
name: 'Updated GitHub Connection'
|
|
91
|
-
})
|
|
92
|
-
|
|
93
76
|
# Delete a connection
|
|
94
77
|
client.connections.delete('conn_123')
|
|
95
78
|
```
|
data/lib/bundleup/proxy.rb
CHANGED
|
@@ -18,62 +18,64 @@ module Bundleup
|
|
|
18
18
|
|
|
19
19
|
# Make a GET request
|
|
20
20
|
#
|
|
21
|
-
# @param path [String] The request path
|
|
22
|
-
# @param
|
|
21
|
+
# @param path [String] The request path (can include query parameters)
|
|
22
|
+
# @param headers [Hash] Additional headers
|
|
23
23
|
# @return [Hash] Response data
|
|
24
|
-
def get(path,
|
|
25
|
-
request(:get, path,
|
|
24
|
+
def get(path, headers: {})
|
|
25
|
+
request(:get, path, nil, headers)
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
# Make a POST request
|
|
29
29
|
#
|
|
30
30
|
# @param path [String] The request path
|
|
31
31
|
# @param body [Hash] Request body
|
|
32
|
+
# @param headers [Hash] Additional headers
|
|
32
33
|
# @return [Hash] Response data
|
|
33
|
-
def post(path, body = {})
|
|
34
|
-
request(:post, path, body)
|
|
34
|
+
def post(path, body = {}, headers: {})
|
|
35
|
+
request(:post, path, body, headers)
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
# Make a PUT request
|
|
38
39
|
#
|
|
39
40
|
# @param path [String] The request path
|
|
40
41
|
# @param body [Hash] Request body
|
|
42
|
+
# @param headers [Hash] Additional headers
|
|
41
43
|
# @return [Hash] Response data
|
|
42
|
-
def put(path, body = {})
|
|
43
|
-
request(:put, path, body)
|
|
44
|
+
def put(path, body = {}, headers: {})
|
|
45
|
+
request(:put, path, body, headers)
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
# Make a PATCH request
|
|
47
49
|
#
|
|
48
50
|
# @param path [String] The request path
|
|
49
51
|
# @param body [Hash] Request body
|
|
52
|
+
# @param headers [Hash] Additional headers
|
|
50
53
|
# @return [Hash] Response data
|
|
51
|
-
def patch(path, body = {})
|
|
52
|
-
request(:patch, path, body)
|
|
54
|
+
def patch(path, body = {}, headers: {})
|
|
55
|
+
request(:patch, path, body, headers)
|
|
53
56
|
end
|
|
54
57
|
|
|
55
58
|
# Make a DELETE request
|
|
56
59
|
#
|
|
57
|
-
# @param path [String] The request path
|
|
58
|
-
# @param
|
|
60
|
+
# @param path [String] The request path (can include query parameters)
|
|
61
|
+
# @param headers [Hash] Additional headers
|
|
59
62
|
# @return [Hash] Response data
|
|
60
|
-
def delete(path,
|
|
61
|
-
request(:delete, path,
|
|
63
|
+
def delete(path, headers: {})
|
|
64
|
+
request(:delete, path, nil, headers)
|
|
62
65
|
end
|
|
63
66
|
|
|
64
67
|
private
|
|
65
68
|
|
|
66
|
-
def request(method, path, body = nil)
|
|
69
|
+
def request(method, path, body = nil, headers = {})
|
|
67
70
|
response = connection.public_send(method) do |req|
|
|
68
71
|
req.url path
|
|
69
72
|
req.headers['Content-Type'] = 'application/json'
|
|
70
73
|
req.headers['Authorization'] = "Bearer #{api_key}"
|
|
71
74
|
req.headers['BU-Connection-Id'] = connection_id
|
|
75
|
+
headers.each { |key, value| req.headers[key] = value }
|
|
72
76
|
|
|
73
77
|
if body && %i[post patch put].include?(method)
|
|
74
78
|
req.body = body.to_json
|
|
75
|
-
elsif body && method == :get
|
|
76
|
-
req.params.update(body)
|
|
77
79
|
end
|
|
78
80
|
end
|
|
79
81
|
|
data/lib/bundleup/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bundleup-sdk
|
|
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
|
- BundleUp
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-02-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|