Skip to content

Commit 1027325

Browse files
authored
Add New Location Fields to Autocomplete (#28)
* add new fields for autocomplete * add more tests * spelling
1 parent 374327d commit 1027325

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 People Data Labs
3+
Copyright (c) 2025 People Data Labs
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

lib/peopledatalabs/api_resource.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class APIResource
33

44
protected
55

6-
VALID_AUTOCOMPLETE_FIELDS = ['class', 'company', 'country', 'industry', 'location', 'major', 'region', 'role', 'school', 'sub_role', 'skill', 'title'].freeze
6+
VALID_AUTOCOMPLETE_FIELDS = ['all_location', 'class', 'company', 'country', 'industry', 'location', 'location_name', 'major', 'region', 'role', 'school', 'sub_role', 'skill', 'title'].freeze
77

88
def self.get(path:, headers: {}, params: {})
99
request = check(params: params, path: path)

lib/peopledatalabs/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Peopledatalabs
2-
VERSION = "5.0.0"
2+
VERSION = "5.1.0"
33
end

spec/peopledatalabs_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,12 @@
219219
expect(result).to be_an_instance_of(Hash)
220220
end
221221

222+
it "should return autocomplete record for all_location" do
223+
result = Peopledatalabs::Autocomplete.retrieve(field: 'all_location', text: 'miami', size: 10)
224+
expect(result['status']).to eq(200)
225+
expect(result).to be_an_instance_of(Hash)
226+
end
227+
222228
it "should error" do
223229
result = Peopledatalabs::Autocomplete.retrieve(field: nil)
224230
expect(result['status']).to eq(400)

0 commit comments

Comments
 (0)