polar_sh 0.1.0 → 0.1.1

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: 371122cf10062244b6f2cafb31ac73d645e49841b0bad4ecac8a518c9af1b28f
4
- data.tar.gz: ff56e2717b3ce2a12e049c0a03ab3e3e295380c407224f9cdface848af98a0e6
3
+ metadata.gz: ec3d4123f3e156b0f1831d24dd9657d0c12c34597d3123d9d22ca43913881d63
4
+ data.tar.gz: c716d766937d240ced1bb1f1fb1fa5b2a1539ff6895ae7db9077d169957d721c
5
5
  SHA512:
6
- metadata.gz: f840ba134ff22fa70445c3c7c7fe8b5a0328f82c4be9b399ee72384d69f64a36ed5267e9e0dad021db0e67937a6a1f61c44952552ad2ddef3e5c8f8407de80a0
7
- data.tar.gz: 53ceece89858ba6e827495753cd2a569084e5aa51f2edb4f518296fb3eff77740b1a6ce5819ba67175464fc841356929e3176929a3f21bdf0d402b5584f5fb30
6
+ metadata.gz: a4c7ec8ef2136ba7a530579c2f01c97ac7a030d7b31c0c0a1de5a71f4dec1d5887370f34620c9fa6a86476569456d366060e1e3d184ff0f54c2c20423ff1f118
7
+ data.tar.gz: 5f7ad2caeeff953d840da4b026ef6ee14e8ddc554760a6c405434c98a961b577da364da8deea9d120471001b5f8c0a27e714aa927c06269d2935aba75ab49b82
data/README.md CHANGED
@@ -1,34 +1,31 @@
1
- # PolarSh
1
+ # Polar.sh Ruby API client
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/polar_sh`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Still in development. [API docs](https://docs.polar.sh/api)
6
4
 
7
5
  ## Installation
8
6
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_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.
10
-
11
- Install the gem and add to the application's Gemfile by executing:
12
-
13
7
  ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
- ```
16
-
17
- If bundler is not being used to manage dependencies, install the gem by executing:
18
-
19
- ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
8
+ bundle add polar_sh
21
9
  ```
22
10
 
23
11
  ## Usage
24
12
 
25
- TODO: Write usage instructions here
13
+ ```ruby
14
+ Polar.configure do |config|
15
+ config.access_token = "polar_..."
16
+ config.sandbox = true
17
+ end
26
18
 
27
- ## Development
19
+ # Fetch a list of customers
20
+ pp Polar::Customer.list
21
+ ```
28
22
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
23
+ ## Development
30
24
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
25
+ ```sh
26
+ $ bundle
27
+ $ rake spec
28
+ ```
32
29
 
33
30
  ## Contributing
34
31
 
data/lib/polar/client.rb CHANGED
@@ -9,7 +9,7 @@ module Polar
9
9
  @connection ||= HTTP
10
10
  .persistent(Polar.config.endpoint)
11
11
  .follow
12
- .auth("Bearer #{Polar.config.api_key}")
12
+ .auth("Bearer #{Polar.config.access_token}")
13
13
  .headers(
14
14
  accept: "application/json",
15
15
  content_type: "application/json",
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Polar
4
4
  class Configuration
5
- attr_accessor :api_key
5
+ attr_accessor :access_token
6
6
  attr_accessor :sandbox
7
7
 
8
8
  alias sandbox? sandbox
data/lib/polar/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Polar
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polar_sh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  original_platform: ''
7
7
  authors: