tryterra_api 0.1.1 → 0.1.2

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: 1bf8a25291d9fe8a19e5dacb65124541a4198d02959c7f75cdc05975de1b18ef
4
- data.tar.gz: ff6e81835b7ca261a472698fefdfeff5f6d829e4a04ecfb79c8f07b97a5dfb15
3
+ metadata.gz: 471c7ea0f4a5a8677e8d82808ed69814ebfa9673510e61ed6b09801cb70b87dd
4
+ data.tar.gz: 5d9e889ec76d43ddbf3e9fc20c46e4384d48519db5acb3fd656efa0b89815952
5
5
  SHA512:
6
- metadata.gz: 57c61b8e8dbb20b032fa64d0ee536e3c24df26bf725e305115888e2693a3f56fe913af6ca0e839f7dadc4434e868e069def486475edc9001e744ecb28475abd5
7
- data.tar.gz: dfadb9b9c4da0c47926d0ed77f224054116688ad5dff617a530cec77d5abe296379f2f3845951acea932397b8bd4b43db1cb4e9b5e63d8d2aa8417ed7fb2cd58
6
+ metadata.gz: bf497137aa00edbdee86bd1b50255f7ad45e9075a3145548df7e414d8be7388b8d66f453625d1be26fe80caf87bd1ad223f74caafaf1d349048ad554e82b6ae8
7
+ data.tar.gz: 8f98ccf27977b5f2422e650dde5670a28530fcfd68b5ad84d1a10e000f887688ee3d93c199e89421de3b56106292b14ce91180abd15d3da57d92a3b4b5f0b20c
@@ -1,3 +1,3 @@
1
1
  module TryTerra
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -0,0 +1 @@
1
+ require "try_terra"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tryterra_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Kennedy
@@ -87,18 +87,6 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - ".github/workflows/ci.yml"
91
- - ".gitignore"
92
- - ".ruby-version"
93
- - ".travis.yml"
94
- - CODE_OF_CONDUCT.md
95
- - Gemfile
96
- - Gemfile.lock
97
- - LICENSE.txt
98
- - README.md
99
- - Rakefile
100
- - bin/console
101
- - bin/setup
102
90
  - lib/try_terra.rb
103
91
  - lib/try_terra/client.rb
104
92
  - lib/try_terra/error.rb
@@ -123,7 +111,7 @@ files:
123
111
  - lib/try_terra/resources/subscriptions.rb
124
112
  - lib/try_terra/resources/user_info.rb
125
113
  - lib/try_terra/version.rb
126
- - tryterra_api.gemspec
114
+ - lib/tryterra_api.rb
127
115
  homepage: https://github.com/williamkennedy/tryterra_api
128
116
  licenses:
129
117
  - MIT
@@ -1,32 +0,0 @@
1
- name: Tests
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - "*"
7
- push:
8
- branches:
9
- - master
10
- jobs:
11
- tests:
12
- runs-on: ubuntu-latest
13
- strategy:
14
- matrix:
15
- ruby: ["2.5", "2.6", "2.7", "3.0"]
16
-
17
- steps:
18
- - uses: actions/checkout@master
19
-
20
- - name: Set up Ruby
21
- uses: ruby/setup-ruby@v1
22
- with:
23
- ruby-version: ${{ matrix.ruby }}
24
- bundler: default
25
- bundler-cache: true
26
-
27
- - name: StandardRb check
28
- run: bundle exec standardrb
29
-
30
- - name: Run tests
31
- run: |
32
- bundle exec rake test
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- *.gem
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.0.1
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.6.6
7
- before_install: gem install bundler -v 1.17.2
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at williamkennedyjnr@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in tryterra_api.gemspec
6
- gemspec
7
-
8
- gem "standard"
data/Gemfile.lock DELETED
@@ -1,74 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- tryterra_api (0.1.1)
5
- faraday (~> 1.7)
6
- faraday_middleware (~> 1.1)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- ast (2.4.2)
12
- faraday (1.8.0)
13
- faraday-em_http (~> 1.0)
14
- faraday-em_synchrony (~> 1.0)
15
- faraday-excon (~> 1.1)
16
- faraday-httpclient (~> 1.0.1)
17
- faraday-net_http (~> 1.0)
18
- faraday-net_http_persistent (~> 1.1)
19
- faraday-patron (~> 1.0)
20
- faraday-rack (~> 1.0)
21
- multipart-post (>= 1.2, < 3)
22
- ruby2_keywords (>= 0.0.4)
23
- faraday-em_http (1.0.0)
24
- faraday-em_synchrony (1.0.0)
25
- faraday-excon (1.1.0)
26
- faraday-httpclient (1.0.1)
27
- faraday-net_http (1.0.1)
28
- faraday-net_http_persistent (1.2.0)
29
- faraday-patron (1.0.0)
30
- faraday-rack (1.0.0)
31
- faraday_middleware (1.2.0)
32
- faraday (~> 1.0)
33
- minitest (5.14.4)
34
- multipart-post (2.1.1)
35
- parallel (1.21.0)
36
- parser (3.0.3.0)
37
- ast (~> 2.4.1)
38
- rainbow (3.0.0)
39
- rake (10.5.0)
40
- regexp_parser (2.1.1)
41
- rexml (3.2.5)
42
- rubocop (1.22.3)
43
- parallel (~> 1.10)
44
- parser (>= 3.0.0.0)
45
- rainbow (>= 2.2.2, < 4.0)
46
- regexp_parser (>= 1.8, < 3.0)
47
- rexml
48
- rubocop-ast (>= 1.12.0, < 2.0)
49
- ruby-progressbar (~> 1.7)
50
- unicode-display_width (>= 1.4.0, < 3.0)
51
- rubocop-ast (1.13.0)
52
- parser (>= 3.0.1.1)
53
- rubocop-performance (1.11.5)
54
- rubocop (>= 1.7.0, < 2.0)
55
- rubocop-ast (>= 0.4.0)
56
- ruby-progressbar (1.11.0)
57
- ruby2_keywords (0.0.5)
58
- standard (1.4.0)
59
- rubocop (= 1.22.3)
60
- rubocop-performance (= 1.11.5)
61
- unicode-display_width (2.1.0)
62
-
63
- PLATFORMS
64
- ruby
65
-
66
- DEPENDENCIES
67
- bundler (~> 2.2.20)
68
- minitest (~> 5.0)
69
- rake (~> 10.0)
70
- standard
71
- tryterra_api!
72
-
73
- BUNDLED WITH
74
- 2.2.20
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2021 William Kennedy
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/README.md DELETED
@@ -1,108 +0,0 @@
1
- # TryterraApi
2
-
3
-
4
- This an unoffical Ruby api wrapper for tryterra.co
5
-
6
- ## Installation
7
-
8
- Add this line to your application's Gemfile:
9
-
10
- ```ruby
11
- gem 'tryterra_api'
12
- ```
13
-
14
- And then execute:
15
-
16
- $ bundle
17
-
18
- Or install it yourself as:
19
-
20
- $ gem install tryterra_api
21
-
22
- ## Usage
23
-
24
- ```ruby
25
- client = TryTerra::Client.new(dev_id: ENV['DEV_ID'], x_api_key: ENV['API_KEY'])
26
- auth_response = client.auth.authenicate_user(resource: 'fitbit', reference_id: '1234-5678' )
27
- ```
28
-
29
-
30
- ## Resources
31
-
32
- This gem aims to map as close to the TryTerra Api as posible. Responses return ruby objects built on OpenStruct to make it easier to work with.
33
-
34
- #### Auth
35
-
36
- ```
37
- auth_response = client.auth.authenicate_user(resource: 'fitbit', reference_id: '1234-5678' ) => TryTerra::Auth
38
-
39
- client.auth.deauthenticate_user(user_id: '123')
40
- ```
41
-
42
- #### Subscriptions
43
-
44
- ```
45
- client.subscriptions
46
- ```
47
-
48
- #### User Info
49
-
50
- ```
51
- client.user_info(user_id: 'abs')
52
- ```
53
-
54
- #### Athlete
55
-
56
- ```
57
- client.athlete(user_id: 'abs')
58
- ```
59
-
60
- #### Activity
61
-
62
- ```
63
- client.activity(user_id: 'abs', start_date: '2021-01-01')
64
- ```
65
-
66
- #### Body
67
-
68
- ```
69
- client.body(user_id: 'abs', start_date: '2021-01-01')
70
- ```
71
-
72
- #### Daily
73
-
74
- ```
75
- client.daily(user_id: 'abs', start_date: '2021-01-01')
76
- ```
77
-
78
- #### Sleep
79
-
80
- ```
81
- client.sleep(user_id: 'abs', start_date: '2021-01-01')
82
- ```
83
-
84
- ### Menstruation
85
-
86
- ```
87
- client.menstruation(user_id: 'abs', start_date: '2021-01-01')
88
- ```
89
-
90
- ## Development
91
-
92
- 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.
93
-
94
- You will need a TryTerra dev_id and api_key
95
-
96
- 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
97
-
98
- ## Contributing
99
-
100
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tryterra_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
101
-
102
- ## License
103
-
104
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
105
-
106
- ## Code of Conduct
107
-
108
- Everyone interacting in the TryterraApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tryterra_api/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
8
- end
9
-
10
- task default: :test
data/bin/console DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "try_terra"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
- require "irb"
13
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/tryterra_api.gemspec DELETED
@@ -1,33 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "try_terra/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "tryterra_api"
7
- spec.version = TryTerra::VERSION
8
- spec.authors = ["William Kennedy"]
9
- spec.email = ["william.kennedy@hey.com"]
10
-
11
- spec.summary = "A simple Ruby wrapper for https://tryterra.co"
12
- spec.description = ""
13
- spec.homepage = "https://github.com/williamkennedy/tryterra_api"
14
- spec.license = "MIT"
15
-
16
- spec.required_ruby_version = ">= 2.5"
17
-
18
- # Specify which files should be added to the gem when it is released.
19
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
20
- spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
21
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
- end
23
- spec.bindir = "exe"
24
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
- spec.require_paths = ["lib"]
26
-
27
- spec.add_development_dependency "bundler", "~> 2.2.20"
28
- spec.add_development_dependency "rake", "~> 10.0"
29
- spec.add_development_dependency "minitest", "~> 5.0"
30
-
31
- spec.add_dependency "faraday", "~> 1.7"
32
- spec.add_dependency "faraday_middleware", "~> 1.1"
33
- end