snap_api_client 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4a8997b767d88477c2cd711e4b0b099d6c3270e628d2c8057b9e28c50cda4c2
4
- data.tar.gz: 43d3305601a476be358f966981b5ed70e3681c220daa7a7435ac73eb75bf14e8
3
+ metadata.gz: 7a885b9fb94607059bd19e4df210a37db3e630f8b4ea36da7a1fb58fd6b0014a
4
+ data.tar.gz: 706f7fc2fa42c13b3bfd0ff0b523c2453eb6bb6ef5b0077db1e877320ec1c75f
5
5
  SHA512:
6
- metadata.gz: f34fa74573d9ea56156b6941f810d8ae27fa6517ed966ee9aa1203076b228890d9ec96cc453645ebde3cbc7fa8c25f537e2acbbbc331341d1a399eda1d31032b
7
- data.tar.gz: 6dcf7493da952c114597571853c231f6cefb82480f3751ad11257f1aec9a2b089cc3a7c40232554a19bd69298f1eb1d8248b584cad4d194c108e6b8d39b6d42d
6
+ metadata.gz: 00acec36f4a78598ff92bb33311cd74a9f0d53f364fd30b2f78466f1ee141a408dc67ae248a1dc2e2d9917b64338fd2eaef42792808cf112694974a6e12a78ea
7
+ data.tar.gz: 9eeddd9ff21fb75aab2286111fc55f6e4b89c037ab0b2a74a0781151c79923422512fe895bd4ff18293be24e6633b8c32914fc8e9613111f3938f89b8e38575d
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  API client library for consuming Snap API resources.
4
4
 
5
+ :warning: **This library is in active development and won't be stable until version 1.0** :warning:
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
@@ -5,15 +5,7 @@ module SnapAPIClient
5
5
  #
6
6
  # Configuration object to be used throughout the library.
7
7
  class Configuration
8
- attr_writer :base_url,
9
- :authentication_token
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SnapAPIClient
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  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.1.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-17 00:00:00.000000000 Z
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
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'snap_api_client/cli'
5
-
6
- SnapAPIClient::CLI::Application.start
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'thor'
4
- require 'snap_api_client'
5
- require 'snap_api_client/cli/cards'
6
- require 'snap_api_client/cli/application'
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SnapAPIClient
4
- module CLI
5
- class Application < Thor
6
- def self.exit_on_failure?
7
- true
8
- end
9
-
10
- desc 'cards',
11
- 'Perform actions on specific cards'
12
- subcommand 'cards', Cards
13
- end
14
- end
15
- end
@@ -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