snap_api_client 0.1.0 → 0.2.0
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 +2 -0
- data/lib/snap_api_client/configuration.rb +2 -10
- data/lib/snap_api_client/errors.rb +0 -4
- data/lib/snap_api_client/version.rb +1 -1
- metadata +3 -8
- data/exe/snap +0 -6
- data/lib/snap_api_client/cli.rb +0 -6
- data/lib/snap_api_client/cli/application.rb +0 -15
- data/lib/snap_api_client/cli/cards.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a885b9fb94607059bd19e4df210a37db3e630f8b4ea36da7a1fb58fd6b0014a
|
4
|
+
data.tar.gz: 706f7fc2fa42c13b3bfd0ff0b523c2453eb6bb6ef5b0077db1e877320ec1c75f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00acec36f4a78598ff92bb33311cd74a9f0d53f364fd30b2f78466f1ee141a408dc67ae248a1dc2e2d9917b64338fd2eaef42792808cf112694974a6e12a78ea
|
7
|
+
data.tar.gz: 9eeddd9ff21fb75aab2286111fc55f6e4b89c037ab0b2a74a0781151c79923422512fe895bd4ff18293be24e6633b8c32914fc8e9613111f3938f89b8e38575d
|
data/README.md
CHANGED
@@ -5,15 +5,7 @@ module SnapAPIClient
|
|
5
5
|
#
|
6
6
|
# Configuration object to be used throughout the library.
|
7
7
|
class Configuration
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
def base_url
|
12
|
-
@base_url || ENV.fetch('SNAP_API_BASE_URL', 'https://snap.collabcollective.com/api/v1')
|
13
|
-
end
|
14
|
-
|
15
|
-
def authentication_token
|
16
|
-
@authentication_token || ENV['SNAP_API_TOKEN'] || raise(ConfigurationError, 'no authentication token was found')
|
17
|
-
end
|
8
|
+
attr_accessor :base_url,
|
9
|
+
:authentication_token
|
18
10
|
end
|
19
11
|
end
|
@@ -1,10 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module SnapAPIClient
|
4
|
-
# General
|
5
|
-
class ConfigurationError < StandardError; end
|
6
|
-
|
7
|
-
# HTTP
|
8
4
|
class HttpResponseError < StandardError; end
|
9
5
|
class HttpBadRequestError < HttpResponseError; end
|
10
6
|
class HttpUnauthorizedError < HttpResponseError; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snap_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lawrance Shepstone
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -83,8 +83,7 @@ dependencies:
|
|
83
83
|
description: API client library for consuming Snap API resources
|
84
84
|
email:
|
85
85
|
- lawrance@collabcollective.com
|
86
|
-
executables:
|
87
|
-
- snap
|
86
|
+
executables: []
|
88
87
|
extensions: []
|
89
88
|
extra_rdoc_files: []
|
90
89
|
files:
|
@@ -100,11 +99,7 @@ files:
|
|
100
99
|
- bin/lint
|
101
100
|
- bin/setup
|
102
101
|
- bin/test
|
103
|
-
- exe/snap
|
104
102
|
- lib/snap_api_client.rb
|
105
|
-
- lib/snap_api_client/cli.rb
|
106
|
-
- lib/snap_api_client/cli/application.rb
|
107
|
-
- lib/snap_api_client/cli/cards.rb
|
108
103
|
- lib/snap_api_client/configuration.rb
|
109
104
|
- lib/snap_api_client/errors.rb
|
110
105
|
- lib/snap_api_client/resources.rb
|
data/exe/snap
DELETED
data/lib/snap_api_client/cli.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module SnapAPIClient
|
4
|
-
module CLI
|
5
|
-
class Cards < Thor
|
6
|
-
desc 'update_review_url CARD_ID URL',
|
7
|
-
'Updates the review URL for a given card'
|
8
|
-
def update_review_url(card_id, url)
|
9
|
-
SnapAPIClient.card_resource.update_review_url(card_id, url)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|