bungie_sdk 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +147 -0
  5. data/.solargraph.yml +23 -0
  6. data/.travis.yml +6 -0
  7. data/.vim/coc-settings.json +12 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +19 -0
  10. data/Gemfile.lock +133 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +56 -0
  13. data/Rakefile +6 -0
  14. data/bin/console +15 -0
  15. data/bin/setup +8 -0
  16. data/bin/tapioca +29 -0
  17. data/bungie_sdk.gemspec +35 -0
  18. data/lib/bungie_sdk/agent.rb +166 -0
  19. data/lib/bungie_sdk/character.rb +82 -0
  20. data/lib/bungie_sdk/client.rb +72 -0
  21. data/lib/bungie_sdk/item.rb +83 -0
  22. data/lib/bungie_sdk/membership.rb +30 -0
  23. data/lib/bungie_sdk/profile.rb +36 -0
  24. data/lib/bungie_sdk/token_manager.rb +136 -0
  25. data/lib/bungie_sdk/vendor.rb +64 -0
  26. data/lib/bungie_sdk/version.rb +4 -0
  27. data/lib/bungie_sdk.rb +104 -0
  28. data/sorbet/config +3 -0
  29. data/sorbet/rbi/gems/addressable.rbi +151 -0
  30. data/sorbet/rbi/gems/addressable@2.8.0.rbi +224 -0
  31. data/sorbet/rbi/gems/ast@2.4.2.rbi +54 -0
  32. data/sorbet/rbi/gems/bungie_sdk.rbi +15 -0
  33. data/sorbet/rbi/gems/coderay.rbi +285 -0
  34. data/sorbet/rbi/gems/coderay@1.1.3.rbi +1005 -0
  35. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +185 -0
  36. data/sorbet/rbi/gems/dotenv.rbi +68 -0
  37. data/sorbet/rbi/gems/dotenv@2.7.6.rbi +88 -0
  38. data/sorbet/rbi/gems/ethon.rbi +716 -0
  39. data/sorbet/rbi/gems/ethon@0.15.0.rbi +883 -0
  40. data/sorbet/rbi/gems/faraday-net_http.rbi +33 -0
  41. data/sorbet/rbi/gems/faraday-net_http@2.0.1.rbi +78 -0
  42. data/sorbet/rbi/gems/faraday.rbi +696 -0
  43. data/sorbet/rbi/gems/faraday@2.2.0.rbi +685 -0
  44. data/sorbet/rbi/gems/ffi.rbi +560 -0
  45. data/sorbet/rbi/gems/ffi@1.15.5.rbi +849 -0
  46. data/sorbet/rbi/gems/gem-release.rbi +582 -0
  47. data/sorbet/rbi/gems/gem-release@2.2.2.rbi +644 -0
  48. data/sorbet/rbi/gems/hashie.rbi +160 -0
  49. data/sorbet/rbi/gems/jwt.rbi +274 -0
  50. data/sorbet/rbi/gems/jwt@2.3.0.rbi +437 -0
  51. data/sorbet/rbi/gems/launchy.rbi +226 -0
  52. data/sorbet/rbi/gems/launchy@2.5.0.rbi +327 -0
  53. data/sorbet/rbi/gems/method_source.rbi +64 -0
  54. data/sorbet/rbi/gems/method_source@1.0.0.rbi +72 -0
  55. data/sorbet/rbi/gems/multi_json.rbi +62 -0
  56. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +96 -0
  57. data/sorbet/rbi/gems/multi_xml.rbi +35 -0
  58. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +36 -0
  59. data/sorbet/rbi/gems/oauth2.rbi +143 -0
  60. data/sorbet/rbi/gems/oauth2@1.4.9.rbi +181 -0
  61. data/sorbet/rbi/gems/parallel@1.22.1.rbi +8 -0
  62. data/sorbet/rbi/gems/parser@3.1.1.0.rbi +1196 -0
  63. data/sorbet/rbi/gems/pry.rbi +1898 -0
  64. data/sorbet/rbi/gems/pry@0.14.1.rbi +2486 -0
  65. data/sorbet/rbi/gems/public_suffix.rbi +104 -0
  66. data/sorbet/rbi/gems/public_suffix@4.0.6.rbi +145 -0
  67. data/sorbet/rbi/gems/rack.rbi +21 -0
  68. data/sorbet/rbi/gems/rack@2.2.3.rbi +1622 -0
  69. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  70. data/sorbet/rbi/gems/rake.rbi +644 -0
  71. data/sorbet/rbi/gems/rake@12.3.3.rbi +804 -0
  72. data/sorbet/rbi/gems/rbi@0.0.14.rbi +2073 -0
  73. data/sorbet/rbi/gems/regexp_parser@2.3.0.rbi +8 -0
  74. data/sorbet/rbi/gems/rexml@3.2.5.rbi +672 -0
  75. data/sorbet/rbi/gems/rspec-core.rbi +1898 -0
  76. data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +2468 -0
  77. data/sorbet/rbi/gems/rspec-expectations.rbi +1171 -0
  78. data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +1634 -0
  79. data/sorbet/rbi/gems/rspec-mocks.rbi +1094 -0
  80. data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +1497 -0
  81. data/sorbet/rbi/gems/rspec-support.rbi +280 -0
  82. data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +511 -0
  83. data/sorbet/rbi/gems/rspec.rbi +15 -0
  84. data/sorbet/rbi/gems/rspec@3.11.0.rbi +40 -0
  85. data/sorbet/rbi/gems/rubocop-ast@1.17.0.rbi +8 -0
  86. data/sorbet/rbi/gems/rubocop-sorbet@0.6.7.rbi +8 -0
  87. data/sorbet/rbi/gems/rubocop@1.27.0.rbi +8 -0
  88. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +8 -0
  89. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  90. data/sorbet/rbi/gems/spoom@1.1.11.rbi +1445 -0
  91. data/sorbet/rbi/gems/tapioca@0.7.1.rbi +1677 -0
  92. data/sorbet/rbi/gems/thor@1.2.1.rbi +844 -0
  93. data/sorbet/rbi/gems/typhoeus.rbi +301 -0
  94. data/sorbet/rbi/gems/typhoeus@1.4.0.rbi +450 -0
  95. data/sorbet/rbi/gems/unicode-display_width@2.1.0.rbi +8 -0
  96. data/sorbet/rbi/gems/unparser@0.6.4.rbi +8 -0
  97. data/sorbet/rbi/gems/webrick@1.7.0.rbi +601 -0
  98. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +235 -0
  99. data/sorbet/rbi/gems/yard@0.9.27.rbi +3966 -0
  100. data/sorbet/rbi/hidden-definitions/errors.txt +4013 -0
  101. data/sorbet/rbi/hidden-definitions/hidden.rbi +8945 -0
  102. data/sorbet/rbi/sorbet-typed/lib/faraday/all/faraday.rbi +82 -0
  103. data/sorbet/rbi/sorbet-typed/lib/rake/all/rake.rbi +645 -0
  104. data/sorbet/rbi/sorbet-typed/lib/rspec-core/all/rspec-core.rbi +24 -0
  105. data/sorbet/rbi/todo.rbi +8 -0
  106. data/sorbet/tapioca/config.yml +13 -0
  107. data/sorbet/tapioca/require.rb +4 -0
  108. metadata +236 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fc85e7eb27025557831430da20e0138d3bd94fc3dd95fd7519dc4c221d69a421
4
+ data.tar.gz: dfa27a661cd143969580ad3026c18bd3c4ab8f880c7912936af21c627ae13351
5
+ SHA512:
6
+ metadata.gz: ffecab7f2e45a4f9adc765a5a2c77e7db49e00f2d9753ee470f8b51f46de3c4812e840aba8ae2fb0b775d359910af09159588d539a76e34145e8cf553e7c408d
7
+ data.tar.gz: ca01491adffa139ba6ae3fbb1849f5da045b0934f7da1dd8894b3697e6192db1b9dc718b14ce33052e8fef0375d7c5e2c240d54be168d23e7f1feb336cf12857
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ .env
13
+ token.json
14
+ *.log
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,147 @@
1
+ # ---------------------------------------------------------------------------------
2
+ # RuboCop config for syxtax enforcement
3
+ # ---------------------------------------------------------------------------------
4
+ require: rubocop-sorbet
5
+
6
+ AllCops:
7
+ Exclude:
8
+ - 'Gemfile'
9
+ - 'Rakefile'
10
+ TargetRubyVersion: 2.7
11
+
12
+
13
+ # Styling
14
+ # ---------------------------------------------------------------------------------
15
+ Style/HashSyntax:
16
+ EnforcedStyle: ruby19
17
+
18
+ Style/ClassVars:
19
+ Enabled: false
20
+
21
+ Layout/MultilineMethodArgumentLineBreaks:
22
+ Enabled: false
23
+
24
+ Layout/FirstHashElementIndentation:
25
+ Enabled: false
26
+
27
+ Style/SymbolArray:
28
+ EnforcedStyle: brackets
29
+
30
+ Layout/HashAlignment:
31
+ EnforcedColonStyle: table
32
+ EnforcedHashRocketStyle: table
33
+
34
+ Layout/ExtraSpacing:
35
+ Enabled: false
36
+ AllowForAlignment: true
37
+ ForceEqualSignAlignment: true
38
+
39
+ Style/Documentation:
40
+ Enabled: false
41
+
42
+ Layout/EmptyLinesAroundAccessModifier:
43
+ EnforcedStyle: only_before
44
+
45
+ Style/MultilineBlockChain:
46
+ Enabled: false
47
+
48
+ Style/RescueModifier:
49
+ Enabled: false
50
+
51
+ Style/Semicolon:
52
+ Enabled: false
53
+
54
+ Layout/EmptyLinesAroundModuleBody:
55
+ Enabled: false
56
+
57
+ Layout/EmptyLinesAroundClassBody:
58
+ Enabled: false
59
+
60
+ Layout/SpaceInsideBlockBraces:
61
+ EnforcedStyle: space
62
+ SpaceBeforeBlockParameters: false
63
+
64
+ Layout/MultilineMethodCallIndentation:
65
+ EnforcedStyle: indented
66
+
67
+ Layout/SpaceAroundEqualsInParameterDefault:
68
+ EnforcedStyle: no_space
69
+
70
+ Layout/EmptyLineBetweenDefs:
71
+ AllowAdjacentOneLineDefs: true
72
+
73
+ Style/SingleLineMethods:
74
+ Enabled: false
75
+
76
+ Style/RedundantSelf:
77
+ Enabled: false
78
+
79
+ Style/WordArray:
80
+ Enabled: false
81
+
82
+ Style/MutableConstant:
83
+ Enabled: false
84
+
85
+ Naming/AccessorMethodName:
86
+ Enabled: false
87
+
88
+ Style/Alias:
89
+ EnforcedStyle: prefer_alias_method
90
+
91
+ Naming/PredicateName:
92
+ Enabled: false
93
+
94
+ Style/GuardClause:
95
+ Enabled: false
96
+
97
+ Style/ColonMethodCall:
98
+ Enabled: false
99
+
100
+ Style/IfUnlessModifier:
101
+ Enabled: false
102
+
103
+ Style/FrozenStringLiteralComment:
104
+ Enabled: false
105
+
106
+ Style/ClassAndModuleChildren:
107
+ Enabled: false
108
+
109
+ Style/OptionalBooleanParameter:
110
+ Enabled: false
111
+
112
+ Naming/VariableNumber:
113
+ Enabled: false
114
+
115
+ Style/GlobalVars:
116
+ Enabled: false
117
+
118
+ Style/DoubleNegation:
119
+ Enabled: false
120
+
121
+ # Linter
122
+ # ---------------------------------------------------------------------------------
123
+ Lint/UnderscorePrefixedVariableName:
124
+ Enabled: false
125
+
126
+ Lint/UselessMethodDefinition:
127
+ Enabled: false
128
+
129
+ Lint/MissingSuper:
130
+ Enabled: false
131
+
132
+ Lint/AssignmentInCondition:
133
+ Enabled: false
134
+
135
+ Lint/RescueException:
136
+ Enabled: false
137
+
138
+ # Metrics
139
+ # ---------------------------------------------------------------------------------
140
+ Layout/LineLength:
141
+ Max: 118
142
+
143
+ Metrics:
144
+ Enabled: false
145
+
146
+ Security/MarshalLoad:
147
+ Enabled: false
data/.solargraph.yml ADDED
@@ -0,0 +1,23 @@
1
+ ---
2
+ include:
3
+ - "**/*.rb"
4
+ exclude:
5
+ - spec/**/*
6
+ - test/**/*
7
+ - vendor/**/*
8
+ - ".bundle/**/*"
9
+ require: []
10
+ domains: []
11
+ reporters:
12
+ - rubocop
13
+ - require_not_found
14
+ - typecheck
15
+ formatter:
16
+ rubocop:
17
+ cops: safe
18
+ except: []
19
+ only: []
20
+ extra_args: []
21
+ require_paths: []
22
+ plugins: []
23
+ max_files: 5000
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.7.2
6
+ before_install: gem install bundler -v 2.1.4
@@ -0,0 +1,12 @@
1
+ {
2
+ "languageserver": {
3
+ "sorbet": {
4
+ "command": "srb",
5
+ "args": ["tc", "--lsp", "--enable-all-experimental-lsp-features"],
6
+ "filetypes": ["ruby"],
7
+ "rootPatterns": ["sorbet/config"],
8
+ "initializationOptions": {},
9
+ "settings": {}
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,74 @@
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 the8bitgamer11@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 [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in bungie_sdk.gemspec
6
+ gemspec
7
+
8
+ gem 'pry'
9
+ gem 'rake', '~> 12.0'
10
+ gem 'rspec', '~> 3.0'
11
+ gem 'gem-release'
12
+ gem 'rubocop-sorbet', require: false
13
+ gem 'unparser', require: false
14
+
15
+ group :development do
16
+ gem 'tapioca', require: false
17
+ gem 'yard', require: false
18
+ gem 'yard-sorbet', require: false
19
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,133 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bungie_sdk (0.1.1)
5
+ launchy (~> 2.5)
6
+ oauth2 (~> 1.2)
7
+ sorbet-runtime (~> 0.5)
8
+ typhoeus (~> 1.4)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ addressable (2.8.0)
14
+ public_suffix (>= 2.0.2, < 5.0)
15
+ ast (2.4.2)
16
+ coderay (1.1.3)
17
+ diff-lcs (1.5.0)
18
+ dotenv (2.7.6)
19
+ ethon (0.15.0)
20
+ ffi (>= 1.15.0)
21
+ faraday (2.2.0)
22
+ faraday-net_http (~> 2.0)
23
+ ruby2_keywords (>= 0.0.4)
24
+ faraday-net_http (2.0.1)
25
+ ffi (1.15.5)
26
+ gem-release (2.2.2)
27
+ jwt (2.3.0)
28
+ launchy (2.5.0)
29
+ addressable (~> 2.7)
30
+ method_source (1.0.0)
31
+ multi_json (1.15.0)
32
+ multi_xml (0.6.0)
33
+ oauth2 (1.4.9)
34
+ faraday (>= 0.17.3, < 3.0)
35
+ jwt (>= 1.0, < 3.0)
36
+ multi_json (~> 1.3)
37
+ multi_xml (~> 0.5)
38
+ rack (>= 1.2, < 3)
39
+ parallel (1.22.1)
40
+ parser (3.1.1.0)
41
+ ast (~> 2.4.1)
42
+ pry (0.14.1)
43
+ coderay (~> 1.1)
44
+ method_source (~> 1.0)
45
+ public_suffix (4.0.6)
46
+ rack (2.2.3)
47
+ rainbow (3.1.1)
48
+ rake (12.3.3)
49
+ rbi (0.0.14)
50
+ ast
51
+ parser (>= 2.6.4.0)
52
+ sorbet-runtime (>= 0.5.9204)
53
+ unparser
54
+ regexp_parser (2.3.0)
55
+ rexml (3.2.5)
56
+ rspec (3.11.0)
57
+ rspec-core (~> 3.11.0)
58
+ rspec-expectations (~> 3.11.0)
59
+ rspec-mocks (~> 3.11.0)
60
+ rspec-core (3.11.0)
61
+ rspec-support (~> 3.11.0)
62
+ rspec-expectations (3.11.0)
63
+ diff-lcs (>= 1.2.0, < 2.0)
64
+ rspec-support (~> 3.11.0)
65
+ rspec-mocks (3.11.1)
66
+ diff-lcs (>= 1.2.0, < 2.0)
67
+ rspec-support (~> 3.11.0)
68
+ rspec-support (3.11.0)
69
+ rubocop (1.27.0)
70
+ parallel (~> 1.10)
71
+ parser (>= 3.1.0.0)
72
+ rainbow (>= 2.2.2, < 4.0)
73
+ regexp_parser (>= 1.8, < 3.0)
74
+ rexml
75
+ rubocop-ast (>= 1.16.0, < 2.0)
76
+ ruby-progressbar (~> 1.7)
77
+ unicode-display_width (>= 1.4.0, < 3.0)
78
+ rubocop-ast (1.17.0)
79
+ parser (>= 3.1.1.0)
80
+ rubocop-sorbet (0.6.7)
81
+ rubocop (>= 0.90.0)
82
+ ruby-progressbar (1.11.0)
83
+ ruby2_keywords (0.0.5)
84
+ sorbet (0.5.9873)
85
+ sorbet-static (= 0.5.9873)
86
+ sorbet-runtime (0.5.9873)
87
+ sorbet-static (0.5.9873-universal-darwin-14)
88
+ spoom (1.1.11)
89
+ sorbet (>= 0.5.9204)
90
+ sorbet-runtime (>= 0.5.9204)
91
+ thor (>= 0.19.2)
92
+ tapioca (0.7.1)
93
+ bundler (>= 1.17.3)
94
+ pry (>= 0.12.2)
95
+ rbi (~> 0.0.0, >= 0.0.14)
96
+ sorbet-runtime (>= 0.5.9204)
97
+ sorbet-static (>= 0.5.9204)
98
+ spoom (~> 1.1.0, >= 1.1.4)
99
+ thor (>= 1.2.0)
100
+ yard-sorbet
101
+ thor (1.2.1)
102
+ typhoeus (1.4.0)
103
+ ethon (>= 0.9.0)
104
+ unicode-display_width (2.1.0)
105
+ unparser (0.6.4)
106
+ diff-lcs (~> 1.3)
107
+ parser (>= 3.1.0)
108
+ webrick (1.7.0)
109
+ yard (0.9.27)
110
+ webrick (~> 1.7.0)
111
+ yard-sorbet (0.6.1)
112
+ sorbet-runtime (>= 0.5)
113
+ yard (>= 0.9)
114
+
115
+ PLATFORMS
116
+ ruby
117
+
118
+ DEPENDENCIES
119
+ bungie_sdk!
120
+ dotenv (~> 2.7)
121
+ gem-release
122
+ pry
123
+ rake (~> 12.0)
124
+ rspec (~> 3.0)
125
+ rubocop-sorbet
126
+ sorbet (~> 0.5)
127
+ tapioca
128
+ unparser
129
+ yard
130
+ yard-sorbet
131
+
132
+ BUNDLED WITH
133
+ 2.1.4
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 tkmcclellan
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 ADDED
@@ -0,0 +1,56 @@
1
+ # BungieSdk
2
+
3
+ The Unofficial, Incomplete, Hardly-Tested Bungie SDK for Ruby.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'bungie_sdk'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install bungie_sdk
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ require 'bungie_sdk'
25
+
26
+ client = BungieSdk::Client.new(token_filepath: './token.json')
27
+ membership = client.destiny_memberships.first
28
+ profile = membership.profile
29
+ character = profile.characters.first
30
+ vendor = character.vendors.first
31
+ items = vendor.items
32
+ items.each do |item|
33
+ puts item.name
34
+ puts item.type
35
+ puts item.sockets
36
+ end
37
+ ```
38
+
39
+ ## Development
40
+
41
+ After forking the repo and cloning your fork, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
42
+
43
+ To install this gem onto your local machine, run `bundle exec rake install`.
44
+
45
+ ## Contributing
46
+
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/tkmcclellan/bungie\_sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/bungie_sdk/blob/master/CODE_OF_CONDUCT.md).
48
+
49
+
50
+ ## License
51
+
52
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
53
+
54
+ ## Code of Conduct
55
+
56
+ Everyone interacting in the BungieSdk project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/bungie_sdk/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'bungie_sdk'
5
+ require 'pry'
6
+ require 'dotenv/load'
7
+
8
+ # You can add fixtures and/or initialization code here to make experimenting
9
+ # with your gem easier. You can also use a different console, if you like.
10
+
11
+ def reload!
12
+ Dir['lib/**/*.rb'].each {|file| load file }
13
+ end
14
+
15
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
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/bin/tapioca ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'tapioca' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("tapioca", "tapioca")
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/bungie_sdk/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'bungie_sdk'
7
+ spec.version = BungieSdk::VERSION
8
+ spec.authors = ['tkmcclellan']
9
+ spec.email = ['the8bitgamer11@gmail.com']
10
+
11
+ spec.summary = 'Unofficial Bungie SDK for Ruby!'
12
+ spec.description = 'Incomplete, WIP, unofficial Ruby SDK for the Bungie API.'
13
+ spec.homepage = 'https://github.com/tkmcclellan/bungie_sdk'
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
16
+
17
+ spec.metadata['homepage_uri'] = spec.homepage
18
+ spec.metadata['source_code_uri'] = 'https://github.com/tkmcclellan/bungie_sdk'
19
+ spec.metadata['changelog_uri'] = 'https://github.com/tkmcclellan/bungie_sdk/blob/main/CHANGELOG.md'
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
+ `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
25
+ end
26
+ spec.bindir = 'exe'
27
+ spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
28
+ spec.require_paths = ['lib']
29
+ spec.add_runtime_dependency 'launchy', '~> 2.5'
30
+ spec.add_runtime_dependency 'oauth2', '~> 1.2'
31
+ spec.add_runtime_dependency 'sorbet-runtime', '~> 0.5'
32
+ spec.add_runtime_dependency 'typhoeus', '~> 1.4'
33
+ spec.add_development_dependency 'dotenv', '~> 2.7'
34
+ spec.add_development_dependency 'sorbet', '~>0.5'
35
+ end