coinmarketcal 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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWViMjJmZWNhMTlhZmVlZWViZjU0NTAyZGI1OGMyNjM4ZTVkMWQyOQ==
4
+ NzdjNjAxMjc4MjUxYjA2YTBiZDdiODM2ZDA3OTBiMjA4ZjRjMDM2Nw==
5
5
  data.tar.gz: !binary |-
6
- NWRkNTI2ZTIwNTIwNmIwMTdhYTY5MDc2NWY5NjMzMDUyMTVmOTRiYQ==
6
+ ZTlmZTNjYjkxYzkyYWIxNDQ0NzQxNjhjM2UzZTBkZWY3OTE2MDRiNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmRiYzNmM2FkOWM4YzYwMWUxZGU0MjJkZWQwNzU0MzFlNzgyMzc1NjZhZWJk
10
- NDg5OTE2Y2I5ODhjNzg2ODc3MTc4NTI1MjUzY2M2ZWFhNzBkZmMyNWUzMTQx
11
- NjFkYzE1YjIzYWQwNjMyYjg5NmI0MmIwODQyYTZkYjY2YWY5ZDI=
9
+ NjUyMTk1OGIyNmMzOTA4MmM0MTdiYWYwYWU4OWYzNjMyZGE5ZGRmNTFkM2Uw
10
+ NDMwM2QxNjY3NWZmMmMzZmE4YTNiOTE5Y2RjYThhYmFjNDk3MmE2MTNmMmM2
11
+ Y2MyNzY3OGE0YzdiZjVhNWQ4NjYxODNlNDdlODIxNmExN2I0MTU=
12
12
  data.tar.gz: !binary |-
13
- NTk5OWEzZjJmNGRlYmZmMGFhM2JkYjIyOGUyN2FjZTgwNjczNTljNmVkODIy
14
- ZTMzMzY1YzBkZWY1YTE5ZGE0NmI5Zjk3MDNmN2FmMmQ1ZDI0YjE2YzBhMGZl
15
- YTRkZGNkOGNjM2Y3MGFmMjg3ZDI2ZDEzOWFjOWM5OTlhYTNhYWQ=
13
+ ZmRkNGZmNDY5MWU2YjFlYmI2MTI0ZjdjNWE2ZGE5ZjdhNGE5NDRjZWVkNjRl
14
+ MzQ4OThiODg0NGZhMWI0OTc1YzUyZjA5ZjEzYjI2MDBlZWY1ZTExNjVmMjQx
15
+ ZGVlNDBiZWUyMjNmMTlkYTRhMThiYjAzN2IxNTYzZjg3MGUyYTA=
data/.gitignore CHANGED
@@ -9,3 +9,12 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ # Gem builds
14
+ pkg
15
+
16
+ # Don't include your lock file
17
+ Gemfile.lock
18
+
19
+ # Don't include Rubymine config
20
+ .idea
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Coinmarketcal
1
+ # Coinmarketcal [![Gem Version](https://badge.fury.io/rb/coinmarketcal.svg)](https://badge.fury.io/rb/coinmarketcal)
2
2
 
3
- 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/coinmarketcal`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Unofficial gem for the CoinMarketCal API.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ CoinMarketCal is the economic calendar for the cryptocurrency market. Evidence-based and community-driven.
6
6
 
7
7
  ## Installation
8
8
 
@@ -22,22 +22,41 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ You can authenticate access to your CoinMarketCal account by configuring your implementation of the coinmarketcal gem. This is accomplished by using a config block at the top of your application.
26
26
 
27
- ## Development
27
+ Set up your keys at: https://api.coinmarketcal.com/developer/dashboard
28
28
 
29
- After checking out the repo, 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.
29
+ ```ruby
30
+ Coinmarketcal.config do |c|
31
+ c.client_id = 'your-client-id'
32
+ c.client_secret = 'your-client-secret'
33
+ end
34
+ ```
35
+
36
+ To retrieve list of coins:
37
+ ```ruby
38
+ Coinmarketcal::Coin.all
39
+ ```
40
+
41
+ To retrieve list of events:
42
+ ```ruby
43
+ Coinmarketcal::Event.all
44
+ ```
45
+
46
+ To retrieve list of categories:
47
+ ```ruby
48
+ Coinmarketcal::Category.all
49
+ ```
30
50
 
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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
51
 
33
52
  ## Contributing
34
53
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/coinmarketcal. 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.
54
+ 1. Fork it ( https://github.com/toreserter/coinmarketcal/fork )
55
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
56
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
57
+ 4. Push to the branch (`git push origin my-new-feature`)
58
+ 5. Create a new Pull Request
36
59
 
37
60
  ## License
38
61
 
39
62
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
42
-
43
- Everyone interacting in the Coinmarketcal project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/coinmarketcal/blob/master/CODE_OF_CONDUCT.md).
@@ -12,15 +12,15 @@ module Coinmarketcal
12
12
 
13
13
  def self.all(attrs = {})
14
14
  search_hash = {
15
- page: (attrs['page'] || 1),
16
- max: attrs['max'],
17
- dateRangeStart: attrs['date_range_start'],
18
- dateRangeEnd: attrs['date_range_end'],
19
- coins: attrs['coins'],
20
- categories: attrs['categories'],
21
- sortBy: attrs['sort_by'],
22
- showOnly: attrs['show_only'],
23
- showMetadata: attrs['show_metadata']
15
+ page: (attrs[:page] || 1),
16
+ max: attrs[:max],
17
+ dateRangeStart: attrs[:date_range_start],
18
+ dateRangeEnd: attrs[:date_range_end],
19
+ coins: attrs[:coins],
20
+ categories: attrs[:categories],
21
+ sortBy: attrs[:sort_by],
22
+ showOnly: attrs[:show_only],
23
+ showMetadata: attrs[:show_metadata]
24
24
  }
25
25
  client.get('v1/events', compact(search_hash)).map { |data| new(data) }
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module Coinmarketcal
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinmarketcal
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
  - Tore Serter
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-03 00:00:00.000000000 Z
11
+ date: 2018-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,9 +76,7 @@ files:
76
76
  - .gitignore
77
77
  - .rspec
78
78
  - .travis.yml
79
- - CODE_OF_CONDUCT.md
80
79
  - Gemfile
81
- - Gemfile.lock
82
80
  - LICENSE.txt
83
81
  - README.md
84
82
  - Rakefile
@@ -112,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
110
  version: '0'
113
111
  requirements: []
114
112
  rubyforge_project:
115
- rubygems_version: 2.6.8
113
+ rubygems_version: 2.6.14
116
114
  signing_key:
117
115
  specification_version: 4
118
116
  summary: Unofficial API Client for the CoinMarketCal API
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 toreserter@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.lock DELETED
@@ -1,27 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- coinmarketcal (0.1.0)
5
- faraday (~> 0.12)
6
- faraday_middleware (~> 0.12)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- faraday (0.15.2)
12
- multipart-post (>= 1.2, < 3)
13
- faraday_middleware (0.12.2)
14
- faraday (>= 0.7.4, < 1.0)
15
- multipart-post (1.2.0)
16
- rake (10.0.4)
17
-
18
- PLATFORMS
19
- ruby
20
-
21
- DEPENDENCIES
22
- bundler (~> 1.16)
23
- coinmarketcal!
24
- rake (~> 10.0)
25
-
26
- BUNDLED WITH
27
- 1.16.1