forexrateapi 1.0.1 → 1.1.2

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: '09786c38fab46aa7cc8a8d4563d5d19557843ed5487ab87fced0467f08b367bd'
4
- data.tar.gz: da6ec735343f79837df80ab761df8eebad9b380b798086dfbfa08ac25bb3bb0c
3
+ metadata.gz: 487a58e5df23a607de14a2c9cabfbca26c9d209dd570c49b3e31eae96c14f8cf
4
+ data.tar.gz: 8d3eed1f2488cccd7336a3c91c8fc91a17cc9ec08b75a5900774b9823cac2ea0
5
5
  SHA512:
6
- metadata.gz: 5dd1698e4512b742a5a7fc68a66a62776d45af15c283fd0716f47c88a36eeca50b0761cb1aa5c29ce15b908f3b59ebbd4d3154504adef47693c88e095584fbf7
7
- data.tar.gz: 6e77fd48b33cdb459d05a06b6a5b41eabe281128066317acd483e9e305af89302a91e84c0ff1e0847a837e3f19e1cd6c69c86511623df2883ff1ffed58caab31
6
+ metadata.gz: 83a37021ae5cfca15f6d770abcce5bd6325181e0fd2b5e771c83d0ba038faea124e1a32d2b2bb9fa7aa0b18b70bc00eb2e82a490971d0df29a27e478c85d0d3c
7
+ data.tar.gz: 59ec9f427a10d0df2631e286226edd40e2bd2f651957fedf1877a23fa992962450ed0249945a732bec0c441ab9c05ac2b7a587e5cfb8e51b8737a7da3e7fd9c3
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 ForexRateAPI
3
+ Copyright (c) 2025 ForexRateAPI
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -51,6 +51,20 @@ client.fetchHistorical(date='2021-04-05', base='USD', currencies=['AUD', 'CAD',
51
51
 
52
52
  [Link](https://forexrateapi.com/documentation#api_historical)
53
53
 
54
+ ---
55
+ #### ohlc(base, currency, date, date_type)
56
+
57
+ - `base` <[string]> Optional. Pass in a base currency, defaults to USD.
58
+ - `currency` <[string]> Required. Specify currency you would like to get OHLC for.
59
+ - `date` <[string]> Required. Specify date to get OHLC for specific date using format `YYYY-MM-DD`.
60
+ - `date_type` <[string]> Optional. Pass in a date type, overrides date parameter if passed in.
61
+
62
+ ```ruby
63
+ client.ohlc(base='USD', currency='EUR', date='2021-04-05', date_type=nil)
64
+ ```
65
+
66
+ [Link](https://forexrateapi.com/documentation#api_ohlc)
67
+
54
68
  ---
55
69
  #### convert(from_currency, to_currency, amount, date)
56
70
 
@@ -94,9 +108,16 @@ client.change(start_date='2021-04-05', end_date='2021-04-06', base='USD', curren
94
108
  [Link](https://forexrateapi.com/documentation#api_change)
95
109
 
96
110
  ---
97
- **[Official documentation](https://forexrateapi.com/documentation)**
111
+ #### usage()
98
112
 
113
+ ```ruby
114
+ client.usage()
115
+ ```
99
116
 
117
+ [Link](https://forexrateapi.com/documentation#api_usage)
118
+
119
+ ---
120
+ **[Official documentation](https://forexrateapi.com/documentation)**
100
121
  ---
101
122
  ## FAQ
102
123
 
@@ -22,6 +22,16 @@ module ForexRateAPI
22
22
  get(date, options)
23
23
  end
24
24
 
25
+ def ohlc(base = nil, currency = nil, date = nil, date_type = nil)
26
+ options = removeEmpty({
27
+ base: base,
28
+ currency: currency,
29
+ date: date,
30
+ date_type: date_type
31
+ })
32
+ get('ohlc', options)
33
+ end
34
+
25
35
  def convert(from_currency = nil, to_currency = nil, amount = nil, date = nil)
26
36
  options = removeEmpty({
27
37
  'from': from_currency,
@@ -52,6 +62,10 @@ module ForexRateAPI
52
62
  get('change', options)
53
63
  end
54
64
 
65
+ def usage
66
+ get('usage')
67
+ end
68
+
55
69
  private
56
70
 
57
71
  def removeEmpty(options)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForexRateAPI
4
- VERSION = '1.0.1'
4
+ VERSION = '1.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forexrateapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ForexRateAPI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-19 00:00:00.000000000 Z
11
+ date: 2025-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday