the_one_api 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eab63a106b4736953d1eaf773cfef554b7fe9a83984a7cd41596451e31c01834
4
- data.tar.gz: 6be4a461d074122e439f9a6bb08cdb3018917d81c0a717d43239610e9b58d7d8
3
+ metadata.gz: 4058d4a0d63b4cf9c206a66c611e5e7c1d40f463d310f0505ccd7f71ad5d3cc9
4
+ data.tar.gz: 134fa624639539667cd135c2ab6740d1ad3c70441b013378d350a50ee3c3fe08
5
5
  SHA512:
6
- metadata.gz: fade730fc33c878c40b9d1fad97f63385d64217ddfd7fb3a0902288476638b1cbae460e253d8fb8977d7761bbae069edf8799ee46285281561f28987eb23dbec
7
- data.tar.gz: 7ce96e59be310e63a6c70f04e44ec11f26ef04c61aba60ef3d8e61728b127359387e0d404fd942dcf501a0c1bf65567d5ae2d30522d393d3d93b27d10f0dd126
6
+ metadata.gz: 9b6d34d34ea60827e137ebd71c172e296447f07cbf9e871f00df56528c466014f9f74a3e580e9f15055a6a3722c860865c40da52d94fc51fc1dc6aff75e5f0cd
7
+ data.tar.gz: ed19bcc8fc35f82abe45fa81d3bca424969f1a44cb9a9a5a11a1764a1803b4ab3609642ce82c3e6700560bc83a3a9d6f63dc1ecfee35ccea2c87c61c61ce8e3c
data/README.md CHANGED
@@ -4,22 +4,20 @@ This is a Ruby gem that provides an SDK for interacting with [The One API](https
4
4
 
5
5
  ## Installation
6
6
 
7
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
8
-
9
7
  You don't need this source code unless you want to modify the gem. If you just want to use the package, just run:
10
8
 
11
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
9
+ $ gem install the_one_api
12
10
 
13
11
 
14
12
  If you want to build the gem from source:
15
13
 
16
- $ gem build UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+ $ gem build the_one_api
17
15
 
18
16
  ### Installing with Bundler
19
17
 
20
18
  Install the gem and add to the application's Gemfile by executing:
21
19
 
22
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
20
+ $ bundle add the_one_api
23
21
 
24
22
  ### Requirements
25
23
 
@@ -82,7 +80,10 @@ end
82
80
 
83
81
  ### Currently Supported Root Level Endpoints/Operations
84
82
 
85
- + `/movie` - list all movies, find a movie by id
83
+ | Endpoint | SDK Entry Point | Operations |
84
+ | --------- | ------------------------ | ----------------------------------- |
85
+ | `/movie` | `TheOneApi::Client.movie` | list all movies, find a movie by id |
86
+ | `/quote` | `TheOneApi::Client.quote` | list all quotes, find a quote by id |
86
87
 
87
88
  ### Currently Unsupported Features
88
89
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "the_one_api/resource_wrapper"
4
4
  require "the_one_api/resources/movie"
5
+ require "the_one_api/resources/quote"
5
6
 
6
7
  module TheOneApi
7
8
  # A client for The One Api
@@ -20,5 +21,9 @@ module TheOneApi
20
21
  def movie
21
22
  @movie ||= ResourceWrapper.new(Movie, @api_key)
22
23
  end
24
+
25
+ def quote
26
+ @quote ||= ResourceWrapper.new(Quote, @api_key)
27
+ end
23
28
  end
24
29
  end
@@ -5,8 +5,6 @@ require "the_one_api/resources/base_resource"
5
5
  module TheOneApi
6
6
  # Resource definition for Movies
7
7
  class Movie < BaseResource
8
- before_request :add_authentication_header
9
-
10
8
  get :list, "/movie", rubify_names: true
11
9
  get :find, "/movie/:id", rubify_names: true
12
10
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "the_one_api/resources/base_resource"
4
+
5
+ module TheOneApi
6
+ # Resource definition for Quotes
7
+ class Quote < BaseResource
8
+ get :list, "/quote", rubify_names: true
9
+ get :find, "/quote/:id", rubify_names: true
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TheOneApi
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_one_api
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
  - Joshua Samberg
@@ -114,6 +114,7 @@ files:
114
114
  - lib/the_one_api/resource_wrapper.rb
115
115
  - lib/the_one_api/resources/base_resource.rb
116
116
  - lib/the_one_api/resources/movie.rb
117
+ - lib/the_one_api/resources/quote.rb
117
118
  - lib/the_one_api/version.rb
118
119
  homepage: https://github.com/iceberg901/joshua-samberg-sdk
119
120
  licenses:
@@ -134,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
135
  - !ruby/object:Gem::Version
135
136
  version: '0'
136
137
  requirements: []
137
- rubygems_version: 3.4.10
138
+ rubygems_version: 3.4.14
138
139
  signing_key:
139
140
  specification_version: 4
140
141
  summary: An Ruby gem providing an SDK for interacting with The One API