sec-edgar-sdk 0.1.0
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 +7 -0
- data/lib/sec-edgar/client_result.rb +17 -0
- data/lib/sec-edgar/full_text_search.rb +28 -0
- data/lib/sec-edgar/version.rb +3 -0
- data/lib/sec-edgar-sdk.rb +6 -0
- metadata +86 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1deaba9be7991c3f74b96b760e001f9e073a498694d56902434c9dce4417352b
|
4
|
+
data.tar.gz: decdcdc9172f069b100464add33110e35a5e52e2f78c07aa9251603cccf915af
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7bf3a468f7cc84f28b872ca47673e0d43977e0e9a90e1adf87a16dba20a432709ed1e6d1dd17a85644274e73299e1c8de2583bd9d70a881bff5b7dd313b3c927
|
7
|
+
data.tar.gz: 3084cbb59e1672cd21ade5596df4723b832889a0f3f9948393bdc50c337b33d6e0bb72fded789bd40efdfe9f2221070147bb52eea9d40391e0a9405a3e56b816
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module SecEdgar
|
2
|
+
class ClientResult
|
3
|
+
def initialize(response)
|
4
|
+
@response = response
|
5
|
+
end
|
6
|
+
|
7
|
+
def to_h
|
8
|
+
JSON.parse(response.body).deep_symbolize_keys
|
9
|
+
end
|
10
|
+
|
11
|
+
delegate_missing_to :response
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
attr_reader :response
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SecEdgar
|
4
|
+
class FullTextSearch
|
5
|
+
include HTTParty
|
6
|
+
base_uri 'https://efts.sec.gov'
|
7
|
+
|
8
|
+
# Performs a text search using the EDGAR Full Text Search API
|
9
|
+
#
|
10
|
+
# @keys_typed [String] The search term to use in the search query.
|
11
|
+
# @narrow [Boolean] Whether or not to narrow the search results.
|
12
|
+
# The Company Search Page seems to use this control parameter.
|
13
|
+
# https://www.sec.gov/edgar/searchedgar/companysearch.html
|
14
|
+
#
|
15
|
+
def self.perform(keys_typed:, narrow: false)
|
16
|
+
response = post(
|
17
|
+
'/LATEST/search-index',
|
18
|
+
headers: { 'Content-Type': 'application/json' },
|
19
|
+
body: {
|
20
|
+
keysTyped: keys_typed,
|
21
|
+
narrow: narrow
|
22
|
+
}.compact.to_json
|
23
|
+
)
|
24
|
+
|
25
|
+
ClientResult.new(response)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sec-edgar-sdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- David Christensen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-10-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.19'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.19.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.19'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.19.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: activesupport
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '6.1'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 6.1.4.1
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '6.1'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 6.1.4.1
|
53
|
+
description: A Ruby SDK for the SEC EDGAR API
|
54
|
+
email:
|
55
|
+
executables: []
|
56
|
+
extensions: []
|
57
|
+
extra_rdoc_files: []
|
58
|
+
files:
|
59
|
+
- lib/sec-edgar-sdk.rb
|
60
|
+
- lib/sec-edgar/client_result.rb
|
61
|
+
- lib/sec-edgar/full_text_search.rb
|
62
|
+
- lib/sec-edgar/version.rb
|
63
|
+
homepage: https://github.com/david-christensen/sec-edgar-edgar-sdk
|
64
|
+
licenses:
|
65
|
+
- MIT
|
66
|
+
metadata: {}
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
requirements: []
|
82
|
+
rubygems_version: 3.1.2
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: SEC EDGAR SDK
|
86
|
+
test_files: []
|