uk_companies_house 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/uk_companies_house/client.rb +3 -1
- data/lib/uk_companies_house/company.rb +24 -10
- data/lib/uk_companies_house/search.rb +3 -3
- data/lib/uk_companies_house/title, first_name, last_name, email, phone, positi +11 -0
- data/lib/uk_companies_house/version.rb +1 -1
- data/uk_companies_house-0.1.2.gem +0 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb7c474c201c49f19311baf11c46fbbab695f04190dcf7b24f95d4a2282d992
|
4
|
+
data.tar.gz: 52ec4896036f2b3db7b64d030f599b13996497053d82d8125edc05af2a43d36a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21b3e31314a518ac0ba8f6e99b8ea4a401a2324b1fce56313db45df8a426627740733cb153b866fb98c2b455861eb852564a4f01968d0c520ffcd5c03698a3e2
|
7
|
+
data.tar.gz: afa3a72adf4abb9edce3cf20f1e0df3e4615852053387eaf782e0d6d1af3c34cbffdb7b24321b3759808f42a7aafb40a71b0741909ff1aa592714f055b3902cd
|
data/Gemfile.lock
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
module UkCompaniesHouse
|
2
|
+
|
2
3
|
class Client
|
3
4
|
attr_accessor :api_key
|
4
5
|
|
@@ -28,7 +29,8 @@ module UkCompaniesHouse
|
|
28
29
|
connection.get do |req|
|
29
30
|
req.url url
|
30
31
|
req.headers['Content-Type'] = 'application/json'
|
31
|
-
req.
|
32
|
+
req.params = data
|
33
|
+
#req.body = data.to_json
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
@@ -7,16 +7,20 @@ module UkCompaniesHouse
|
|
7
7
|
end
|
8
8
|
|
9
9
|
# Search company information
|
10
|
-
def search(
|
11
|
-
params = {q:
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
def search(query, items_per_page = nil, start_index = nil)
|
11
|
+
params = {q: query}
|
12
|
+
if items_per_page
|
13
|
+
params[:items_per_page] = items_per_page
|
14
|
+
end
|
15
|
+
if start_index
|
16
|
+
params[:start_index] = start_index
|
17
|
+
end
|
18
|
+
client.get("search/companies", params)
|
15
19
|
end
|
16
20
|
|
17
21
|
# Basic company information
|
18
22
|
def basic_information(company_number)
|
19
|
-
number = company_number.gsub(/[^a-zA-Z0-9]/, "")
|
23
|
+
number = "#{company_number}".gsub(/[^a-zA-Z0-9]/, "")
|
20
24
|
client.get("/company/#{number}")
|
21
25
|
end
|
22
26
|
|
@@ -37,9 +41,13 @@ module UkCompaniesHouse
|
|
37
41
|
|
38
42
|
# Get the filing history list of a company
|
39
43
|
def filing_history_list(company_number, category = nil, items_per_page = nil, start_index = nil)
|
40
|
-
params = {category: category
|
41
|
-
|
42
|
-
|
44
|
+
params = {category: category}
|
45
|
+
if items_per_page
|
46
|
+
params[:items_per_page] = items_per_page
|
47
|
+
end
|
48
|
+
if start_index
|
49
|
+
params[:start_index] = start_index
|
50
|
+
end
|
43
51
|
client.get("company/#{company_number}/officers/", params)
|
44
52
|
end
|
45
53
|
|
@@ -55,7 +63,13 @@ module UkCompaniesHouse
|
|
55
63
|
|
56
64
|
# List of charges for a company.
|
57
65
|
def charges(company_number, items_per_page = nil, start_index = nil)
|
58
|
-
params = {
|
66
|
+
params = {}
|
67
|
+
if items_per_page
|
68
|
+
params[:items_per_page] = items_per_page
|
69
|
+
end
|
70
|
+
if start_index
|
71
|
+
params[:start_index] = start_index
|
72
|
+
end
|
59
73
|
client.get("company/#{company_number}/charges/", params)
|
60
74
|
end
|
61
75
|
|
@@ -11,7 +11,7 @@ module UkCompaniesHouse
|
|
11
11
|
params = {q: q,
|
12
12
|
items_per_page: items_per_page,
|
13
13
|
start_index: start_index}
|
14
|
-
client.get("search
|
14
|
+
client.get("search", params)
|
15
15
|
end
|
16
16
|
|
17
17
|
#Search company information
|
@@ -19,7 +19,7 @@ module UkCompaniesHouse
|
|
19
19
|
params = {q: q,
|
20
20
|
items_per_page: items_per_page,
|
21
21
|
start_index: start_index}
|
22
|
-
client.get("search/companies
|
22
|
+
client.get("search/companies", params)
|
23
23
|
end
|
24
24
|
|
25
25
|
# Search for officer information
|
@@ -35,7 +35,7 @@ module UkCompaniesHouse
|
|
35
35
|
params = {q: q,
|
36
36
|
items_per_page: items_per_page,
|
37
37
|
start_index: start_index}
|
38
|
-
client.get("search/disqualified-officers
|
38
|
+
client.get("search/disqualified-officers", params)
|
39
39
|
end
|
40
40
|
|
41
41
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
rails g model Contact title first_name last_name email phone position date_of_birth:date passport passport_number contact_type notes country:references
|
2
|
+
|
3
|
+
|
4
|
+
proof_address
|
5
|
+
postcode
|
6
|
+
|
7
|
+
rails g model Address address postcode country:references location latitude:float longitude:float
|
8
|
+
|
9
|
+
|
10
|
+
rails g model ContactAddresses address:references contact:references primary:boolean
|
11
|
+
rails g model CompanyAddresses address:references company:references primary:boolean type:integer:index
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uk_companies_house
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugeniu Tambur
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,8 +102,10 @@ files:
|
|
102
102
|
- lib/uk_companies_house/company.rb
|
103
103
|
- lib/uk_companies_house/officer.rb
|
104
104
|
- lib/uk_companies_house/search.rb
|
105
|
+
- lib/uk_companies_house/title, first_name, last_name, email, phone, positi
|
105
106
|
- lib/uk_companies_house/version.rb
|
106
107
|
- uk_companies_house-0.1.1.gem
|
108
|
+
- uk_companies_house-0.1.2.gem
|
107
109
|
- uk_companies_house.gemspec
|
108
110
|
homepage: https://github.com/zinggg/uk_companies_house
|
109
111
|
licenses:
|
@@ -125,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
127
|
version: '0'
|
126
128
|
requirements: []
|
127
129
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.7.
|
130
|
+
rubygems_version: 2.7.7
|
129
131
|
signing_key:
|
130
132
|
specification_version: 4
|
131
133
|
summary: Ruby API to UK Companies House.
|